Class ProtocolHandlers
- java.lang.Object
-
- org.apache.pulsar.broker.protocol.ProtocolHandlers
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class ProtocolHandlers extends java.lang.Object implements java.lang.AutoCloseableA collection of loaded handlers.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()java.util.Map<java.lang.String,java.lang.String>getProtocolDataToAdvertise()voidinitialize(org.apache.pulsar.broker.ServiceConfiguration conf)static ProtocolHandlersload(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()ProtocolHandlerprotocol(java.lang.String protocol)Return the handler for the provided protocol.voidstart(BrokerService service)
-
-
-
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()
-
start
public void start(BrokerService service)
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
-