public class RoomEvent extends BaseEvent
Modifier and Type | Field and Description |
---|---|
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.
|
m_eventProperties
Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
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.
|
getProperty, isCanceled, preventDefault
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
public RoomEvent(Room room, Client client, Message message, Attribute attribute)
public Client getClient()
public Room getRoom()
public Message getMessage()
public Attribute getAttribute()
public UPCMessage getUPCMessage()