public class HttpTransport extends Transport
The transport receives messages from clients and invokes interceptors in the request and response flow. The interceptors that are engaged with the transport are global and are invoked for each message flowing through the router.
| Modifier and Type | Field and Description |
|---|---|
static String |
HEADER_HOST |
Hashtable<IpPort,HttpEndpointListener> |
portListenerMapping |
static String |
SOURCE_HOSTNAME |
static String |
SOURCE_IP |
List<WeakReference<HttpEndpointListener>> |
stillRunning |
menuListeners| Constructor and Description |
|---|
HttpTransport() |
| Modifier and Type | Method and Description |
|---|---|
void |
closeAll(boolean waitForCompletion) |
void |
closePort(String ip,
int port)
Closes the corresponding server port.
|
Enumeration<IpPort> |
getAllPorts() |
int |
getCoreThreadPoolSize() |
ExecutorService |
getExecutorService() |
int |
getForceSocketCloseOnHotDeployAfter() |
int |
getMaxThreadPoolSize() |
String |
getOpenBackendConnections(int port) |
int |
getSocketTimeout() |
void |
init(Router router) |
boolean |
isAnyThreadListeningAt(String ip,
int port) |
boolean |
isOpeningPorts() |
boolean |
isTcpNoDelay() |
void |
openPort(String ip,
int port,
SSLProvider sslProvider) |
void |
setCoreThreadPoolSize(int corePoolSize) |
void |
setForceSocketCloseOnHotDeployAfter(int forceSocketCloseOnHotDeployAfter) |
void |
setMaxThreadPoolSize(int value) |
void |
setSocketTimeout(int timeout) |
void |
setTcpNoDelay(boolean tcpNoDelay) |
closeAll, getConcurrentConnectionLimitPerIp, getInterceptors, getRouter, isPrintStackTrace, isReverseDNS, setConcurrentConnectionLimitPerIp, setInterceptors, setPrintStackTrace, setReverseDNSpublic static final String SOURCE_HOSTNAME
public static final String HEADER_HOST
public static final String SOURCE_IP
public Hashtable<IpPort,HttpEndpointListener> portListenerMapping
public List<WeakReference<HttpEndpointListener>> stillRunning
public boolean isAnyThreadListeningAt(String ip, int port)
public Enumeration<IpPort> getAllPorts()
public void closePort(String ip, int port) throws IOException
IOExceptionpublic void closeAll(boolean waitForCompletion)
throws IOException
closeAll in class TransportIOExceptionpublic void openPort(String ip, int port, SSLProvider sslProvider) throws IOException
openPort in class Transportport - IOExceptionpublic String getOpenBackendConnections(int port)
getOpenBackendConnections in class Transportpublic int getCoreThreadPoolSize()
public void setCoreThreadPoolSize(int corePoolSize)
Membrane uses a thread pool to allocate threads to incomming clients connections. The core thread pool size is the minimum number of threads that are created in advance to serve client requests.
public int getMaxThreadPoolSize()
public void setMaxThreadPoolSize(int value)
public ExecutorService getExecutorService()
public int getSocketTimeout()
public void setSocketTimeout(int timeout)
public boolean isTcpNoDelay()
public void setTcpNoDelay(boolean tcpNoDelay)
public boolean isOpeningPorts()
isOpeningPorts in class Transportpublic int getForceSocketCloseOnHotDeployAfter()
public void setForceSocketCloseOnHotDeployAfter(int forceSocketCloseOnHotDeployAfter)
Router object (=Membrane Service Proxy). Before the context refresh, all open socket connections
have to be closed. Exchange objects which are still running might delay this process. Setting forceSocketCloseOnHotDeployAfter
to a non-zero number of milliseconds forces connections to be closed after this time.Copyright © 2021. All Rights Reserved.