Interface ServiceConnectorManager


public interface ServiceConnectorManager
The service connector manager is responsible for managing service connectors of different types.
  • Method Details

    • getConnector

      @Nullable <C extends ServiceConnector> C getConnector(String name) throws IllegalArgumentException
      Get a service connector by its type ID and path.
      Parameters:
      name - The name of the service connector.
      Returns:
      The service connector instance. Or null if the service connector does not exist.
      Throws:
      IllegalArgumentException
    • getConnectors

      <C extends ServiceConnector> List<C> getConnectors(String typeId) throws IllegalArgumentException
      Get all service connectors of a specific type.
      Type Parameters:
      C - The type of the service connector.
      Parameters:
      typeId - The type ID of the service connector.
      Returns:
      A collection of service connectors of the specified type.
      Throws:
      IllegalArgumentException - If the type ID is invalid
    • addLifecycleListener

      <C extends ServiceConnector> void addLifecycleListener(String name, ServiceConnector.StateListener<C> listener)
      Add a lifecycle listener to a service connector.
      Type Parameters:
      C - The type of the service connector.
      Parameters:
      name - The name of the service connector.
      listener - The listener to be added.
    • removeLifecycleListener

      <C extends ServiceConnector> void removeLifecycleListener(String name, ServiceConnector.StateListener<C> listener)
      Remove a lifecycle listener from a service connector.
      Type Parameters:
      C - The type of the service connector.
      Parameters:
      name - The name of the service connector.
      listener - The listener to be removed.