public class GWTRemoteEventConnector extends DefaultRemoteEventConnector
Modifier | Constructor and Description |
---|---|
protected |
GWTRemoteEventConnector(EventServiceCreator aGWTEventServiceCreator)
Creates a new RemoteEventConnector with a connection to the corresponding EventService.
|
Modifier and Type | Method and Description |
---|---|
void |
activateStart(Domain aDomain,
EventFilter anEventFilter,
AsyncCallback<Void> aCallback)
Activates the connector for the domain.
|
void |
deactivate(Domain aDomain,
AsyncCallback<Void> aCallback)
Deactivates the connector for the domain (no events can be got from the domain).
|
void |
deactivate(Set<Domain> aDomains,
AsyncCallback<Void> aCallback)
Deactivates the connector for the domains (no events can be got from the domains).
|
void |
deregisterEventFilter(Domain aDomain,
AsyncCallback<Void> aCallback)
Deregisters the
EventFilter for a domain. |
void |
init(AsyncCallback<EventServiceConfigurationTransferable> aCallback)
That method is called to execute the first server call (for initialization).
|
ConnectionStrategyClientConnector |
initListen(EventServiceConfigurationTransferable aConfiguration)
Initializes the listen method implementation with a
ConnectionStrategyClientConnector from the configuration. |
void |
registerEventFilter(Domain aDomain,
EventFilter anEventFilter,
AsyncCallback<Void> aCallback)
Registers an
EventFilter for a domain. |
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. |
void |
sendEvent(Domain aDomain,
Event anEvent,
AsyncCallback<Void> aCallback)
Sends an event to a domain.
|
activate, deactivate, isActive
protected GWTRemoteEventConnector(EventServiceCreator aGWTEventServiceCreator)
aGWTEventServiceCreator
- factory to create the EventService for the connectionpublic void init(AsyncCallback<EventServiceConfigurationTransferable> aCallback)
aCallback
- callbackpublic 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.
That implementation initializes the connection strategy with the EventService
.initListen
in interface RemoteEventConnector
initListen
in class DefaultRemoteEventConnector
aConfiguration
- configurationpublic void activateStart(Domain aDomain, EventFilter anEventFilter, AsyncCallback<Void> aCallback)
EventFilter
to filter events on the server side is optional.activateStart
in class DefaultRemoteEventConnector
aDomain
- domain to activateanEventFilter
- EventFilter to filter the events on the server side (optional)aCallback
- callbackpublic void deactivate(Set<Domain> aDomains, AsyncCallback<Void> aCallback)
aDomains
- domains to deactivateaCallback
- callbackpublic void deactivate(Domain aDomain, AsyncCallback<Void> aCallback)
aDomain
- domain to deactivateaCallback
- callbackpublic void sendEvent(Domain aDomain, Event anEvent, AsyncCallback<Void> aCallback)
DomainFactory.USER_SPECIFIC_DOMAIN
.aDomain
- domainanEvent
- eventaCallback
- 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.registerUnlistenEvent
in interface RemoteEventConnector
registerUnlistenEvent
in class DefaultRemoteEventConnector
anUnlistenScope
- scope of the unlisten events to receiveanUnlistenEvent
- UnlistenEvent
which can contain custom dataaCallback
- callbackpublic void registerEventFilter(Domain aDomain, EventFilter anEventFilter, AsyncCallback<Void> aCallback)
EventFilter
for a domain. That can be used when
the domain is already activated and an EventFilter
is
needed later or isn't available when the domain becomes active.aDomain
- domainanEventFilter
- EventFilter to filter the events on the server side (optional)aCallback
- callbackpublic void deregisterEventFilter(Domain aDomain, AsyncCallback<Void> aCallback)
EventFilter
for a domain.aDomain
- domain to remove the EventFilter fromaCallback
- callbackCopyright © 2012. All Rights Reserved.