net.user1.union.core.event
Class RemoteServerEvent

java.lang.Object
  extended by net.user1.union.core.event.BaseEvent
      extended by net.user1.union.core.event.RemoteServerEvent
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, Event, RemoteEvent

public class RemoteServerEvent
extends BaseEvent
implements RemoteEvent, java.io.Externalizable

RemoteServerEvent is a simple data class used to pass information from the server to registered event-listeners when a remote server event occurs. The RemoteServerEvent class also defines constants representing the available server events. To register for a remote server event, use the Server class's addRemoteEventListener() method.

See Also:
Serialized Form

Field Summary
static java.lang.String PROP_ROOMDEF
          This property contains the RoomDef when REMOTE_ROOM_CREATED is dispatched.
static java.lang.String REMOTE_ROOM_CREATED
          Dispatched when a clustered room has been created on a node.
static java.lang.String REMOTE_ROOM_REMOVED
          Dispatched when a clustered master room has been removed from a node.
 
Fields inherited from class net.user1.union.core.event.BaseEvent
m_eventProperties
 
Constructor Summary
RemoteServerEvent()
          Constructor.
RemoteServerEvent(java.lang.String nodeID, java.lang.String roomID)
          Constructor.
RemoteServerEvent(java.lang.String nodeID, java.lang.String roomID, java.util.Map<java.lang.String,java.lang.Object> props)
          Constructor.
 
Method Summary
 java.lang.String getNodeID()
          Returns the ID of the node where the event originated.
 java.lang.String getRoomID()
          Returns the ID of the room involved in the event.
 void readExternal(java.io.ObjectInput in)
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class net.user1.union.core.event.BaseEvent
getProperty, isCanceled, preventDefault
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.user1.union.core.event.Event
getProperty, isCanceled, preventDefault
 

Field Detail

REMOTE_ROOM_CREATED

public static final java.lang.String REMOTE_ROOM_CREATED
Dispatched when a clustered room has been created on a node. When the room is automatically created on other nodes (eg. slave room in master-slave) the event will not be dispatched by those nodes.

See Also:
Constant Field Values

REMOTE_ROOM_REMOVED

public static final java.lang.String REMOTE_ROOM_REMOVED
Dispatched when a clustered master room has been removed from a node. The removal of a room in slave mode never causes this event to be dispatched.

See Also:
Constant Field Values

PROP_ROOMDEF

public static final java.lang.String PROP_ROOMDEF
This property contains the RoomDef when REMOTE_ROOM_CREATED is dispatched.

See Also:
Constant Field Values
Constructor Detail

RemoteServerEvent

public RemoteServerEvent()
Constructor.


RemoteServerEvent

public RemoteServerEvent(java.lang.String nodeID,
                         java.lang.String roomID)
Constructor.


RemoteServerEvent

public RemoteServerEvent(java.lang.String nodeID,
                         java.lang.String roomID,
                         java.util.Map<java.lang.String,java.lang.Object> props)
Constructor.

Method Detail

getNodeID

public java.lang.String getNodeID()
Returns the ID of the node where the event originated.

Returns:
the ID of the node where the event originated

getRoomID

public java.lang.String getRoomID()
Returns the ID of the room involved in the event.

Returns:
the ID of the room involved in the event

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException


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