Class AutoSslTransportServer
java.lang.Object
org.apache.activemq.util.ServiceSupport
org.apache.activemq.transport.TransportServerSupport
org.apache.activemq.transport.TransportServerThreadSupport
org.apache.activemq.transport.tcp.TcpTransportServer
org.apache.activemq.transport.auto.AutoTcpTransportServer
org.apache.activemq.transport.auto.AutoSslTransportServer
- All Implemented Interfaces:
Runnable,org.apache.activemq.Service,org.apache.activemq.transport.TransportServer,org.apache.activemq.util.ServiceListener
An SSL TransportServer.
Allows for client certificate authentication (refer to setNeedClientAuth for
details).
NOTE: Client certificate authentication is disabled by default.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.activemq.transport.auto.AutoTcpTransportServer
AutoTcpTransportServer.ProtocolInfoNested classes/interfaces inherited from class org.apache.activemq.transport.tcp.TcpTransportServer
org.apache.activemq.transport.tcp.TcpTransportServer.TransportInfo -
Field Summary
Fields inherited from class org.apache.activemq.transport.auto.AutoTcpTransportServer
autoTransportOptions, brokerService, enabledProtocols, maxConnectionThreadPoolSize, newConnectionExecutor, protocolDetectionExecutor, protocolDetectionTimeOut, protocolVerifiers, wireFormatOptionsFields inherited from class org.apache.activemq.transport.tcp.TcpTransportServer
allowLinkStealing, backlog, connectionTimeout, currentTransportCount, dynamicManagement, jmxPort, logWriterName, maximumConnections, maximumConnectionsExceededCount, maxInactivityDuration, maxInactivityDurationInitalDelay, minmumWireFormatVersion, selector, serverSocket, serverSocketFactory, socketBufferSize, socketHandlerThread, socketQueue, soTimeout, startLogging, trace, transportFactory, useQueueForAccept, verifyHostName, wireFormatFactoryFields inherited from class org.apache.activemq.transport.TransportServerSupport
transportOptions -
Constructor Summary
ConstructorsConstructorDescriptionAutoSslTransportServer(org.apache.activemq.transport.tcp.SslTransportFactory transportFactory, URI location, SSLServerSocketFactory serverSocketFactory, BrokerService brokerService, Set<String> enabledProtocols) -
Method Summary
Modifier and TypeMethodDescriptionvoidbind()Binds this socket to the previously specified URI.protected org.apache.activemq.transport.tcp.TcpTransportcreateTransport(Socket socket, org.apache.activemq.wireformat.WireFormat format, org.apache.activemq.transport.tcp.TcpTransportFactory detectedTransportFactory, org.apache.activemq.transport.tcp.TcpTransport.InitBuffer initBuffer) Used to create Transports for this server.booleanReturns whether client authentication should be required.booleanReturns whether client authentication should be requested.booleanvoidsetNeedClientAuth(boolean needAuth) Sets whether client authentication should be required Must be called beforebind()Note: Calling this method clears the wantClientAuth flag in the underlying implementation.voidsetWantClientAuth(boolean wantAuth) Sets whether client authentication should be requested.Methods inherited from class org.apache.activemq.transport.auto.AutoTcpTransportServer
append, configureTransport, detectProtocol, doStop, findTransportFactory, findWireFormatFactory, getMaxConnectionThreadPoolSize, handleSocket, initOpenWireProtocolVerifier, initProtocolVerifiers, isAllProtocols, setAutoTransportOptions, setEnabledProtocols, setMaxConnectionThreadPoolSize, setProtocolDetectionTimeOut, setWireFormatFactory, setWireFormatOptions, waitForProtocolDetectionFinishMethods inherited from class org.apache.activemq.transport.tcp.TcpTransportServer
createTransport, doHandleSocket, doStart, getBacklog, getConnectionTimeout, getCurrentTransportCount, getJmxPort, getLogWriterName, getMaxConnectionExceededCount, getMaximumConnections, getMaxInactivityDuration, getMaxInactivityDurationInitalDelay, getMinmumWireFormatVersion, getSocketAddress, getSocketBufferSize, getSoTimeout, getWireFormatFactory, isAllowLinkStealing, isDynamicManagement, isStartLogging, isTrace, isUseQueueForAccept, resetStatistics, resolveHostName, run, setAllowLinkStealing, setBacklog, setBrokerInfo, setConnectionTimeout, setDynamicManagement, setJmxPort, setLogWriterName, setMaximumConnections, setMaxInactivityDuration, setMaxInactivityDurationInitalDelay, setMinmumWireFormatVersion, setSocketBufferSize, setSoTimeout, setStartLogging, setTrace, setUseQueueForAccept, started, stopped, toStringMethods inherited from class org.apache.activemq.transport.TransportServerThreadSupport
getStackSize, isDaemon, isJoinOnStop, setDaemon, setJoinOnStop, setStackSizeMethods inherited from class org.apache.activemq.transport.TransportServerSupport
getAcceptListener, getBindLocation, getConnectURI, onAcceptError, setAcceptListener, setBindLocation, setConnectURI, setTransportOptionMethods inherited from class org.apache.activemq.util.ServiceSupport
addServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.activemq.Service
start, stop
-
Constructor Details
-
AutoSslTransportServer
public AutoSslTransportServer(org.apache.activemq.transport.tcp.SslTransportFactory transportFactory, URI location, SSLServerSocketFactory serverSocketFactory, BrokerService brokerService, Set<String> enabledProtocols) throws IOException, URISyntaxException - Throws:
IOExceptionURISyntaxException
-
-
Method Details
-
setNeedClientAuth
public void setNeedClientAuth(boolean needAuth) Sets whether client authentication should be required Must be called beforebind()Note: Calling this method clears the wantClientAuth flag in the underlying implementation. -
getNeedClientAuth
public boolean getNeedClientAuth()Returns whether client authentication should be required. -
getWantClientAuth
public boolean getWantClientAuth()Returns whether client authentication should be requested. -
setWantClientAuth
public void setWantClientAuth(boolean wantAuth) Sets whether client authentication should be requested. Must be called beforebind()Note: Calling this method clears the needClientAuth flag in the underlying implementation. -
bind
Binds this socket to the previously specified URI. Overridden to allow for proper handling of needClientAuth.- Overrides:
bindin classorg.apache.activemq.transport.tcp.TcpTransportServer- Throws:
IOException- passed up from TcpTransportServer.
-
createTransport
protected org.apache.activemq.transport.tcp.TcpTransport createTransport(Socket socket, org.apache.activemq.wireformat.WireFormat format, org.apache.activemq.transport.tcp.TcpTransportFactory detectedTransportFactory, org.apache.activemq.transport.tcp.TcpTransport.InitBuffer initBuffer) throws IOException Used to create Transports for this server. Overridden to allow the use of SslTransports (instead of TcpTransports).- Overrides:
createTransportin classAutoTcpTransportServer- Parameters:
socket- The incoming socket that will be wrapped into the new Transport.format- The WireFormat being used.- Returns:
- The newly return (SSL) Transport.
- Throws:
IOException
-
isSslServer
public boolean isSslServer()- Specified by:
isSslServerin interfaceorg.apache.activemq.transport.TransportServer- Overrides:
isSslServerin classorg.apache.activemq.transport.tcp.TcpTransportServer
-