|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.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 |
SHUTDOWN
Dispatched when the room is shutdown. |
| Constructor Summary | |
|---|---|
RoomEvent(Room room,
Client client,
Message message)
Constructor. |
|
RoomEvent(Room room,
Client client,
Message message,
Attribute attribute)
Constructor. |
|
| Method Summary | |
|---|---|
Attribute |
getAttribute()
In ATTRIBUTE_CHANGED, and ATTRIBUTE_REMOVED events this returns the attribute involved in the event. |
Client |
getClient()
In ADD_CLIENT, REMOVE_CLIENT, ADD_OBSERVER, and REMOVE_OBSERVER 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. |
| 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
| Constructor Detail |
|---|
public RoomEvent(Room room,
Client client,
Message message)
public RoomEvent(Room room,
Client client,
Message message,
Attribute attribute)
| Method Detail |
|---|
public Client getClient()
public Room getRoom()
public Message getMessage()
public Attribute getAttribute()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||