Interface PluginSupportImpl

Describes the interface that all PluginSupport classes must implement.

interface PluginSupportImpl {
    destroy(opts: {
        eventbus: Eventbus;
        eventPrepend: string;
    }): Promise<void>;
    setEventbus(opts: {
        newEventbus: Eventbus;
        newPrepend: string;
        oldEventbus: Eventbus;
        oldPrepend: string;
    }): void;
    setOptions(options: PluginManagerOptions): void;
}
Implemented by

Methods

  • Destroys all managed plugins after unloading them.

    Parameters

    • opts: {
          eventbus: Eventbus;
          eventPrepend: string;
      }

      An options object.

      • eventbus: Eventbus

        The eventbus to disassociate.

      • eventPrepend: string

        The current event prepend.

    Returns Promise<void>

  • Sets the eventbus associated with this plugin manager. If any previous eventbus was associated all plugin manager events will be removed then added to the new eventbus. If there are any existing plugins being managed their events will be removed from the old eventbus and then 'onPluginLoad' will be called with the new eventbus.

    Parameters

    • opts: {
          newEventbus: Eventbus;
          newPrepend: string;
          oldEventbus: Eventbus;
          oldPrepend: string;
      }

      An options object.

      • newEventbus: Eventbus

        The new eventbus to associate.

      • newPrepend: string

        The new event prepend.

      • oldEventbus: Eventbus

        The old eventbus to disassociate.

      • oldPrepend: string

        The old event prepend.

    Returns void

  • Set optional parameters.

    Parameters

    Returns void