|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.user1.union.core.event.BaseEvent net.user1.union.core.event.RoomEvent
public class RoomEvent
RoomEvent is a simple data class used to pass information from a room to registered event-listeners when a room event occurs. The RoomEvent class also defines constants representing the available room events. To register for a room event, use the Room class's addEventListener() method.
Field Summary | |
---|---|
static java.lang.String |
ADD_CLIENT
Dispatched when a client has joined the room. |
static java.lang.String |
ADD_OBSERVER
Dispatched when a client observes the room. |
static java.lang.String |
ATTRIBUTE_CHANGED
Dispatched when a room attribute changes. |
static java.lang.String |
ATTRIBUTE_REMOVED
Dispatched when a room attribute is removed. |
static java.lang.String |
INIT
Dispatched when the underlying room has been initialized. |
static java.lang.String |
JOIN_ROOM_REQUESTED
Dispatched when a client requests to join a room. |
static java.lang.String |
MODULE_MESSAGE
Dispatched when a message has arrived for the modules attached to the room. |
static java.lang.String |
NUM_CLIENTS_CHANGED
Dispatched when the number of clients in the room changes. |
static java.lang.String |
OBSERVE_ROOM_REQUESTED
Dispatched when a client requests to observe room. |
static java.lang.String |
REMOVE_CLIENT
Dispatched when a client leaves the room. |
static java.lang.String |
REMOVE_OBSERVER
Dispatched when a client stops observing the room. |
static java.lang.String |
ROOM_MESSAGE
Dispatched when a client has sent a message to all other clients in the room. |
static java.lang.String |
SHUTDOWN
Dispatched when the room is shutdown. |
Fields inherited from class net.user1.union.core.event.BaseEvent |
---|
m_eventProperties |
Constructor Summary | |
---|---|
RoomEvent(Room room,
Client client,
Message message)
Constructor. |
|
RoomEvent(Room room,
Client client,
Message message,
Attribute attribute)
Constructor. |
|
RoomEvent(Room room,
Client client,
Message message,
Attribute attribute,
UPCMessage upcMessage)
|
Method Summary | |
---|---|
Attribute |
getAttribute()
In ATTRIBUTE_CHANGED, and ATTRIBUTE_REMOVED events this returns the attribute involved in the event. |
Client |
getClient()
In MODULE_MESSAGE, ADD_CLIENT, REMOVE_CLIENT, ADD_OBSERVER, and REMOVE_OBSERVER, ROOM_MESSAGE events this returns the client involved in the event. |
Message |
getMessage()
In MODULE_MESSAGE event this returns the message involved in the event. |
Room |
getRoom()
For all events this returns the room involved in the event. |
UPCMessage |
getUPCMessage()
In ROOM_MESSAGE events this returns UPCMessage (u1) that initiated the event. |
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 |
Field Detail |
---|
public static final java.lang.String INIT
public static final java.lang.String JOIN_ROOM_REQUESTED
public static final java.lang.String ADD_CLIENT
public static final java.lang.String REMOVE_CLIENT
public static final java.lang.String NUM_CLIENTS_CHANGED
public static final java.lang.String SHUTDOWN
public static final java.lang.String ATTRIBUTE_CHANGED
public static final java.lang.String ATTRIBUTE_REMOVED
public static final java.lang.String OBSERVE_ROOM_REQUESTED
public static final java.lang.String ADD_OBSERVER
public static final java.lang.String REMOVE_OBSERVER
public static final java.lang.String MODULE_MESSAGE
public static final java.lang.String ROOM_MESSAGE
Constructor Detail |
---|
public RoomEvent(Room room, Client client, Message message)
public RoomEvent(Room room, Client client, Message message, Attribute attribute)
public RoomEvent(Room room, Client client, Message message, Attribute attribute, UPCMessage upcMessage)
Method Detail |
---|
public Client getClient()
public Room getRoom()
public Message getMessage()
public Attribute getAttribute()
public UPCMessage getUPCMessage()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |