net.kano.joscar.rv
Class RecvRvEvent

java.lang.Object
  extended byFlapPacketEvent
      extended bySnacPacketEvent
          extended byRecvRvEvent

public class RecvRvEvent
extends SnacPacketEvent

An event that occurs when a new rendezvous command or response is received in a rendezvous session.


Field Summary
static java.lang.Object TYPE_RESPONSE
          An event type indicating that a RV response was received.
static java.lang.Object TYPE_RV
          An event type indicating that a rendezvous command was received.
 
Constructor Summary
protected RecvRvEvent(SnacPacketEvent other, RvProcessor processor, RvSession session, int resultCode)
          Creates a new incoming rendezvous event with the given properties and a type of TYPE_RESPONSE.
protected RecvRvEvent(SnacPacketEvent other, RvProcessor processor, RvSession session, RvCommand command)
          Creates a new incoming rendezvous event with the given properties and a type of TYPE_RV.
 
Method Summary
 RvCommand getRvCommand()
          Returns the RV command that was received, if any.
 java.lang.Object getRvEventType()
          Returns the type of event that this object represents.
 RvProcessor getRvProcessor()
          Returns the RV processor on which the associated RV command/response was received.
 int getRvResponseCode()
          Returns the RV response code that was received, if any.
 RvSession getRvSession()
          Returns the RV session on which the associated RV command/response was received.
 java.lang.String toString()
           
 
Methods inherited from class SnacPacketEvent
getSnacCommand, getSnacPacket, getSnacProcessor
 
Methods inherited from class FlapPacketEvent
getFlapCommand, getFlapPacket, getFlapProcessor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_RV

public static final java.lang.Object TYPE_RV
An event type indicating that a rendezvous command was received.

See Also:
getRvCommand()

TYPE_RESPONSE

public static final java.lang.Object TYPE_RESPONSE
An event type indicating that a RV response was received.

See Also:
getRvResponseCode()
Constructor Detail

RecvRvEvent

protected RecvRvEvent(SnacPacketEvent other,
                      RvProcessor processor,
                      RvSession session,
                      RvCommand command)
Creates a new incoming rendezvous event with the given properties and a type of TYPE_RV.

Parameters:
other - the SNAC packet event on which this event was received
processor - the RV processor on which this event was recieved
session - the RV session on which this event was received
command - the RV command that was received

RecvRvEvent

protected RecvRvEvent(SnacPacketEvent other,
                      RvProcessor processor,
                      RvSession session,
                      int resultCode)
Creates a new incoming rendezvous event with the given properties and a type of TYPE_RESPONSE.

Parameters:
other - the SNAC packet event on which this event was received
processor - the RV processor on which this event was recieved
session - the RV session on which this event was received
resultCode - the result code of the received RV response
Method Detail

getRvEventType

public final java.lang.Object getRvEventType()
Returns the type of event that this object represents. Will be one of TYPE_RV and TYPE_RESPONSE. If TYPE_RV, the value returned by getRvResponseCode() will be -1 and the value returned by getRvCommand() will be non-null. If TYPE_RESPONSE, the converse will be true: the value returned by getRvResponseCode() will not be -1 and the value returned by getRvCommand() will be null.

Returns:
the event type represented by this object

getRvProcessor

public final RvProcessor getRvProcessor()
Returns the RV processor on which the associated RV command/response was received.

Returns:
the RV processor for which this event occurred

getRvSession

public final RvSession getRvSession()
Returns the RV session on which the associated RV command/response was received.

Returns:
the RV session on which this event occurred

getRvCommand

public final RvCommand getRvCommand()
Returns the RV command that was received, if any. Note that this method will return null if this event is not a TYPE_RV event.

Returns:
the RV command that was received, or null if this is not a RV command receipt event

getRvResponseCode

public final int getRvResponseCode()
Returns the RV response code that was received, if any. Note that this method will return -1 if this event is not a TYPE_RESPONSE event.

Returns:
the RV response code that was received, or -1 if this is not a RV response receipt event

toString

public java.lang.String toString()