public class DefaultObjectConnection extends Object implements ObjectConnection
| Constructor and Description |
|---|
DefaultObjectConnection(Addressable addressable,
AsyncStoppable stopControl,
OutgoingMethodInvocationHandler outgoing,
IncomingMethodInvocationHandler incoming) |
| Modifier and Type | Method and Description |
|---|---|
void |
addIncoming(Class<?> type,
Dispatch<? super MethodInvocation> dispatch)
Registers a handler for incoming messages on the given type.
|
<T> void |
addIncoming(Class<T> type,
T instance)
Registers a handler for incoming messages on the given type.
|
<T> T |
addOutgoing(Class<T> type)
Creates a transmitter for outgoing messages on the given type.
|
Address |
getLocalAddress() |
Address |
getRemoteAddress() |
void |
requestStop()
Commences a graceful stop of this connection.
|
void |
stop()
Performs a graceful stop of this connection.
|
public DefaultObjectConnection(Addressable addressable, AsyncStoppable stopControl, OutgoingMethodInvocationHandler outgoing, IncomingMethodInvocationHandler incoming)
public Address getRemoteAddress()
getRemoteAddress in interface Addressablepublic Address getLocalAddress()
getLocalAddress in interface Addressablepublic <T> void addIncoming(Class<T> type, T instance)
ObjectConnectionaddIncoming in interface ObjectConnectiontype - The type.instance - The handler instance. Incoming messages on the given type are delivered to this handler.public void addIncoming(Class<?> type, Dispatch<? super MethodInvocation> dispatch)
ObjectConnectionaddIncoming in interface ObjectConnectiontype - The type.dispatch - The handler instance. Incoming messages on the given type are delivered to this handler.public <T> T addOutgoing(Class<T> type)
ObjectConnectionaddOutgoing in interface ObjectConnectiontype - The typepublic void requestStop()
ObjectConnectionrequestStop in interface AsyncStoppablerequestStop in interface ObjectConnectionpublic void stop()
ObjectConnectionstop in interface Stoppablestop in interface ObjectConnectionCopyright © 2013. All rights reserved