com.wilko.jaim
Class ChatInTocResponse

java.lang.Object
  |
  +--com.wilko.jaim.TocResponse
        |
        +--com.wilko.jaim.ChatInTocResponse
All Implemented Interfaces:
TocResponseHandler

public class ChatInTocResponse
extends TocResponse
implements TocResponseHandler

This response is delivered to a JaimEventListener when an instant message is received via a chat room


Field Summary
static java.lang.String RESPONSE_TYPE
           
 
Fields inherited from class com.wilko.jaim.TocResponse
cmd
 
Constructor Summary
ChatInTocResponse()
          Creates new TocIMResponse
 
Method Summary
 boolean canHandle(java.lang.String Response)
          Returns true if this response handler can handle the specified response.
 java.lang.String getChatRoomID()
          Obtain the chat room ID
 java.lang.String getFrom()
          Obtain the name of the buddy who sent this instant message
 java.lang.String getMsg()
          Obtain the message
 java.lang.String getResponseType()
          Obtain the response type for response dispatching purposes
 com.wilko.jaim.TocResponse parseString(java.lang.String str)
          Parse an incoming IM response string
 
Methods inherited from class com.wilko.jaim.TocResponse
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESPONSE_TYPE

public static final java.lang.String RESPONSE_TYPE
See Also:
Constant Field Values
Constructor Detail

ChatInTocResponse

public ChatInTocResponse()
Creates new TocIMResponse

Method Detail

getFrom

public java.lang.String getFrom()
Obtain the name of the buddy who sent this instant message

Returns:
The senders name

getMsg

public java.lang.String getMsg()
Obtain the message

Returns:
The message
See Also:
Utils.stripHTML(java.lang.String)

getChatRoomID

public java.lang.String getChatRoomID()
Obtain the chat room ID

Returns:
the chat room ID
See Also:
Utils.stripHTML(java.lang.String)

parseString

public com.wilko.jaim.TocResponse parseString(java.lang.String str)
Parse an incoming IM response string

Specified by:
parseString in interface TocResponseHandler
Parameters:
str - The string to be parsed
Returns:
- A TocResponse object that represents this response

getResponseType

public java.lang.String getResponseType()
Obtain the response type for response dispatching purposes

Specified by:
getResponseType in class TocResponse
Returns:
The response type

canHandle

public boolean canHandle(java.lang.String Response)
Returns true if this response handler can handle the specified response.

Specified by:
canHandle in interface TocResponseHandler
Parameters:
Response - - the response string from TOC. This is the part of the response before the first ':'
Returns:
true if the response can be handled