public final class Room extends Object
invokeAndWait(Runnable) to ensure access is correctly synchronized.| Modifier and Type | Class and Description |
|---|---|
static class |
Room.MessageType
Specifies the type of a room message that is sent to a client.
Note: Currently we are sending simple string messages - for production apps, a JSON lib should be used for object-level messages. The number (single char) will be prefixed to the string when sending the message. |
class |
Room.Player
A Player participates in a Room.
|
| Constructor and Description |
|---|
Room() |
| Modifier and Type | Method and Description |
|---|---|
Room.Player |
createAndAddPlayer(Client client)
Creates a Player from the given Client and adds it to this room.
|
void |
invokeAndWait(Runnable task)
Submits the given Runnable to the Room Executor and waits until it
has been executed.
|
void |
shutdown()
Shuts down the roomExecutor and the drawmessageBroadcastTimer.
|
public Room.Player createAndAddPlayer(Client client)
client - the clientpublic void invokeAndWait(Runnable task)
task - public void shutdown()
Copyright © 2015 WSO2 Inc. All rights reserved.