Class AutoSslTransportServer

  • All Implemented Interfaces:
    Runnable, org.apache.activemq.Service, org.apache.activemq.transport.TransportServer, org.apache.activemq.util.ServiceListener

    public class AutoSslTransportServer
    extends AutoTcpTransportServer
    An SSL TransportServer. Allows for client certificate authentication (refer to setNeedClientAuth for details). NOTE: Client certificate authentication is disabled by default.
    • Method Detail

      • setNeedClientAuth

        public void setNeedClientAuth​(boolean needAuth)
        Sets whether client authentication should be required Must be called before bind() 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 before bind() Note: Calling this method clears the needClientAuth flag in the underlying implementation.
      • bind

        public void bind()
                  throws IOException
        Binds this socket to the previously specified URI. Overridden to allow for proper handling of needClientAuth.
        Overrides:
        bind in class org.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:
        createTransport in class AutoTcpTransportServer
        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:
        isSslServer in interface org.apache.activemq.transport.TransportServer
        Overrides:
        isSslServer in class org.apache.activemq.transport.tcp.TcpTransportServer