Interface ServiceConnectorManager
public interface ServiceConnectorManager
The service connector manager is responsible for managing service connectors of different types.
-
Method Summary
Modifier and TypeMethodDescription<C extends ServiceConnector>
voidaddLifecycleListener
(String name, ServiceConnector.StateListener<C> listener) Add a lifecycle listener to a service connector.<C extends ServiceConnector>
CgetConnector
(String name) Get a service connector by its type ID and path.<C extends ServiceConnector>
List<C>getConnectors
(String typeId) Get all service connectors of a specific type.<C extends ServiceConnector>
voidremoveLifecycleListener
(String name, ServiceConnector.StateListener<C> listener) Remove a lifecycle listener from a service connector.
-
Method Details
-
getConnector
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
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.
-