org.bluesock.bluemud.lib
Class Controller

java.lang.Object
  |
  +--org.bluesock.bluemud.lib.MudObject
        |
        +--org.bluesock.bluemud.lib.Controller

public abstract class Controller
extends MudObject

Controllers are responsible for the interpretation of commands received from a User object, as well as the forwarding of game-generated output to the User object. It may be common for a single User object to be serviced by multiple distinct Controller objects over the course of its session. At any one time, however, only one Controller may service a User.


Constructor Summary
Controller()
           
 
Method Summary
abstract  MudObject getControlledObject()
          Return the object being controlled by this Controller instance (for example, the player).
abstract  java.lang.String getUserProperty(java.lang.String propertyName)
          Retrieves a property from the User instance associated with this Controller instance.
abstract  void logout()
          Notify this Controller that the player controlled by this Controller has a desire to logout.
abstract  void noteDisconnect()
          Notify this Controller that the player has disconnected from the system.
abstract  void noteError(java.lang.String errorMessage)
          Notify this Controller that an error has occurred while this was the active Controller.
abstract  void processInput(java.lang.String input)
          Request that this Controller process the given player input.
abstract  void processNawsEvent()
          Request that this Controller process the given Naws request (window resize).
abstract  void setUser(User connectedUser)
          Sets the User object which this Controller is to service.
 
Methods inherited from class org.bluesock.bluemud.lib.MudObject
getObjectID
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Controller

public Controller()
Method Detail

setUser

public abstract void setUser(User connectedUser)
Sets the User object which this Controller is to service.
Parameters:
User - - The User instance to service.

processInput

public abstract void processInput(java.lang.String input)
Request that this Controller process the given player input.
Parameters:
input - - The input to process.

processNawsEvent

public abstract void processNawsEvent()
Request that this Controller process the given Naws request (window resize).

noteDisconnect

public abstract void noteDisconnect()
Notify this Controller that the player has disconnected from the system.

noteError

public abstract void noteError(java.lang.String errorMessage)
Notify this Controller that an error has occurred while this was the active Controller.

getUserProperty

public abstract java.lang.String getUserProperty(java.lang.String propertyName)
Retrieves a property from the User instance associated with this Controller instance.

getControlledObject

public abstract MudObject getControlledObject()
Return the object being controlled by this Controller instance (for example, the player). The MudObject returned from this call will be set as the active object in the driver.

logout

public abstract void logout()
Notify this Controller that the player controlled by this Controller has a desire to logout.


docs generated on Thu Jan 24 08:57:26 CST 2002