|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IConnectionService
Service for controlling the lifecycle of IConnectable
s.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
|
Method Summary | |
---|---|
void |
addConnectionServiceListener(ConnectionServiceListener listener)
Registers a lister for notification of events pertaining to this IConnectionService |
void |
connect(java.lang.String configurationId)
Establish a new connection synchronously, using the ConnectionProfile identified by the supplied ID. |
void |
connectAsync(java.lang.String configurationId)
Establishes a new connection asynchronously, using the ConnectionProfile identified by the supplied ID. |
void |
disconnect(java.lang.String categoryId)
Disconnects any {@link IConnectable registered with the supplied connection category ID. |
void |
disconnectAsync(java.lang.String categoryId)
Disconnects any {@link IConnectable registered with the supplied connection category ID. |
IConnectable |
getConnectable(java.lang.String connectionCategoryId)
Returns the IConnectable associated with the supplied connection category ID |
java.util.List<IConnectionCategory> |
getConnectionCategories()
|
ConnectionException |
getConnectionException(java.lang.String currentCategory)
Returns any ConnectionException that occurred for a connection category |
IConnectionManager |
getConnectionManager()
|
IConnectionState |
getConnectionState(ConnectionProfile profile)
Returns an IConnectionState corresponding to the supplied connection profile, or a disconnected state, if
there was no pre-existing state for that connection profile. |
IConnectionState |
getConnectionState(java.lang.String connectionCategoryId)
Retrieve the IConnectionState of a connection category. |
void |
setConnectable(java.lang.String connectionCategoryId,
IConnectable connectable)
Sets the connectable to be used when interacting with a particular connection category. |
void |
signOff()
Asynchronously disconnects from all connected IConnectable s, and unauthenticates all credentials |
Field Detail |
---|
static final java.lang.String COPYRIGHT
Method Detail |
---|
void connect(java.lang.String configurationId)
ConnectionProfile
identified by the supplied ID.
The connection service will determine the IConnectionCategory
for the supplied connection and locate
the IConnectable
for that connection category. If the connectable is already connected, it will be syncronously
disconnected. A new connection will be established, according to the parameters of the supplied ConnectionProfile
by using the IConnectionDescriptor to create an {@link IConnection} class, configuring it by deriving a
{@link ConnectionConfiguration} from the supplied {@link ConnectionParameters} and {@link CredentialsConfiguration},
and connecting to it. This new connection will be set as the active connection for the IConnectable
.
the
- ID of the ConnectionProfile
to use to establish a connection.
java.lang.IllegalArgumentException
- if a ConnectionProfile
with the supplied ID can not be foundfor an asynchronous variant that does not block
void connectAsync(java.lang.String configurationId)
ConnectionProfile
identified by the supplied ID.
The connect is performed asynchronously. See {connect(String)
for a description of the behaviour.
configurationId
- connect(String)
void disconnect(java.lang.String categoryId) throws ConnectionException
categoryId
- the ID of the category to disconnect from
ConnectionException
- if disconnecting failsfor an asynchronous variant
void disconnectAsync(java.lang.String categoryId)
categoryId
- the ID of the category to disconnect fromfor a synchronous variant
IConnectable getConnectable(java.lang.String connectionCategoryId)
IConnectable
associated with the supplied connection category ID
connectionCategoryId
- the connection category ID to find the connectable for
IConnectable
or null
void addConnectionServiceListener(ConnectionServiceListener listener)
IConnectionService
listener
- the ConnectionServiceListener
to registervoid setConnectable(java.lang.String connectionCategoryId, IConnectable connectable)
connectionCategoryId
- the ID of the connection category to assign the connectable forconnectable
- the IConnectable
to assign.void signOff()
IConnectable
s, and unauthenticates all credentials
IConnectionManager getConnectionManager()
IConnectionManager
used to source ConnectionProfile
sConnectionException getConnectionException(java.lang.String currentCategory)
ConnectionException
that occurred for a connection category
currentCategory
- the ID of the connection category to query for
ConnectionException
for that catgory, or null
if the category is not in exception state.IConnectionState getConnectionState(java.lang.String connectionCategoryId)
IConnectionState
of a connection category.
connectionCategoryId
- the ID of the IConnectionCategory
to query for.
IConnectionState
of that category. If the category is unrecognised, the state will represent no connection.java.util.List<IConnectionCategory> getConnectionCategories()
List
of all registered IConnectionCategory
sIConnectionState getConnectionState(ConnectionProfile profile)
IConnectionState
corresponding to the supplied connection profile, or a disconnected state, if
there was no pre-existing state for that connection profile.
profile
- the ConnectionProfile
to retrieve the IConnectionState
for.
IConnectionState
representing the state of the supplied profile.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |