protected void createAndAddEventHandlers ( PlayerSession playerSession ) { // Create a network event listener for the player session. EventHandler networkEventHandler = new NetworkEventListener ( playerSession ) ; // Add the handler to the game room's EventDispatcher so that it will // pass game room network events to player session session. this . eventDispatcher . addHandler ( networkEventHandler ) ; LOG . trace ( "Added Network handler to " + "EventDispatcher of GameRoom {}, for session: {}" , this , playerSession ) ; }
Method which will create and add event handlers of the player session to the Game Room s EventDispatcher .