|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IConnectionHandle
An IConnectionHandle
is a handle to an active connection. It provides
services around the connection. Use an IConnectionManager
to get an
IConnectionHandle
.
See the package documentation for examples on usage.
Method Summary | ||
---|---|---|
IConnectionDescriptor |
getDescriptor()
Returns the descriptor that was used to create the connection. |
|
|
getService(java.lang.Class<T> clazz)
Returns a service associated with IConnectionHandle. |
|
boolean |
hasService(java.lang.Class<?> clazz)
Returns true if there is a service registered for the given class |
|
boolean |
isConnected()
Return true if this connection is live. |
|
|
registerService(java.lang.Class<T> clazz,
T serviceObject)
Registers a service with the IConnectionHandle. |
|
|
unregisterService(java.lang.Class<T> clazz)
Unregisters a service with the IConnectionHandle. |
Method Detail |
---|
IConnectionDescriptor getDescriptor()
<T> T getService(java.lang.Class<T> clazz)
clazz
- the class used to register the service.
<T> boolean registerService(java.lang.Class<T> clazz, T serviceObject) throws java.lang.IllegalArgumentException
clazz
- the service class for which to register a service.serviceObject
- the service implementation.
java.lang.IllegalArgumentException
- if a serviceObject does not implement or extend clazz.<T> T unregisterService(java.lang.Class<T> clazz)
clazz
- the class to unregister a service object for.
boolean hasService(java.lang.Class<?> clazz)
clazz
- the service class
boolean isConnected()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |