net.user1.union.core.event
Interface RemoteEventProducer

All Superinterfaces:
EventProducer
All Known Subinterfaces:
Room, Server

public interface RemoteEventProducer
extends EventProducer

A RemoteEventProducer can dispatch events that are re-dispatched by the equivalent objects across the cluster. If a ClusterRole.MASTER room dispatches a remote event it is re-dispatched by each ClusterRole.SLAVE room across the cluster. If a ClusterRole.SLAVE room dispatches a remote event it is re-dispatched by the ClusterRole.MASTER room. If the server dispatches a remote event it is re-dispatched by each server on the cluster.


Method Summary
 void addRemoteEventListener(java.lang.String event, java.lang.Object callbackObject, java.lang.String callbackMethod)
          Adds an event listener to this RemoteEventProducer.
 void dispatchRemoteEvent(java.lang.String eventName, RemoteEvent evt)
          Has the event producer dispatch a remote event.
 void dispatchRemoteEvent(java.lang.String eventName, RemoteEvent evt, java.lang.String nodeID)
          Has the event producer dispatch a remote event to the specified node only.
 java.util.Map<java.lang.String,java.lang.Class<? extends RemoteEvent>> getRemoteEventClassMap()
          Returns a Map of declared remote events dispatched by the RemoteEventProducer keyed by event name and mapped to the remote event class that is dispatched.
 void removeRemoteEventListener(java.lang.String event, java.lang.Object callbackObject, java.lang.String callbackMethod)
          Deregisters an event listener for an event from this RemoteEventProducer.
 
Methods inherited from interface net.user1.union.core.event.EventProducer
addEventListener, dispatchEvent, getEventClassMap, removeEventListener
 

Method Detail

addRemoteEventListener

void addRemoteEventListener(java.lang.String event,
                            java.lang.Object callbackObject,
                            java.lang.String callbackMethod)
Adds an event listener to this RemoteEventProducer.

Parameters:
event - - the event the listener is interested in
callbackObject - - the object which will receive the event notification
callbackMethod - - the method that will be invoked on callbackObject for the event notification

removeRemoteEventListener

void removeRemoteEventListener(java.lang.String event,
                               java.lang.Object callbackObject,
                               java.lang.String callbackMethod)
Deregisters an event listener for an event from this RemoteEventProducer.

Parameters:
event - - the event to longer be listened for
callbackObject - - the object which was receiving the event notification
callbackMethod - - the method that was invoked on callbackObject for the event notification

getRemoteEventClassMap

java.util.Map<java.lang.String,java.lang.Class<? extends RemoteEvent>> getRemoteEventClassMap()
Returns a Map of declared remote events dispatched by the RemoteEventProducer keyed by event name and mapped to the remote event class that is dispatched.

Returns:
a Map of declared events dispatched by the EventProducer

dispatchRemoteEvent

void dispatchRemoteEvent(java.lang.String eventName,
                         RemoteEvent evt)
Has the event producer dispatch a remote event.

Parameters:
eventName - - the name of the event to dispatch
evt - - the remote event Object for the event

dispatchRemoteEvent

void dispatchRemoteEvent(java.lang.String eventName,
                         RemoteEvent evt,
                         java.lang.String nodeID)
Has the event producer dispatch a remote event to the specified node only.

Parameters:
eventName - - the name of the event to dispatch
evt - - the event Object for the event
nodeID - - the nodeID to which the event will be dispatched


Copyright USER1 Subsystems Corporation - Tue Jan 28 2014, 05:05 PM -0500