Class RemoteServerEvent
java.lang.Object
net.user1.union.core.event.BaseEvent
net.user1.union.core.event.RemoteServerEvent
- All Implemented Interfaces:
Externalizable
,Serializable
,Event
,RemoteEvent
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:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
This property contains the RoomDef when REMOTE_ROOM_CREATED is dispatched.static final String
Dispatched when a clustered room has been created on a node.static final String
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
ConstructorDescriptionConstructor.RemoteServerEvent
(String nodeID, String roomID) Constructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the ID of the node where the event originated.Returns the ID of the room involved in the event.void
toString()
void
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, wait, wait, wait
Methods inherited from interface net.user1.union.core.event.Event
getProperty, isCanceled, preventDefault
-
Field Details
-
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:
-
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:
-
PROP_ROOMDEF
This property contains the RoomDef when REMOTE_ROOM_CREATED is dispatched.- See Also:
-
-
Constructor Details
-
RemoteServerEvent
public RemoteServerEvent()Constructor. -
RemoteServerEvent
-
RemoteServerEvent
-
-
Method Details
-
getNodeID
Returns the ID of the node where the event originated.- Returns:
- the ID of the node where the event originated
-
getRoomID
Returns the ID of the room involved in the event.- Returns:
- the ID of the room involved in the event
-
toString
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-