public class AutoTcpTransportServer extends TcpTransportServer
TransportServer| Modifier and Type | Class and Description |
|---|---|
protected class |
AutoTcpTransportServer.ProtocolInfo |
TcpTransportServer.TransportInfo| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Object> |
autoTransportOptions |
protected BrokerService |
brokerService |
protected Set<String> |
enabledProtocols |
TcpTransport.InitBuffer |
initBuffer
This holds the initial buffer that has been read to detect the protocol.
|
protected int |
maxConnectionThreadPoolSize |
protected int |
protocolDetectionTimeOut |
protected Map<String,ProtocolVerifier> |
protocolVerifiers |
protected ThreadPoolExecutor |
service |
protected Map<String,Map<String,Object>> |
wireFormatOptions |
allowLinkStealing, backlog, connectionTimeout, currentTransportCount, dynamicManagement, logWriterName, maximumConnections, maxInactivityDuration, maxInactivityDurationInitalDelay, minmumWireFormatVersion, selector, serverSocket, serverSocketFactory, socketBufferSize, socketHandlerThread, socketQueue, soTimeout, startLogging, trace, transportFactory, useQueueForAccept, wireFormatFactorytransportOptions| Constructor and Description |
|---|
AutoTcpTransportServer(TcpTransportFactory transportFactory,
URI location,
ServerSocketFactory serverSocketFactory,
BrokerService brokerService,
Set<String> enabledProtocols) |
bind, doHandleSocket, doStart, getBacklog, getConnectionTimeout, getCurrentTransportCount, getLogWriterName, getMaximumConnections, getMaxInactivityDuration, getMaxInactivityDurationInitalDelay, getMinmumWireFormatVersion, getSocketAddress, getSocketBufferSize, getSoTimeout, getWireFormatFactory, isAllowLinkStealing, isDynamicManagement, isSslServer, isStartLogging, isTrace, isUseQueueForAccept, resolveHostName, run, setAllowLinkStealing, setBacklog, setBrokerInfo, setConnectionTimeout, setDynamicManagement, setLogWriterName, setMaximumConnections, setMaxInactivityDuration, setMaxInactivityDurationInitalDelay, setMinmumWireFormatVersion, setSocketBufferSize, setSoTimeout, setStartLogging, setTrace, setUseQueueForAccept, started, stopped, toStringgetStackSize, isDaemon, isJoinOnStop, setDaemon, setJoinOnStop, setStackSizegetAcceptListener, getBindLocation, getConnectURI, onAcceptError, setAcceptListener, setBindLocation, setConnectURI, setTransportOptionaddServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stopprotected Map<String,Object> autoTransportOptions
protected Set<String> enabledProtocols
protected final Map<String,ProtocolVerifier> protocolVerifiers
protected BrokerService brokerService
protected int maxConnectionThreadPoolSize
protected int protocolDetectionTimeOut
protected final ThreadPoolExecutor service
public TcpTransport.InitBuffer initBuffer
public AutoTcpTransportServer(TcpTransportFactory transportFactory, URI location, ServerSocketFactory serverSocketFactory, BrokerService brokerService, Set<String> enabledProtocols) throws IOException, URISyntaxException
transportFactory - location - serverSocketFactory - IOExceptionURISyntaxExceptionpublic WireFormatFactory findWireFormatFactory(String scheme, Map<String,Map<String,Object>> options) throws IOException
IOExceptionpublic TransportFactory findTransportFactory(String scheme, Map<String,?> options) throws IOException
IOExceptionpublic int getMaxConnectionThreadPoolSize()
public void setMaxConnectionThreadPoolSize(int maxConnectionThreadPoolSize)
public void setProtocolDetectionTimeOut(int protocolDetectionTimeOut)
public void setWireFormatFactory(WireFormatFactory factory)
setWireFormatFactory in class TcpTransportServerprotected void initProtocolVerifiers()
protected void initOpenWireProtocolVerifier()
protected boolean isAllProtocols()
protected void handleSocket(Socket socket)
handleSocket in class TcpTransportServerprotected TcpTransportServer.TransportInfo configureTransport(TcpTransportServer server, Socket socket) throws Exception
configureTransport in class TcpTransportServerExceptionprotected void waitForProtocolDetectionFinish(Future<?> future, AtomicInteger readBytes) throws Exception
Exceptionprotected TcpTransport createTransport(Socket socket, WireFormat format) throws IOException
createTransport in class TcpTransportServerIOExceptionprotected TcpTransport createTransport(Socket socket, WireFormat format, TcpTransportFactory detectedTransportFactory) throws IOException
socket - format - detectedTransportFactory - IOExceptionpublic void setWireFormatOptions(Map<String,Map<String,Object>> wireFormatOptions)
public void setEnabledProtocols(Set<String> enabledProtocols)
public void setAutoTransportOptions(Map<String,Object> autoTransportOptions)
protected void doStop(ServiceStopper stopper) throws Exception
doStop in class TcpTransportServerExceptionprotected AutoTcpTransportServer.ProtocolInfo detectProtocol(byte[] buffer) throws IOException
IOExceptionCopyright © 2005–2016 The Apache Software Foundation. All rights reserved.