server.brickblock.fwimpl
Class BBSession

java.lang.Object
  extended by server.framework.models.AbstractSession<BBPlayer,BBEventHandler>
      extended by server.brickblock.fwimpl.BBSession

public class BBSession
extends AbstractSession<BBPlayer,BBEventHandler>

The BrickBlock implementation of the AbstractSession model. Creates a BBEventHandler instance, and forwards game events to this event handler.

Author:
Eivind Sorteberg

Field Summary
 
Fields inherited from class server.framework.models.AbstractSession
ALIVE_REQUEST_INTERVAL, eventHandler, server
 
Constructor Summary
BBSession(AbstractServer<BBSession,BBPlayer> server, TestModule.TestType testtype)
          Creates a BBSession object by calling the parent class' constructor.
 
Method Summary
protected  BBEventHandler createEventHandler()
          Creates a BBEventHandler instance.
 void notifyAboutEventOccured(Event event, BBPlayer sender, java.lang.Object[] values)
          Forwards game specific events to the event handler.
 
Methods inherited from class server.framework.models.AbstractSession
addPlayer, checkResolution, exit, firePlayerListChanged, firePositionReceived, fireSettingChanged, getAttributes, getId, getMinimumHeight, getMinimumWidth, getName, getPlayers, getScreenResolution, getServer, getSessionPanel, getSettings, getTestType, handleDisconnect, isGameStarted, runTest, sendAction, sendAction, setPlayerPosition, setSessionPanel, startGame, stopGame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BBSession

public BBSession(AbstractServer<BBSession,BBPlayer> server,
                 TestModule.TestType testtype)
Creates a BBSession object by calling the parent class' constructor. Does not add any extra content to the object.

Parameters:
server - The server to which the session belongs.
testtype - The test type, if any.
Method Detail

createEventHandler

protected BBEventHandler createEventHandler()
Creates a BBEventHandler instance.

Specified by:
createEventHandler in class AbstractSession<BBPlayer,BBEventHandler>
Returns:
A BBEventHandler instance.

notifyAboutEventOccured

public void notifyAboutEventOccured(Event event,
                                    BBPlayer sender,
                                    java.lang.Object[] values)
Forwards game specific events to the event handler.

Specified by:
notifyAboutEventOccured in class AbstractSession<BBPlayer,BBEventHandler>
Parameters:
event - The event.
sender - The player that caused the event.
values - Values related to the event.