talx.games.helpdesk
Class HelpDesk
java.lang.Object
talx.model.filters.ReceiverFilterAdapter
talx.games.helpdesk.HelpDesk
- All Implemented Interfaces:
- java.util.EventListener, GameService, ReceiverFilter, ReceiverFilterListener, TALFeature
- public class HelpDesk
- extends ReceiverFilterAdapter
- implements GameService
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
HelpDesk
public HelpDesk(GameManager gm,
TransportToolkit tt,
Settings settings,
java.lang.String params)
- Parameters:
gm - the system's game managersettings - the system's settingsparams - This should be a space delimited set of key=value pairs
where the keys are:
- message.default - The message to display in the initial state
- message.wait - The message to display when the user should wait for a reply.
Any occurances of $m$ will be replaced by the user's last message.
Any occurances of $d$ will be replaced by the date the user sent the message.
Any occurances of $h$ will be replaced by the history message.
- message.history - The history message to add to the wait message.
Any occurances of $m$ will be replaced by the server's last message.
- send-button - The text to place on the send button
- deletebutton - The text to place on the delete button
- caption.default - The caption to display in the composer in the initial state
- caption.reply - The caption to display in the composer when the user should reply
- caption.wait - The caption to display in the reader when the user should wait
- caption.done - The caption to display in the reader when a dialog is finished
- startgame.default - The caption to display in the initial state
- startgame.wait - The caption to display on the start game button when the user should reply
- startgame.reply - The caption to display on the start game when a dialog is finished
- startgame.done - The caption to display on the start game when a dialog is finished
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.
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.
© 2001-2005 University of Oregon.
Eugene OR 97403, U.S.A. All Rights Reserved.