org.flexiblepower.messaging
public interface ConnectionManager
ConnectionManager service should be provided by the FPAI runtime. It has the responsibility to connect
ConnectionManager.ManagedEndpoints with each other through Ports that can communicate.| Modifier and Type | Interface and Description |
|---|---|
static interface |
ConnectionManager.EndpointPort
|
static interface |
ConnectionManager.ManagedEndpoint
The wrapper that manages the
Endpoint. |
static interface |
ConnectionManager.PotentialConnection
Represents a potential connection, which is when two
ConnectionManager.EndpointPort mmatch with their Port.sends()
and Port.accepts() definitions. |
| Modifier and Type | Method and Description |
|---|---|
void |
autoConnect()
This method tries to connect all
ConnectionManager.PotentialConnections for which no other options is available. |
ConnectionManager.ManagedEndpoint |
getEndpoint(java.lang.String pid) |
java.util.SortedMap<java.lang.String,? extends ConnectionManager.ManagedEndpoint> |
getEndpoints() |
ConnectionManager.ManagedEndpoint getEndpoint(java.lang.String pid)
pid - The persistent identifier of the endpoint. For Endpoints that are registered using DS, this normally
is the service.pid.ConnectionManager.ManagedEndpoint that manages the ConnectionManager.ManagedEndpoint. This can be used to find possible
connections for that ConnectionManager.ManagedEndpoint.java.util.SortedMap<java.lang.String,? extends ConnectionManager.ManagedEndpoint> getEndpoints()
ConnectionManager.ManagedEndpoints. The keys are the persistent identifiers of the
ConnectionManager.ManagedEndpoints.void autoConnect()
ConnectionManager.PotentialConnections for which no other options is available. This means
that for any unconnected ConnectionManager.EndpointPort with a single cardinality, it tries to determine which
ConnectionManager.PotentialConnections are available. If there is only 1 available and the other ConnectionManager.EndpointPort has
multiple cardinality, or it has single cardinality with no other options, then it will connect these two.