|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IManagedConnection
Managed connections represent connection instances whose life cycle is managed by the connection profile it is associated with through the connect() and disconnnect() methods on IConnectionProfile. The managed connection object exists throughout the life cycle of the connection profile it is associated with, however it may not always be in a connected state (e.g. getConnection() may return null if the profile is not in a connected state or it may return a connection with an error if an error occurred trying to establish the connection). This allows a consumer to register a listener at anytime. Clients should register a connection listener so that they may be notified of life cycle events specific to this connection (e.g. open, close).
Nested Class Summary | |
---|---|
static interface |
IManagedConnection.ICloneConnectionJob
Interface implemented by the Job used in cloneConnection(IJobChangeListener) . |
Method Summary | |
---|---|
void |
addConnectionListener(IManagedConnectionListener listener)
Adds a connection listener to this object. |
IConnection |
cloneConnection()
Creates a copy of the connection being managed. |
void |
cloneConnection(IJobChangeListener listener)
Creates a copy of the connection being managed. |
void |
fireModifiedEvent(java.lang.Object context)
Used to notify other clients that a change has been made to the server. |
IConnection |
getConnection()
|
java.lang.String |
getFactoryID()
|
boolean |
isConnected()
|
boolean |
isWorkingOffline()
|
void |
removeConnectionListener(IManagedConnectionListener listener)
Removes a connection listener from this object. |
Method Detail |
---|
boolean isConnected()
IConnection getConnection()
java.lang.String getFactoryID()
void addConnectionListener(IManagedConnectionListener listener)
listener
- void removeConnectionListener(IManagedConnectionListener listener)
listener
- void fireModifiedEvent(java.lang.Object context)
context
- the context of the change; may be nullIConnection cloneConnection()
void cloneConnection(IJobChangeListener listener)
IManagedConnection.ICloneConnectionJob.getConnection()
after the Job has finished.
listener
- cannot be nullboolean isWorkingOffline()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |