Helper class to retrieve component connections.
discovery_key: (optional) a key to retrieve the connection from IDiscovery
- ... other connection parameters
connections: alternative to connection
connection params 1: first connection parameters
- ... connection parameters for key 1
connection params N: Nth connection parameters
- ... connection parameters for key N
- *:discovery:*:*:1.0 (optional) IDiscovery services to resolve connections
var config = ConfigParams.fromTuples( 'connection.host', '10.1.1.100', 'connection.port', 8080 ); var connectionResolver = new ConnectionResolver(); connectionResolver.configure(config); connectionResolver.setReferences(references); connection await = connectionResolver.resolve('123') // Now use connection...
- ConnectionResolver([ConfigParams? config, IReferences? references])
- Creates a new instance of connection resolver.
ConnectionParams connection) → void
- Adds a new connection to component connections
ConfigParams config) → void
- Configures component by passing configuration parameters.
) → List< ConnectionParams>
- Gets all connections configured in component configuration.
Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
String? correlationId, ConnectionParams connection) → Future< ConnectionParams>
- Registers the given connection in all referenced discovery services. This method can be used for dynamic service discovery.
String? correlationId) → Future< ConnectionParams?>
- Resolves a single component connection. If connections are configured to be retrieved from Discovery service it finds a IDiscovery and resolves the connection there.
String? correlationId) → Future< List< ConnectionParams>>
- Resolves all component connection. If connections are configured to be retrieved from Discovery service it finds a IDiscovery and resolves the connection there.
IReferences references) → void
- Sets references to dependent components.
) → String
A string representation of this object.