com.lyrisoft.chat.client
Class DumbClient

java.lang.Object
  |
  +--com.lyrisoft.chat.client.DumbClient
All Implemented Interfaces:
IChatClient
Direct Known Subclasses:
Client, LoadTestClient

public abstract class DumbClient
extends java.lang.Object
implements IChatClient

An empty implementation of IChatClient. You can subclass this class and just override the methods you're interested in. com.lyrisoft.chat.test.LoadTestClient is an example implementation, and of course, com.lyrisoft.chat.client.Client is another example. Think of this class like you think of event Adapter classes: You only have to override the methods you're interested in.


Field Summary
protected  java.util.Hashtable _attributes
           
 
Constructor Summary
DumbClient()
           
 
Method Summary
 void ackJoinRoom(java.lang.String room)
          The server has acknowledged our room join
 void ackKill(java.lang.String victim)
          Acknowledgement that we successfully killed somebody
 void ackPartRoom(java.lang.String room)
          The server has acknowledged our room part
 void ackSignon(java.lang.String myName)
          The server has authenticated us and acknowledged our sign on
 void connectionLost()
          The connection to the server was closed
 void emote(java.lang.String from, java.lang.String room, java.lang.String message)
          Indicates that somebody is emoting
 void emoteFromUserPrivate(java.lang.String user, java.lang.String msg)
          The server is indicating that someone is privately emoting something to us.
 void generalError(java.lang.String message)
          The server is giving us an error message to display
 void generalMessage(java.lang.String message)
          The server is giving us a general message to display.
 void generalRoomMessage(java.lang.String room, java.lang.String message)
          The server is giving us a message to display in the context of a particular room.
 java.lang.Object getAttribute(java.lang.String attribute)
          Get the value of an atrribute
 java.util.Properties getProperties(java.lang.String name)
          Load a Properties file from NFC_HOME
 void globalUserList(java.lang.String[] users)
          The server is sending us the global user list
 void killed(java.lang.String killer, java.lang.String msg)
          Indicates that we have been killed.
 void messageFromUser(java.lang.String user, java.lang.String room, java.lang.String msg)
          The server is indicating that someone is saying something in a room
 void messageFromUserPrivate(java.lang.String user, java.lang.String msg)
          The server is indicating that someone is saying something to us, privately
 void ping(java.lang.String user, java.lang.String arg)
          The server is indicating that somebody ping'ed us.
 void pong(java.lang.String user, java.lang.String arg)
          The server is giving us the reply to a ping that we already sent out.
 void roomCreated(java.lang.String room)
          Indicates that a room has been created
 void roomDestroyed(java.lang.String room)
          Indicates that a room has been destroyed
 void roomList(java.lang.String[] roomList)
          The server is sending us a list of rooms
 void roomUserList(java.lang.String room, java.lang.String[] users)
          The server is sending us the user list for a particular room
 void setAttribute(java.lang.String attribute, java.lang.Object value)
          Set any arbitrary attribute
 void userJoinedRoom(java.lang.String user, java.lang.String room)
          The server is indicating that someone just joined a room we're in.
 void userPartedRoom(java.lang.String user, java.lang.String room, boolean signOff)
          The server is indicating that someone just parted a room we're in.
 void userSignOff(java.lang.String userId)
          Indicates that a user has signed off
 void userSignOn(java.lang.String userId)
          Indicates that a user has signed on
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.lyrisoft.chat.client.IChatClient
getServerInterface, init, setApplet, setInitialRoom, showLogin
 

Field Detail

_attributes

protected java.util.Hashtable _attributes
Constructor Detail

DumbClient

public DumbClient()
Method Detail

ackSignon

public void ackSignon(java.lang.String myName)
The server has authenticated us and acknowledged our sign on
Specified by:
ackSignon in interface IChatClient

connectionLost

public void connectionLost()
The connection to the server was closed
Specified by:
connectionLost in interface IChatClient

ackJoinRoom

public void ackJoinRoom(java.lang.String room)
The server has acknowledged our room join
Specified by:
ackJoinRoom in interface IChatClient

ackPartRoom

public void ackPartRoom(java.lang.String room)
The server has acknowledged our room part
Specified by:
ackPartRoom in interface IChatClient

messageFromUser

public void messageFromUser(java.lang.String user,
                            java.lang.String room,
                            java.lang.String msg)
The server is indicating that someone is saying something in a room
Specified by:
messageFromUser in interface IChatClient

messageFromUserPrivate

public void messageFromUserPrivate(java.lang.String user,
                                   java.lang.String msg)
The server is indicating that someone is saying something to us, privately
Specified by:
messageFromUserPrivate in interface IChatClient

emoteFromUserPrivate

public void emoteFromUserPrivate(java.lang.String user,
                                 java.lang.String msg)
The server is indicating that someone is privately emoting something to us.
Specified by:
emoteFromUserPrivate in interface IChatClient
Following copied from interface: com.lyrisoft.chat.client.IChatClient
See Also:
IChatClient.generalRoomMessage(java.lang.String, java.lang.String)

roomList

public void roomList(java.lang.String[] roomList)
The server is sending us a list of rooms
Specified by:
roomList in interface IChatClient

globalUserList

public void globalUserList(java.lang.String[] users)
The server is sending us the global user list
Specified by:
globalUserList in interface IChatClient

roomUserList

public void roomUserList(java.lang.String room,
                         java.lang.String[] users)
The server is sending us the user list for a particular room
Specified by:
roomUserList in interface IChatClient

userJoinedRoom

public void userJoinedRoom(java.lang.String user,
                           java.lang.String room)
The server is indicating that someone just joined a room we're in.
Specified by:
userJoinedRoom in interface IChatClient

userPartedRoom

public void userPartedRoom(java.lang.String user,
                           java.lang.String room,
                           boolean signOff)
The server is indicating that someone just parted a room we're in.
Specified by:
userPartedRoom in interface IChatClient

generalError

public void generalError(java.lang.String message)
The server is giving us an error message to display
Specified by:
generalError in interface IChatClient

generalMessage

public void generalMessage(java.lang.String message)
The server is giving us a general message to display. (This could be a MOTD or the answer to some general request like the /stats command)
Specified by:
generalMessage in interface IChatClient

generalRoomMessage

public void generalRoomMessage(java.lang.String room,
                               java.lang.String message)
The server is giving us a message to display in the context of a particular room. This is commonly an emote message.
Specified by:
generalRoomMessage in interface IChatClient

ping

public void ping(java.lang.String user,
                 java.lang.String arg)
The server is indicating that somebody ping'ed us. It expects to get a pong message back
Specified by:
ping in interface IChatClient

pong

public void pong(java.lang.String user,
                 java.lang.String arg)
The server is giving us the reply to a ping that we already sent out.
Specified by:
pong in interface IChatClient

killed

public void killed(java.lang.String killer,
                   java.lang.String msg)
Indicates that we have been killed.
Specified by:
killed in interface IChatClient
Parameters:
killer - the use who killed us
msg - an explanation of why were have been killed

ackKill

public void ackKill(java.lang.String victim)
Acknowledgement that we successfully killed somebody
Specified by:
ackKill in interface IChatClient

emote

public void emote(java.lang.String from,
                  java.lang.String room,
                  java.lang.String message)
Indicates that somebody is emoting
Specified by:
emote in interface IChatClient

userSignOn

public void userSignOn(java.lang.String userId)
Indicates that a user has signed on
Specified by:
userSignOn in interface IChatClient

userSignOff

public void userSignOff(java.lang.String userId)
Indicates that a user has signed off
Specified by:
userSignOff in interface IChatClient

roomCreated

public void roomCreated(java.lang.String room)
Indicates that a room has been created
Specified by:
roomCreated in interface IChatClient

roomDestroyed

public void roomDestroyed(java.lang.String room)
Indicates that a room has been destroyed
Specified by:
roomDestroyed in interface IChatClient

setAttribute

public void setAttribute(java.lang.String attribute,
                         java.lang.Object value)
Set any arbitrary attribute
Specified by:
setAttribute in interface IChatClient

getAttribute

public java.lang.Object getAttribute(java.lang.String attribute)
Get the value of an atrribute
Specified by:
getAttribute in interface IChatClient

getProperties

public java.util.Properties getProperties(java.lang.String name)
Load a Properties file from NFC_HOME


Copyright © 2000-2002 Taso Lyristis