接口 ProxyExtension

所有超级接口:
AutoCloseable

@LimitedPrivate @Evolving public interface ProxyExtension extends AutoCloseable
The extension interface for support additional extensions on Pulsar Proxy.
  • 方法概要

    修饰符和类型
    方法
    说明
    boolean
    accept(String extension)
    Verify if the extension can handle the given extension name.
    void
     
    Returns the unique extension name.
    void
    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.
    void
    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

      boolean accept(String extension)
      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

      void initialize(ProxyConfiguration conf) throws Exception
      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

      void start(ProxyService service)
      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