public abstract class DefaultRemoteEventConnector extends Object implements RemoteEventConnector
Constructor and Description |
---|
DefaultRemoteEventConnector() |
Modifier and Type | Method and Description |
---|---|
void |
activate(Domain aDomain,
EventFilter anEventFilter,
EventNotification anEventNotification,
AsyncCallback<Void> aCallback)
Activates the connector for the domain.
|
protected abstract void |
activateStart(Domain aDomain,
EventFilter anEventFilter,
AsyncCallback<Void> aCallback)
Activates the connector for the domain.
|
void |
deactivate()
Deactivates the connector for all domains (no events can be got from the domains).
|
ConnectionStrategyClientConnector |
initListen(EventServiceConfigurationTransferable aConfiguration)
Initializes the listen method implementation with a
ConnectionStrategyClientConnector from the configuration. |
boolean |
isActive()
Checks if the connector is active (listening).
|
void |
registerUnlistenEvent(UnlistenEventListener.Scope anUnlistenScope,
UnlistenEvent anUnlistenEvent,
AsyncCallback<Void> aCallback)
Registers an
UnlistenEvent to the server side which
will be triggered when a timeout or unlisten/deactivation for a domain occurs. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deactivate, deactivate, deregisterEventFilter, init, registerEventFilter, sendEvent
public DefaultRemoteEventConnector()
public ConnectionStrategyClientConnector initListen(EventServiceConfigurationTransferable aConfiguration)
ConnectionStrategyClientConnector
from the configuration.
That is required to specify the listen / connection strategy. The connection strategy can't be changed, when the listening has already started / an listener was added.initListen
in interface RemoteEventConnector
aConfiguration
- configurationpublic void deactivate()
deactivate
in interface RemoteEventConnector
public boolean isActive()
isActive
in interface RemoteEventConnector
public void activate(Domain aDomain, EventFilter anEventFilter, EventNotification anEventNotification, AsyncCallback<Void> aCallback)
EventFilter
to filter events on the server side is optional.activate
in interface RemoteEventConnector
aDomain
- domain to activateanEventFilter
- EventFilter to filter the events on the server side (optional)anEventNotification
- supports the notification about incoming eventsaCallback
- callbackpublic void registerUnlistenEvent(UnlistenEventListener.Scope anUnlistenScope, UnlistenEvent anUnlistenEvent, AsyncCallback<Void> aCallback)
UnlistenEvent
to the server side which
will be triggered when a timeout or unlisten/deactivation for a domain occurs.
The UnlistenEvent will also be hold at the client side to trigger on local timeouts (for e.g. connection errors).registerUnlistenEvent
in interface RemoteEventConnector
anUnlistenScope
- scope of the unlisten events to receiveanUnlistenEvent
- UnlistenEvent
which can contain custom dataaCallback
- callbackprotected abstract void activateStart(Domain aDomain, EventFilter anEventFilter, AsyncCallback<Void> aCallback)
EventFilter
to filter events on the server side is optional.aDomain
- domain to activateanEventFilter
- EventFilter to filter the events on the server side (optional)aCallback
- callbackCopyright © 2012. All Rights Reserved.