接口 ProxyExtension
- 所有超级接口:
AutoCloseable
The extension interface for support additional extensions on Pulsar Proxy.
-
方法概要
修饰符和类型方法说明booleanVerify if the extension can handle the given extension name.voidclose()Returns the unique extension name.voidinitialize(ProxyConfiguration conf) Initialize the extension when the extension is constructed from reflection.Map<InetSocketAddress,io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>> Create the list of channel initializers for the ports that this extension will listen on.voidstart(ProxyService service) Start the extension with the provided proxy service.
-
方法详细资料
-
extensionName
String extensionName()Returns the unique extension name. For example, `kafka-v2` for extension for Kafka v2 protocol. -
accept
Verify if the extension can handle the given extension name.- 参数:
extension- the extension to verify- 返回:
- true if the extension can handle the given extension name, otherwise false.
-
initialize
Initialize the extension when the extension is constructed from reflection.The initialize should initialize all the resources required for serving the extension but don't start those resources until
start(ProxyService)is called.- 参数:
conf- proxy service configuration- 抛出:
Exception- when fail to initialize the extension.
-
start
Start the extension with the provided proxy service.The proxy service provides the accesses to the Pulsar Proxy components.
- 参数:
service- the broker service to start with.
-
newChannelInitializers
Map<InetSocketAddress,io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>> newChannelInitializers()Create the list of channel initializers for the ports that this extension will listen on.NOTE: this method is called after
start(ProxyService).- 返回:
- the list of channel initializers for the ports that this extension listens on.
-
close
void close()- 指定者:
close在接口中AutoCloseable
-