public class NegotiationRoom
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
NegotiationRoom.UserSession |
Modifier and Type | Field and Description |
---|---|
(package private) GameBridgeUtils |
gbu1 |
(package private) GameBridgeUtils |
gbu2 |
(package private) static int |
UNIQUE_ID |
(package private) NegotiationRoom.UserSession |
user1 |
(package private) NegotiationRoom.UserSession |
user2 |
Constructor and Description |
---|
NegotiationRoom() |
Modifier and Type | Method and Description |
---|---|
boolean |
available() |
void |
doSomething() |
void |
exitInNegotiation(javax.servlet.http.HttpSession httpSession) |
void |
exitInWaiting(javax.servlet.http.HttpSession httpSession,
javax.websocket.Session session) |
(package private) void |
finalNotification(javax.servlet.http.HttpSession httpSession)
when one user FORMAL_END the game, notify the other
|
boolean |
findUserByHttpSession(javax.servlet.http.HttpSession httpSession) |
NegotiationRoom.UserSession |
getAdversary(javax.servlet.http.HttpSession httpSession) |
NegotiationRoom.UserSession |
getAdversary(javax.servlet.http.HttpSession httpSession,
javax.websocket.Session session) |
int |
getUID() |
java.lang.String |
getUserString() |
(package private) void |
handleClose(javax.servlet.http.HttpSession httpSession) |
(package private) Event |
preProcessEvent(Event e) |
void |
registerUser(javax.servlet.http.HttpSession httpSession,
javax.websocket.Session session) |
void |
sendToOpponent(javax.servlet.http.HttpSession httpSession,
Event e) |
void |
setGBU(javax.servlet.http.HttpSession httpSession,
GameBridgeUtils gbu) |
void |
transmitMsg(javax.websocket.Session session,
java.lang.String msg) |
void |
updateSocket(javax.servlet.http.HttpSession httpSession,
javax.websocket.Session session) |
static int UNIQUE_ID
NegotiationRoom.UserSession user1
NegotiationRoom.UserSession user2
GameBridgeUtils gbu1
GameBridgeUtils gbu2
public int getUID()
public void transmitMsg(javax.websocket.Session session, java.lang.String msg)
public void setGBU(javax.servlet.http.HttpSession httpSession, GameBridgeUtils gbu)
public void registerUser(javax.servlet.http.HttpSession httpSession, javax.websocket.Session session)
public NegotiationRoom.UserSession getAdversary(javax.servlet.http.HttpSession httpSession, javax.websocket.Session session)
public NegotiationRoom.UserSession getAdversary(javax.servlet.http.HttpSession httpSession)
public void exitInWaiting(javax.servlet.http.HttpSession httpSession, javax.websocket.Session session)
public void exitInNegotiation(javax.servlet.http.HttpSession httpSession)
public boolean available()
public boolean findUserByHttpSession(javax.servlet.http.HttpSession httpSession)
void finalNotification(javax.servlet.http.HttpSession httpSession)
httpSession
- void handleClose(javax.servlet.http.HttpSession httpSession)
public void sendToOpponent(javax.servlet.http.HttpSession httpSession, Event e)
public void updateSocket(javax.servlet.http.HttpSession httpSession, javax.websocket.Session session)
public void doSomething()
public java.lang.String getUserString()