com.lyrisoft.chat
Interface ICommands

All Known Implementing Classes:
Client, PrivateChatPanel, CommandProcessorLocal, ChatServerLocal, CommandMakerLocal, SignOnError, Killed, AckKill, AccessDenied, RoomServer, CommandMakerRemote, ChatClient, CommandProcessorRemote, ChatServer, SignOn, Pong, BroadcastPing, EmoteUser, Shutdown, Hello, RemoteClientMessage, SayToUser, Ping, Whois

public interface ICommands

This class describes the protocol between the server and the client. Contained in here are a whole bunch of constants that represent commands going over the wire. A command consists of string arguments separated by DELIMITER. The recipient of a command determines what the command is by looking at the first argument. The first argument will be a string from this class (at least for the core set of commands).

There are two helper classes for creating valid commands (one server, one client).

Note: Consult the protocol documentation instead of this class. It's messy in here.

See Also:
CommandMakerLocal, CommandMakerRemote

Field Summary
static java.lang.String ACCESS_DENIED
           
static java.lang.String ACK_KILL
           
static java.lang.String ALREADY_SIGNED_ON
           
static java.lang.String DELIMITER
          The delimiter.
static java.lang.String EMOTE_TO_ROOM
          "emote" something
static java.lang.String EMOTE_TO_USER
          "emote" something, privately, to only one user
static java.lang.String ERROR
          Indicates an error message that should be displayed by the client
static java.lang.String GET_ROOMS
          Request (or send) a list of the users currently on the server.
static java.lang.String GET_USERS_IN_ROOM
          Request (or send) a list of the users in a particular room.
static java.lang.String GET_USERS_ON_SERVER
          Request (or send) a list of the users currently on the server.
static java.lang.String HELP
          Request help in general or help about a specific command.
static java.lang.String HYPERLINK
           
static java.lang.String IGNORE
          Ignore
static java.lang.String INVALID_CHARACTER
           
static java.lang.String INVITE
          Invite
static java.lang.String JOIN_ROOM
          Join a room.
static java.lang.String JOIN_ROOM_ACK
          Acknowledge that a room was successfully joined.
static java.lang.String KICK
          Kick
static java.lang.String KILL
          Kill
static java.lang.String NO_INVITE
           
static java.lang.String NO_SUCH_USER
           
static java.lang.String OP
           
static java.lang.String PART_ROOM
          Part, or leave, a room.
static java.lang.String PART_ROOM_ACK
          Acknowledge that a room was successfully parted.
static java.lang.String PING
          Ping
static java.lang.String PONG
          Pong
static java.lang.String REMOTE_CLIENT_MESSAGE
           
static java.lang.String ROOM_ACCESS_DENIED
           
static java.lang.String ROOM_DIFF
           
static java.lang.String ROOM_MSG
          Indicates that a message should be displayed on the client as coming from a particular room
static java.lang.String ROOM_USER_DIFF
           
static java.lang.String SAY_TO_ROOM
          "say" something to everybody in a room.
static java.lang.String SAY_TO_USER
          "say" something "privately" to just one user.
static java.lang.String SHUTDOWN
           
static java.lang.String SIGNOFF
          Quit, logout, or exit from the server.
static java.lang.String SIGNON
          Sign on to server.
static java.lang.String SIGNON_ACK
          Acknowledge that thes that a signon was successful
static java.lang.String STATS
          Request server statitics
static java.lang.String UNIGNORE
          Unignore
static java.lang.String UNINVITE
          UnInvite
static java.lang.String USER_DIFF
           
static java.lang.String VERSION
          Version
static java.lang.String WHOIS
          Request some info about a user.
 

Field Detail

DELIMITER

public static final java.lang.String DELIMITER
The delimiter. A tab character.

STATS

public static final java.lang.String STATS
Request server statitics

args: none
acknowledgement: none


SIGNON

public static final java.lang.String SIGNON
Sign on to server.

args: username, (password)
acknowledgement: SIGNON_ACK

See Also:
SIGNON_ACK

SIGNOFF

public static final java.lang.String SIGNOFF
Quit, logout, or exit from the server.

args: none
acknowledgement: the server will hang up


WHOIS

public static final java.lang.String WHOIS
Request some info about a user.

args: userId
acknowledgement: plain text


HELP

public static final java.lang.String HELP
Request help in general or help about a specific command.

args: a specific command (optional) acknowledgement: plain text


VERSION

public static final java.lang.String VERSION
Version

Tell the server about what version of the client this is. This can be a freeform string. The default implementation sends "NFC Classic. Java version - on ". It is suggested that writers of new clients send this command once, after authentication takes place.

args: the version string
acknowledgement: none


KICK

public static final java.lang.String KICK
Kick

Kick somebody out of a room.

args: room, userid, (message)
acknowledgement: a confirmation message


INVITE

public static final java.lang.String INVITE
Invite

Invite somebody to a room.

args: room, userid
acknowledgement: a confirmation message


UNINVITE

public static final java.lang.String UNINVITE
UnInvite

UnInvite somebody from a room.

args: room, userid
acknowledgement: a confirmation message


IGNORE

public static final java.lang.String IGNORE
Ignore

Mute Messages of another User.

args: userid of user to ignore, (message)
acknowledgement: a general message


UNIGNORE

public static final java.lang.String UNIGNORE
Unignore

Unmute Messages of another User.

args: userid of user to remember, (message)
acknowledgement: a general message


SAY_TO_ROOM

public static final java.lang.String SAY_TO_ROOM
"say" something to everybody in a room.

When sent from the client...
args: room, message
acknowledgement: a SAY_TO_ROOM message from the server

When sent from the server...
args: user_who_is_talking, room, message


SAY_TO_USER

public static final java.lang.String SAY_TO_USER
"say" something "privately" to just one user.

When sent from the client...
args: recipient, message
acknowledgement: none

When sent from the server...
args: sender, message


EMOTE_TO_ROOM

public static final java.lang.String EMOTE_TO_ROOM
"emote" something

When sent from the client...
args: room, emote
When sent from the server...
args: sender, room, message

See Also:
ROOM_MSG

EMOTE_TO_USER

public static final java.lang.String EMOTE_TO_USER
"emote" something, privately, to only one user

When sent from the client...
args: recipient, emote
acknowledgement: none

When sent from the server...
args: sender, message


JOIN_ROOM

public static final java.lang.String JOIN_ROOM
Join a room.

When sent from the client...
args: room
acknowledgement: JOIN_ROOM_ACK

When sent from the server...
Denotes that a new user just joined a room, and will only be sent to clients who are currently "in" that room.
args: user, room

See Also:
JOIN_ROOM_ACK

PART_ROOM

public static final java.lang.String PART_ROOM
Part, or leave, a room.

When sent from the client...
args: room
acknowledgement: PART_ROOM_ACK

When sent from the server...
Denotes that a user just left a room, and will only be sent to clients who are currently "in" that room.
args: user, room

See Also:
PART_ROOM_ACK

GET_USERS_IN_ROOM

public static final java.lang.String GET_USERS_IN_ROOM
Request (or send) a list of the users in a particular room.

When sent from the client...
args: room
acknowledgement: GET_USERS_IN_ROOM

When sent from the server...
A response to a client request.
args: room, room, ........


GET_USERS_ON_SERVER

public static final java.lang.String GET_USERS_ON_SERVER
Request (or send) a list of the users currently on the server.

When sent from the client...
args: none
acknowledgement: GET_USERS_ON_SERVER

When sent from the server...
A response to a client request.
args: user, user, ........


GET_ROOMS

public static final java.lang.String GET_ROOMS
Request (or send) a list of the users currently on the server.

When sent from the client...
args: none
acknowledgement: GET_ROOMS

When sent from the server...
A response to a client request.
args: room, number of users, room, number of users, ........


PING

public static final java.lang.String PING
Ping

When sent from the client...
args: current time (milliseconds)
acknowledgement: PONG

When sent from the server...
Notify a user that he is being pinged
args: current time (milliseconds)
acknowledgement: PONG

See Also:
PONG

PONG

public static final java.lang.String PONG
Pong

When sent from the client...
Response to a ping
args: current time (milliseconds)
acknowledgement: none

When sent from the server...
The final reply to a PING
args: current time (milliseconds)
acknowledgement: noe

See Also:
PING

KILL

public static final java.lang.String KILL
Kill

When sent from the client...
Request to kill somebody
args: user to kill
acknowledgment: ACK_KILL

When sent from the server...
Tells you that you have been killed.
args: the user who killed you, a message


ERROR

public static final java.lang.String ERROR
Indicates an error message that should be displayed by the client

args: the message


JOIN_ROOM_ACK

public static final java.lang.String JOIN_ROOM_ACK
Acknowledge that a room was successfully joined.

args: the room
in response to: JOIN_ROOM

See Also:
JOIN_ROOM

PART_ROOM_ACK

public static final java.lang.String PART_ROOM_ACK
Acknowledge that a room was successfully parted.

args: the room
in response to: PART_ROOM

See Also:
PART_ROOM

SIGNON_ACK

public static final java.lang.String SIGNON_ACK
Acknowledge that thes that a signon was successful

args: none
in response to: SIGNON

See Also:
SIGNON

ROOM_MSG

public static final java.lang.String ROOM_MSG
Indicates that a message should be displayed on the client as coming from a particular room

args: room, the message
in response to: EMOTE, any time the server feels like sending a message that logically belongs in a room.

See Also:
EMOTE_TO_ROOM

NO_INVITE

public static final java.lang.String NO_INVITE

ROOM_ACCESS_DENIED

public static final java.lang.String ROOM_ACCESS_DENIED

ALREADY_SIGNED_ON

public static final java.lang.String ALREADY_SIGNED_ON

INVALID_CHARACTER

public static final java.lang.String INVALID_CHARACTER

NO_SUCH_USER

public static final java.lang.String NO_SUCH_USER

ACCESS_DENIED

public static final java.lang.String ACCESS_DENIED

ACK_KILL

public static final java.lang.String ACK_KILL

USER_DIFF

public static final java.lang.String USER_DIFF

ROOM_DIFF

public static final java.lang.String ROOM_DIFF

HYPERLINK

public static final java.lang.String HYPERLINK

SHUTDOWN

public static final java.lang.String SHUTDOWN

REMOTE_CLIENT_MESSAGE

public static final java.lang.String REMOTE_CLIENT_MESSAGE

ROOM_USER_DIFF

public static final java.lang.String ROOM_USER_DIFF

OP

public static final java.lang.String OP


Copyright © 2000-2002 Taso Lyristis