cca.net.jostl
Interface TOCListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
TOCAdapter

public interface TOCListener
extends java.util.EventListener

Interface for TOC connection listener


Method Summary
 void adminFormatStatus(int status, java.lang.String[] args)
          Event received when client attempts to change the format of their name
 void adminPasswordStatus(int status, java.lang.String[] args)
          Event received when client attempts to change their password
 void aimError(int error, java.lang.String[] args)
          Error usually happens with bad command parameters, but could sometimes be the server's fault.
 void buddyAdded(TOCBuddy buddy)
          Buddy was added successfully
 void buddyArt(TOCBuddy buddy, java.lang.String unknown)
          Info about a buddy's icon?
 void buddyAway(TOCBuddy buddy)
          Buddy is now away alert
 void buddyListReceived(java.util.Iterator buddies)
          Buddy list was received from the server.
 void buddyRemoved(java.lang.String name)
          buddy removed successfully
 void buddyReturned(TOCBuddy buddy)
          Buddy returned from away status
 void buddySignedOff(TOCBuddy buddy)
          Buddy signed off alert
 void buddySignedOn(TOCBuddy buddy)
          Buddy signed on alert
 void chatroomDropped(java.lang.String chatroomID)
          Client was dropped from chatroom, either kicked, connection dropped, or left
 void chatroomInvite(java.lang.String chatroomID, java.lang.String chatroomName, java.lang.String sender, java.lang.String message)
          Client is being invited to join a chatroom
 void chatroomJoined(java.lang.String chatroomID, java.lang.String chatroomName)
          Client joined a chatroom
 void chatroomMessageReceived(java.lang.String chatroomID, java.lang.String sender, java.lang.String message, boolean whisper)
          Message was received in this chatroom DEPRECATED
 void chatroomMessageReceived(java.lang.String chatroomID, java.lang.String sender, java.lang.String message, boolean whisper, java.lang.String language, java.lang.String unknown)
          Message was received in this chatroom
 void chatroomUpdate(java.lang.String chatroomID, java.lang.String buddy, boolean inside)
          When users enter or leave a chatroom
 void clientEvent(TOCBuddy buddy, int status)
          client event tells a buddy's typing status
 void connected()
          Successfully connected
 void dirStatus(int status, java.lang.String[] args)
          Event received when client attempts to set their directory info
 void disconnected()
          disconnected from server
 void isPaused(boolean state)
          For whatever reason, the server may choose to pause communication.
 void messageReceived(TOCBuddy buddy, java.lang.String message, boolean isBuddy, boolean auto)
          incoming message DEPRECATED
 void messageReceived(TOCBuddy buddy, java.lang.String message, boolean isBuddy, boolean auto, java.lang.String language)
          incoming message
 void rvousPropose(TOCBuddy buddy, java.lang.String UUID, java.lang.String cookie, int seq, java.lang.String rip, java.lang.String pip, java.lang.String vip, java.lang.String port, java.lang.String tlv)
          Someone is proposing a rendezvous to perform a specific action.
 void urlReceived(java.lang.String windowName, java.lang.String url)
          Event received when client requests a user's profile info or directory info Use the server address and port the client connected to, followed by the directory name passed here.
 void warned(TOCBuddy buddy, java.lang.String amount)
          Client has been warned
 

Method Detail

connected

void connected()
Successfully connected


disconnected

void disconnected()
disconnected from server


buddyRemoved

void buddyRemoved(java.lang.String name)
buddy removed successfully

Parameters:
name - the name of the buddy who was removed

messageReceived

void messageReceived(TOCBuddy buddy,
                     java.lang.String message,
                     boolean isBuddy,
                     boolean auto)
incoming message DEPRECATED

Parameters:
buddy - who the message is from
message - the actual message, including html
isBuddy - true if this person is on your buddy list
auto - true if this message is an auto response (away message)

messageReceived

void messageReceived(TOCBuddy buddy,
                     java.lang.String message,
                     boolean isBuddy,
                     boolean auto,
                     java.lang.String language)
incoming message

Parameters:
buddy - who the message is from
message - the actual message, including html
isBuddy - true if this person is on your buddy list
auto - true if this message is an auto response (away message)
language -

clientEvent

void clientEvent(TOCBuddy buddy,
                 int status)
client event tells a buddy's typing status

Parameters:
buddy - who the status refers to
status - 3 possible numbers, refer to the TOCConstants
See Also:
TOCConstants.CLIENT_EVENT_STOPPED, TOCConstants.CLIENT_EVENT_ENTERED, TOCConstants.CLIENT_EVENT_TYPING

buddyArt

void buddyArt(TOCBuddy buddy,
              java.lang.String unknown)
Info about a buddy's icon?

Parameters:
buddy - this response pertains to
unknown - string with a variable length of parameters that appear to be delimited by spaces

buddySignedOn

void buddySignedOn(TOCBuddy buddy)
Buddy signed on alert

Parameters:
buddy -

buddySignedOff

void buddySignedOff(TOCBuddy buddy)
Buddy signed off alert

Parameters:
buddy -

buddyAway

void buddyAway(TOCBuddy buddy)
Buddy is now away alert

Parameters:
buddy -

buddyReturned

void buddyReturned(TOCBuddy buddy)
Buddy returned from away status

Parameters:
buddy -

buddyAdded

void buddyAdded(TOCBuddy buddy)
Buddy was added successfully

Parameters:
buddy -

aimError

void aimError(int error,
              java.lang.String[] args)
Error usually happens with bad command parameters, but could sometimes be the server's fault.

Parameters:
error - the error code
args - optional arguments to go with this error

chatroomJoined

void chatroomJoined(java.lang.String chatroomID,
                    java.lang.String chatroomName)
Client joined a chatroom

Parameters:
chatroomID - id to indentify this chatroom. Needed for other chat commands.
chatroomName - Name of this chatroom

chatroomMessageReceived

void chatroomMessageReceived(java.lang.String chatroomID,
                             java.lang.String sender,
                             java.lang.String message,
                             boolean whisper)
Message was received in this chatroom DEPRECATED

Parameters:
chatroomID - ID for this chatroom
sender - name of who sent this message
message - the message, including html tags
whisper - true if only this client can see the message, false if its a public message.

chatroomMessageReceived

void chatroomMessageReceived(java.lang.String chatroomID,
                             java.lang.String sender,
                             java.lang.String message,
                             boolean whisper,
                             java.lang.String language,
                             java.lang.String unknown)
Message was received in this chatroom

Parameters:
chatroomID - ID for this chatroom
sender - name of who sent this message
message - the message, including html tags
whisper - true if only this client can see the message, false if its a public message.
language -
unknown -

chatroomUpdate

void chatroomUpdate(java.lang.String chatroomID,
                    java.lang.String buddy,
                    boolean inside)
When users enter or leave a chatroom

Parameters:
chatroomID - ID for this chatroom
buddy - name of person whose status changed
inside - true if person joined room, false if left the room

chatroomInvite

void chatroomInvite(java.lang.String chatroomID,
                    java.lang.String chatroomName,
                    java.lang.String sender,
                    java.lang.String message)
Client is being invited to join a chatroom

Parameters:
chatroomID - ID for this chatroom
chatroomName - name for this chatroom
sender - the person who sent the invite
message - optional greeting message

chatroomDropped

void chatroomDropped(java.lang.String chatroomID)
Client was dropped from chatroom, either kicked, connection dropped, or left

Parameters:
chatroomID - ID of chatroom the client left

adminFormatStatus

void adminFormatStatus(int status,
                       java.lang.String[] args)
Event received when client attempts to change the format of their name

Parameters:
status - status code, 0 mean success
args - optional arguments if status is not 0

adminPasswordStatus

void adminPasswordStatus(int status,
                         java.lang.String[] args)
Event received when client attempts to change their password

Parameters:
status - status code, 0 mean success
args - optional arguments if status is not 0

urlReceived

void urlReceived(java.lang.String windowName,
                 java.lang.String url)
Event received when client requests a user's profile info or directory info Use the server address and port the client connected to, followed by the directory name passed here.

Parameters:
windowName - suggested window name to use
url - a directory name

buddyListReceived

void buddyListReceived(java.util.Iterator buddies)
Buddy list was received from the server. This usually happens once just after connection. This list is of all the buddies on a client's buddylist

Parameters:
buddies - an Iterator of TOCBuddy objects

dirStatus

void dirStatus(int status,
               java.lang.String[] args)
Event received when client attempts to set their directory info

Parameters:
status - status code, 0 mean success
args - optional arguments if status is not 0

warned

void warned(TOCBuddy buddy,
            java.lang.String amount)
Client has been warned

Parameters:
person - who warned the client. If null, then warning was anonymous
amount - the client's new warning percentage

isPaused

void isPaused(boolean state)
For whatever reason, the server may choose to pause communication. Any commands sent to the server at that point will be dropped, and sometimes so will the connection. Communication can resume again once it is unpaused.

Parameters:
state - true if communication is pause, false if not

rvousPropose

void rvousPropose(TOCBuddy buddy,
                  java.lang.String UUID,
                  java.lang.String cookie,
                  int seq,
                  java.lang.String rip,
                  java.lang.String pip,
                  java.lang.String vip,
                  java.lang.String port,
                  java.lang.String tlv)
Someone is proposing a rendezvous to perform a specific action. This can be sending of buddy list, file transfer, etc...

Parameters:
buddy - the person who sent the proposal
UUID - action to perform. This is the same as the capabilities UUID's
cookie - cookie used for other communication pertaining to this action
seq - sequence number
rip - IP address to rendezvous at (connect at)
pip - proposer's IP address
vip - proposer's verified IP address
port - port to connect to at rip
tlv - separated by colons and values are base64 encoded