Class SslTransportFactory
- java.lang.Object
-
- org.apache.activemq.transport.TransportFactory
-
- org.apache.activemq.transport.tcp.TcpTransportFactory
-
- org.apache.activemq.transport.tcp.SslTransportFactory
-
- Direct Known Subclasses:
AmqpSslTransportFactory,AutoSslTransportFactory,MQTTSslTransportFactory,StompSslTransportFactory
public class SslTransportFactory extends TcpTransportFactory
An implementation of the TcpTransportFactory using SSL. The major contribution from this class is that it is aware of SslTransportServer and SslTransport classes. All Transports and TransportServers created from this factory will have their needClientAuth option set to false.
-
-
Constructor Summary
Constructors Constructor Description SslTransportFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransportcompositeConfigure(Transport transport, WireFormat format, Map options)Overriding to allow for proper configuration through reflection but delegate to get common configurationprotected ServerSocketFactorycreateServerSocketFactory()Creates a new SSL ServerSocketFactory.protected SocketFactorycreateSocketFactory()Creates a new SSL SocketFactory.protected SslTransportServercreateSslTransportServer(URI location, SSLServerSocketFactory serverSocketFactory)Allows subclasses of SslTransportFactory to create custom instances of SslTransportServer.protected TransportcreateTransport(URI location, WireFormat wf)Overriding to use SslTransports.SslTransportcreateTransport(WireFormat wireFormat, Socket socket, TcpTransport.InitBuffer initBuffer)TransportServerdoBind(URI location)Overriding to use SslTransportServer and allow for proper reflection.-
Methods inherited from class org.apache.activemq.transport.tcp.TcpTransportFactory
createInactivityMonitor, createTcpTransport, createTcpTransportServer, createTransport, isUseInactivityMonitor
-
Methods inherited from class org.apache.activemq.transport.TransportFactory
bind, compositeConnect, compositeConnect, configure, connect, connect, createWireFormat, createWireFormatFactory, doCompositeConnect, doCompositeConnect, doConnect, doConnect, findTransportFactory, getDefaultWireFormatType, getOption, registerTransportFactory, serverConfigure
-
-
-
-
Method Detail
-
doBind
public TransportServer doBind(URI location) throws IOException
Overriding to use SslTransportServer and allow for proper reflection.- Overrides:
doBindin classTcpTransportFactory- Throws:
IOException
-
createSslTransportServer
protected SslTransportServer createSslTransportServer(URI location, SSLServerSocketFactory serverSocketFactory) throws IOException, URISyntaxException
Allows subclasses of SslTransportFactory to create custom instances of SslTransportServer.- Parameters:
location-serverSocketFactory-- Returns:
- a new SslTransportServer initialized from the given location and socket factory.
- Throws:
IOExceptionURISyntaxException
-
compositeConfigure
public Transport compositeConfigure(Transport transport, WireFormat format, Map options)
Overriding to allow for proper configuration through reflection but delegate to get common configuration- Overrides:
compositeConfigurein classTcpTransportFactory- Returns:
-
createTransport
protected Transport createTransport(URI location, WireFormat wf) throws UnknownHostException, IOException
Overriding to use SslTransports.- Overrides:
createTransportin classTcpTransportFactory- Throws:
UnknownHostExceptionIOException
-
createServerSocketFactory
protected ServerSocketFactory createServerSocketFactory() throws IOException
Creates a new SSL ServerSocketFactory. The given factory will use user-provided key and trust managers (if the user provided them).- Overrides:
createServerSocketFactoryin classTcpTransportFactory- Returns:
- Newly created (Ssl)ServerSocketFactory.
- Throws:
IOException
-
createSocketFactory
protected SocketFactory createSocketFactory() throws IOException
Creates a new SSL SocketFactory. The given factory will use user-provided key and trust managers (if the user provided them).- Overrides:
createSocketFactoryin classTcpTransportFactory- Returns:
- Newly created (Ssl)SocketFactory.
- Throws:
IOException
-
createTransport
public SslTransport createTransport(WireFormat wireFormat, Socket socket, TcpTransport.InitBuffer initBuffer) throws IOException
- Overrides:
createTransportin classTcpTransportFactory- Throws:
IOException
-
-