Class ProtocolHandlers

java.lang.Object
org.apache.pulsar.broker.protocol.ProtocolHandlers
All Implemented Interfaces:
AutoCloseable

public class ProtocolHandlers extends Object implements AutoCloseable
A collection of loaded handlers.
  • Method Details

    • load

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

      public ProtocolHandler protocol(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 Exception
      Throws:
      Exception
    • getProtocolDataToAdvertise

      public Map<String,String> getProtocolDataToAdvertise()
    • newChannelInitializers

      public Map<String,Map<InetSocketAddress,io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>>> newChannelInitializers()
    • start

      public void start(BrokerService service)
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable