biz.chitec.qdemo.chat.server
Class DoChatExecutor
java.lang.Object
biz.chitec.quarterback.gjsa.server.CommandExecutor
biz.chitec.qdemo.chat.server.DoChatExecutor
- public class DoChatExecutor
- extends CommandExecutor
The chatting executor itself. This one is active after login of the new chatter. It gives the
opportunity to request all available chatters.
- Version:
- $Id: 401a9f57df45bcceec48f72c92d9df8adf593afa $
- Author:
- chitec/Dirk Hillbrecht 2002. Distributed under the terms of the GNU LGPL.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
chattername
private java.lang.String chattername
- The name of the chatter
chattericon
private byte[] chattericon
DoChatExecutor
public DoChatExecutor(ServerThreadBase thethreadbase,
java.lang.String chatternamex,
byte[] chaticon)
- Construct a DoChatExecutor. This constructor does three steps: First, it initializes its own
state, then it registers its chatter with the main server classe. The third step is the most
advanced: It registers its ServerThreadBase instance with the server's chat message logger
object so that the messages are actually sent through the network connection.
- Parameters:
thethreadbase
- The ServerThreadBase object for this incarnation of the executor.chatternamex
- The name of the chatter as sent by the client.chaticon
- The iconpath to the personal icon.
query
public ServerReply query(ServerRequest sq)
- The query handling method.
- Overrides:
query
in class CommandExecutor
- Parameters:
sq
- The request that has to be handled.
- Returns:
- A reply object.
leavingActions
public void leavingActions()
- Clean up method to be called on disposal of this DoChatExecutor from the server stack. This
method is used for cleaning up internal resources in case of disposal of the executor (e.g.
due to LEAVESTATE or QUIT command or simply due to the connection being closed). This
incarnation removes the receiving ServerThreadBase from the chatmessagelogger's receivers
list. Otherwise, it could not be garbage collected and the server would run out of resources
in the long run.
- Overrides:
leavingActions
in class CommandExecutor