Class ProtocolHandlers

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class ProtocolHandlers
    extends java.lang.Object
    implements java.lang.AutoCloseable
    A collection of loaded handlers.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      java.util.Map<java.lang.String,​java.lang.String> getProtocolDataToAdvertise()  
      void initialize​(org.apache.pulsar.broker.ServiceConfiguration conf)  
      static ProtocolHandlers load​(org.apache.pulsar.broker.ServiceConfiguration conf)
      Load the protocol handlers for the given protocol list.
      java.util.Map<java.lang.String,​java.util.Map<java.net.InetSocketAddress,​io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>>> newChannelInitializers()  
      ProtocolHandler protocol​(java.lang.String protocol)
      Return the handler for the provided protocol.
      void start​(BrokerService service)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • load

        public static ProtocolHandlers load​(org.apache.pulsar.broker.ServiceConfiguration conf)
                                     throws java.io.IOException
        Load the protocol handlers for the given protocol list.
        Parameters:
        conf - the pulsar broker service configuration
        Returns:
        the collection of protocol handlers
        Throws:
        java.io.IOException
      • protocol

        public ProtocolHandler protocol​(java.lang.String protocol)
        Return the handler for the provided protocol.
        Parameters:
        protocol - the protocol to use
        Returns:
        the protocol handler to handle the provided protocol
      • initialize

        public void initialize​(org.apache.pulsar.broker.ServiceConfiguration conf)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getProtocolDataToAdvertise

        public java.util.Map<java.lang.String,​java.lang.String> getProtocolDataToAdvertise()
      • newChannelInitializers

        public java.util.Map<java.lang.String,​java.util.Map<java.net.InetSocketAddress,​io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>>> newChannelInitializers()
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable