Interface IDiscovery
- All Known Implementing Classes:
MemoryDiscovery
public interface IDiscovery
Interface for discovery services which are used to store and resolve connection parameters
to connect to external services.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidregister(String correlationId, String key, ConnectionParams connection) Registers connection parameters into the discovery service.resolveAll(String correlationId, String key) Resolves all connection parameters by their key.resolveOne(String correlationId, String key) Resolves a single connection parameters by its key.
-
Method Details
-
register
void register(String correlationId, String key, ConnectionParams connection) throws org.pipservices3.commons.errors.ApplicationException Registers connection parameters into the discovery service.- Parameters:
correlationId- (optional) transaction id to trace execution through call chain.key- a key to uniquely identify the connection parameters.connection- a connection to be registered.- Throws:
org.pipservices3.commons.errors.ApplicationException- when registration fails for whatever reasons
-
resolveOne
ConnectionParams resolveOne(String correlationId, String key) throws org.pipservices3.commons.errors.ApplicationException Resolves a single connection parameters by its key.- Parameters:
correlationId- (optional) transaction id to trace execution through call chain.key- a key to uniquely identify the connection.- Returns:
- a resolved connection.
- Throws:
org.pipservices3.commons.errors.ApplicationException- when resolution failed for whatever reasons.
-
resolveAll
List<ConnectionParams> resolveAll(String correlationId, String key) throws org.pipservices3.commons.errors.ApplicationException Resolves all connection parameters by their key.- Parameters:
correlationId- (optional) transaction id to trace execution through call chain.key- a key to uniquely identify the connections.- Returns:
- a list with resolved connections.
- Throws:
org.pipservices3.commons.errors.ApplicationException- when resolution failed for whatever reasons.
-