net.kano.joscar.net
Class ClientConnEvent

java.lang.Object
  extended byClientConnEvent

public class ClientConnEvent
extends java.lang.Object

An event fired upon a change in the connection state of an AbstractClientConn.


Constructor Summary
protected ClientConnEvent(ClientConn conn, ClientConn.State oldState, ClientConn.State newState, java.lang.Object reason)
          Creates a new event representing a state change on the given connection.
 
Method Summary
 ClientConn getClientConn()
          Returns the connection that fired this event.
 ClientConn.State getNewState()
          Returns the new state of the connection that fired this event.
 ClientConn.State getOldState()
          Returns the previous state of the connection that fired this event.
 java.lang.Object getReason()
          Returns an object representing a reason, description, or explanation for why this state change occurred, or null to represent an implied reason or lack of information as to why it happened.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientConnEvent

protected ClientConnEvent(ClientConn conn,
                          ClientConn.State oldState,
                          ClientConn.State newState,
                          java.lang.Object reason)
Creates a new event representing a state change on the given connection.

Parameters:
conn - the connection firing this event
oldState - the previous state of the given connection
newState - the new state of the given connection
reason - a reason, description, or explanation for the state change, or null to indicate an implied reason or no reason at all
Method Detail

getClientConn

public final ClientConn getClientConn()
Returns the connection that fired this event.

Returns:
the connection whose state changed

getOldState

public final ClientConn.State getOldState()
Returns the previous state of the connection that fired this event.

Returns:
the previous state of the connection that fired this event

getNewState

public final ClientConn.State getNewState()
Returns the new state of the connection that fired this event.

Returns:
the new state of the connection that fired this event

getReason

public final java.lang.Object getReason()
Returns an object representing a reason, description, or explanation for why this state change occurred, or null to represent an implied reason or lack of information as to why it happened.

Returns:
an object representing a reason, description, or explanation for why this state change occurred