ymsg.network.event
Class SessionErrorEvent

Object
  extended byEventObject
      extended bySessionEvent
          extended bySessionErrorEvent
All Implemented Interfaces:
Serializable

public class SessionErrorEvent
extends SessionEvent

Encapsulates a high level error. These are errors reported or caused by Yahoo itself, or this API - not low level problems like network faults.

To get the error message, use getMessage from the parent class.

The service ID can be useful in determining what kind of error this might be. For example, a SERVICE_CONTACTIGNORE error is usually something along the lines of ignoring a user who is already ignored, or attempting to ignore someone on your friends list. These are non-fatal, an can be safely ignored (pun not intended) - although a client may wish to report them to the user.

[1] = this code only used in chat error packets, it seems - meaning unknown!

  getMessage getService getCode
errorPacketReceived y or null y y or -1[1]

Since:
1.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class EventObject
source
 
Constructor Summary
SessionErrorEvent(Object o, String m, int sv)
           
 
Method Summary
 int getCode()
          Returns the error code, as detailed by Yahoo chatrooms.
 int getService()
          Returns the service id of the packet which caused the error.
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class SessionEvent
getFrom, getMessage, getStatus, getTimestamp, getTo
 
Methods inherited from class EventObject
getSource
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SessionErrorEvent

public SessionErrorEvent(Object o,
                         String m,
                         int sv)
Method Detail

getService

public int getService()
Returns the service id of the packet which caused the error. See the interface ServiceConstants.

Returns:
servide id number
Since:
1.0

getCode

public int getCode()
Returns the error code, as detailed by Yahoo chatrooms. The meaning of this code is unknown.

Returns:
servide id number
Since:
1.0

toString

public String toString()
Returns a string representation of this object.

Overrides:
toString in class SessionEvent
Returns:
object as a string
Since:
1.0