public class DefaultRemoteManagerImplementation extends Object implements RemoteManager
| Modifier and Type | Field and Description |
|---|---|
static String |
UNKNOWN_HOST_NAME
Indicates a hostname that isn't set or known.
|
| Constructor and Description |
|---|
DefaultRemoteManagerImplementation(String name,
String hostAddress,
int listeningPort,
Codec<T> codec,
EventHandler<Throwable> errorHandler,
boolean orderingGuarantee,
int numberOfTries,
int retryTimeout,
LocalAddressProvider localAddressProvider,
TransportFactory tpFactory)
Deprecated.
have an instance injected instead.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
<T> EventHandler<T> |
getHandler(RemoteIdentifier destinationIdentifier,
Class<? extends T> messageType)
Returns a proxy event handler for a remote identifier and a message type.
|
RemoteIdentifier |
getMyIdentifier()
Returns my identifier.
|
AutoCloseable |
registerErrorHandler(EventHandler<Exception> theHandler)
Registers an exception handler and returns a subscription.
|
<T,U extends T> |
registerHandler(Class<U> messageType,
EventHandler<RemoteMessage<T>> theHandler)
Registers an event handler for a message type and returns a subscription.
|
<T,U extends T> |
registerHandler(RemoteIdentifier sourceIdentifier,
Class<U> messageType,
EventHandler<T> theHandler)
Registers an event handler for a remote identifier and a message type and.
|
public static final String UNKNOWN_HOST_NAME
@Deprecated @Inject public DefaultRemoteManagerImplementation(String name, String hostAddress, int listeningPort, Codec<T> codec, EventHandler<Throwable> errorHandler, boolean orderingGuarantee, int numberOfTries, int retryTimeout, LocalAddressProvider localAddressProvider, TransportFactory tpFactory)
public <T> EventHandler<T> getHandler(RemoteIdentifier destinationIdentifier, Class<? extends T> messageType)
getHandler in interface RemoteManagerdestinationIdentifier - a destination identifiermessageType - a message class typepublic <T,U extends T> AutoCloseable registerHandler(RemoteIdentifier sourceIdentifier, Class<U> messageType, EventHandler<T> theHandler)
registerHandler in interface RemoteManagersourceIdentifier - a source identifiermessageType - a message class typetheHandler - the event handlerpublic <T,U extends T> AutoCloseable registerHandler(Class<U> messageType, EventHandler<RemoteMessage<T>> theHandler)
registerHandler in interface RemoteManagermessageType - a message class typetheHandler - the event handlerpublic AutoCloseable registerErrorHandler(EventHandler<Exception> theHandler)
registerErrorHandler in interface RemoteManagertheHandler - the exception event handlerpublic RemoteIdentifier getMyIdentifier()
getMyIdentifier in interface RemoteManagerpublic void close()
close in interface AutoCloseableCopyright © 2015 The Apache Software Foundation. All rights reserved.