de.novanic.eventservice.client.event
Interface RemoteEventConnector

All Known Implementing Classes:
DefaultRemoteEventConnector, GWTRemoteEventConnector

public interface RemoteEventConnector

RemoteEventConnector should handle the connections between client- and the server side.

Author:
sstrohschein
Date: 12.10.2008
Time: 11:16:14

Method Summary
 void activate(Domain aDomain, EventFilter anEventFilter, EventNotification anEventNotification, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> aCallback)
          Activates the connector for the domain.
 void deactivate()
          Deactivates the connector for all domains (no events can be got from the domains).
 void deactivate(Domain aDomain, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> aCallback)
          Deactivates the connector for the domain (no events can be got from the domain).
 void deactivate(java.util.Set<Domain> aDomains, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> aCallback)
          Deactivates the connector for the domains (no events can be got from the domains).
 void deregisterEventFilter(Domain aDomain, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> aCallback)
          Deregisters the EventFilter for a domain.
 void init(com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> aCallback)
          That method is called to execute the first server call (for initialization).
 boolean isActive()
          Checks if the connector is active (listening).
 void registerEventFilter(Domain aDomain, EventFilter anEventFilter, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> aCallback)
          Registers an EventFilter for a domain.
 void registerUnlistenEvent(UnlistenEventListener.Scope anUnlistenScope, UnlistenEvent anUnlistenEvent, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> aCallback)
          Registers an UnlistenEvent to the server side which will be triggered when a timeout or unlisten/deactivation for a domain occurs.
 

Method Detail

init

void init(com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> aCallback)
That method is called to execute the first server call (for initialization).

Parameters:
aCallback - callback

activate

void activate(Domain aDomain,
              EventFilter anEventFilter,
              EventNotification anEventNotification,
              com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> aCallback)
Activates the connector for the domain. An EventFilter to filter events on the server side is optional.

Parameters:
aDomain - domain to activate
anEventFilter - EventFilter to filter the events on the server side (optional)
anEventNotification - supports the notification about incoming events
aCallback - callback

deactivate

void deactivate()
Deactivates the connector for all domains (no events can be got from the domains).


deactivate

void deactivate(java.util.Set<Domain> aDomains,
                com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> aCallback)
Deactivates the connector for the domains (no events can be got from the domains).

Parameters:
aDomains - domains to deactivate
aCallback - callback

deactivate

void deactivate(Domain aDomain,
                com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> aCallback)
Deactivates the connector for the domain (no events can be got from the domain).

Parameters:
aDomain - domain to deactivate
aCallback - callback

isActive

boolean isActive()
Checks if the connector is active (listening).

Returns:
true when active/listening, otherwise false

registerUnlistenEvent

void registerUnlistenEvent(UnlistenEventListener.Scope anUnlistenScope,
                           UnlistenEvent anUnlistenEvent,
                           com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> aCallback)
Registers an UnlistenEvent to the server side which will be triggered when a timeout or unlisten/deactivation for a domain occurs.

Parameters:
anUnlistenScope - scope of the unlisten events to receive
anUnlistenEvent - UnlistenEvent which can contain custom data
aCallback - callback

registerEventFilter

void registerEventFilter(Domain aDomain,
                         EventFilter anEventFilter,
                         com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> aCallback)
Registers an 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.

Parameters:
aDomain - domain
anEventFilter - EventFilter to filter the events on the server side (optional)
aCallback - callback

deregisterEventFilter

void deregisterEventFilter(Domain aDomain,
                           com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> aCallback)
Deregisters the EventFilter for a domain.

Parameters:
aDomain - domain to remove the EventFilter from
aCallback - callback