Package ai.wanaku.core.mcp.providers
Interface ServiceRegistry
public interface ServiceRegistry
Defines a registry of downstream services
-
Method Summary
Modifier and TypeMethodDescriptionvoidderegister(String service, ServiceType serviceType) De-register a service from the registrygetEntries(ServiceType serviceType) Get a map of all registered services and their configurationsgetService(String service) Gets a registered service by nameGets the state of the given servicevoidregister(ServiceTarget serviceTarget, Map<String, String> configurations) Register a service target in the registryvoidSaves the current state of the servicevoid
-
Method Details
-
register
Register a service target in the registry- Parameters:
serviceTarget- the service targetconfigurations- any configurations applicable for the service
-
deregister
De-register a service from the registry- Parameters:
service- the service name
-
getService
Gets a registered service by name- Parameters:
service- the name of the service- Returns:
- the service instance or null if not found
-
saveState
Saves the current state of the service- Parameters:
service- the service to save the statehealthy- whether it is healthy (true for healthy, false otherwise)message- Optional state message (ignored if healthy)
-
getState
Gets the state of the given service- Parameters:
service- the service namecount- the number of states to get- Returns:
- the last count states of the given service
-
getEntries
Get a map of all registered services and their configurations- Parameters:
serviceType- the type of service to get- Returns:
- a map of all registered services and their configurations
-
update
-