public class NetworkEventListener extends Object implements SessionEventHandler
GameRoom to send
NetworkEvents to the connected sessions. When the game room
publishes such events to its channel, this listener will pick it up and
transmit it to the session which in turn will transmit it to the remote
machine/vm.| Modifier and Type | Field and Description |
|---|---|
private static int |
EVENT_TYPE |
private Session |
session |
| Constructor and Description |
|---|
NetworkEventListener(Session session) |
| Modifier and Type | Method and Description |
|---|---|
int |
getEventType() |
Session |
getSession() |
void |
onEvent(Event event)
On event
|
void |
setSession(Session session)
Sets the session instance on this handler.
|
private static final int EVENT_TYPE
private final Session session
public NetworkEventListener(Session session)
public void onEvent(Event event)
EventHandleronEvent in interface EventHandlerpublic int getEventType()
getEventType in interface EventHandlerpublic Session getSession()
getSession in interface SessionEventHandlerpublic void setSession(Session session)
SessionEventHandlersetSession in interface SessionEventHandlersession - The session instance to set.Copyright © 2013. All Rights Reserved.