com.wilko.jaim
Class EvilTocResponse

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

public class EvilTocResponse
extends TocResponse
implements TocResponseHandler

An EvilTocResponse is delivered to a JaimEventListener when the signed on buddy is "eviled" or warned


Field Summary
static java.lang.String RESPONSE_TYPE
           
 
Fields inherited from class com.wilko.jaim.TocResponse
cmd
 
Constructor Summary
EvilTocResponse()
          Creates new EvilTocResponse
 
Method Summary
 boolean canHandle(java.lang.String Response)
          Returns true if this response handler can handle the specified response.
 int getEvilAmount()
          Get the evil amount from this response.
 java.lang.String getEvilBy()
          Obtain the name of the buddy that issued the warning.
 java.lang.String getResponseType()
          Used by the response dispatcher
 boolean isAnonymous()
          Obtain the anonymous status of this warning
 com.wilko.jaim.TocResponse parseString(java.lang.String str)
          Parse the evil message from the TOC server
 
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

EvilTocResponse

public EvilTocResponse()
Creates new EvilTocResponse

Method Detail

parseString

public com.wilko.jaim.TocResponse parseString(java.lang.String str)
Parse the evil message from the TOC server

Specified by:
parseString in interface TocResponseHandler
Parameters:
str - The evil message
Returns:
- A TocResponse object that represents this response

getEvilAmount

public int getEvilAmount()
Get the evil amount from this response. This is the current evil or warning level for the authenticated buddy, not the increment specified by the last warning

Returns:
The cumulative evil or warning level

getEvilBy

public java.lang.String getEvilBy()
Obtain the name of the buddy that issued the warning.

Returns:
The buddy name that issued the warning
See Also:
isAnonymous()

isAnonymous

public boolean isAnonymous()
Obtain the anonymous status of this warning

Returns:
true if this warning was issued anonymously

getResponseType

public java.lang.String getResponseType()
Used by the response dispatcher

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