org.flexiblepower.messaging
public interface ConnectionManager
ConnectionManager
service should be provided by the FPAI runtime. It has the responsibility to connect
ConnectionManager.ManagedEndpoint
s with each other through Port
s 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.PotentialConnection s 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.ManagedEndpoint
s. The keys are the persistent identifiers of the
ConnectionManager.ManagedEndpoint
s.void autoConnect()
ConnectionManager.PotentialConnection
s 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.PotentialConnection
s 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.