Class BifroMQPluginContext

java.lang.Object
com.baidu.bifromq.plugin.BifroMQPluginContext

public abstract class BifroMQPluginContext extends Object
Provides a base context for custom BifroMQ plugins. This abstract class should be subclassed by developers to create a context for their specific plugin implementation. An instance of this class is created and managed by BifroMQ's plugin manager during the initialization phase of the plugin lifecycle.

Subclasses may override the init() and close() methods to perform initialization and cleanup tasks.

  • Field Details

  • Constructor Details

    • BifroMQPluginContext

      Constructs a new plugin context with the specified descriptor.
      Parameters:
      descriptor - the descriptor that defines this plugin context
  • Method Details

    • init

      protected void init()
      Initializes the plugin context. This method is called during the plugin startup sequence. The default implementation does nothing and can be overridden by subclasses to provide specific behavior.
    • close

      protected void close()
      Cleans up resources used by the plugin context. This method is called during the plugin shutdown sequence. The default implementation does nothing and can be overridden by subclasses to provide specific cleanup behavior.