talx x1.0.5

talx.games.helpdesk
Class HelpDesk

java.lang.Object
  extended bytalx.model.filters.ReceiverFilterAdapter
      extended bytalx.games.helpdesk.HelpDesk
All Implemented Interfaces:
java.util.EventListener, GameService, ReceiverFilter, ReceiverFilterListener, TALFeature

public class HelpDesk
extends ReceiverFilterAdapter
implements GameService


Constructor Summary
HelpDesk(GameManager gm, TransportToolkit tt, Settings settings, java.lang.String params)
           
 
Method Summary
 boolean filterMessage(javax.mail.internet.MimeMessage m)
          This method is called by NewMailArrived and OldMailArrived to decide whether to pass the message along.
 java.lang.String getGameType()
          Returns a String representing the type of Game.
 Game newInstance(Player p)
          Returns a new game instance.
 void release()
          Releases all system resources held by this object.
 
Methods inherited from class talx.model.filters.ReceiverFilterAdapter
addFilterListener, filterActivated, fireFilterActivated, fireNewMailEvent, newMailArrived, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HelpDesk

public HelpDesk(GameManager gm,
                TransportToolkit tt,
                Settings settings,
                java.lang.String params)
Parameters:
gm - the system's game manager
settings - the system's settings
params - This should be a space delimited set of key=value pairs where the keys are: The history message only represents the last server message because we assume the people sending server messages will be editing the response messages to include the relevant parts in their replies. That is, the people on the server are expected to make the messages look like conversations, if appropriate.
Method Detail

newInstance

public Game newInstance(Player p)
Description copied from interface: GameService
Returns a new game instance.

Specified by:
newInstance in interface GameService

getGameType

public java.lang.String getGameType()
Description copied from interface: GameService
Returns a String representing the type of Game. Two services that return identical Strings here must also have compatible game states, although they can differ in look and feel details.

Specified by:
getGameType in interface GameService
Returns:
"helpdesk"

release

public void release()
Description copied from interface: TALFeature
Releases all system resources held by this object. The general contract of pluggable features is that once their release method is called, they should be elligible for garbage collection. The exceptions to this are references to this object held in the ActionDispatcher and in the Transport model. Both of those objects are cleared by the system. However, in all other cases, if this object subscribed to a listener interface, it must unsubscribe in this method. This method should block until all object clean-up has been accomplished. This includes closing all open files, etc. Once the object has returned from the release method, the system may go down without further warning.

Specified by:
release in interface TALFeature
Overrides:
release in class ReceiverFilterAdapter

filterMessage

public boolean filterMessage(javax.mail.internet.MimeMessage m)
Description copied from class: ReceiverFilterAdapter
This method is called by NewMailArrived and OldMailArrived to decide whether to pass the message along. Subclasses may wish to have side effects occur in this method as well as the return value.

Specified by:
filterMessage in class ReceiverFilterAdapter
Parameters:
m - The message to be filtered by this method.
Returns:
true if the message should be passed along, false if the message should be dropped.

talx x1.0.5

© 2001-2005 University of Oregon.
Eugene OR 97403, U.S.A. All Rights Reserved.