net.kano.joscar.snaccmd.icbm
Class AbstractRvIcbm

java.lang.Object
  extended bySnacCommand
      extended byAbstractIcbm
          extended byAbstractRvIcbm
Direct Known Subclasses:
RecvRvIcbm, SendRvIcbm

public abstract class AbstractRvIcbm
extends AbstractIcbm

A base class for the two rendezvous-based ICBM commands provided in this package. The two commands are SendRvIcbm and RecvRvIcbm.


Field Summary
static int RVSTATUS_ACCEPT
          A status code indicating that a rendezvous has been accepted.
static int RVSTATUS_DENY
          A status code indicating that a rendezvous has been denied or cancelled.
static int RVSTATUS_REQUEST
          A status code indicating that this rendezvous ICBM is a request.
 
Fields inherited from class AbstractIcbm
CHANNEL_CHAT, CHANNEL_IM, CHANNEL_RV
 
Fields inherited from class SnacCommand
SNACFLAG_DEFAULT
 
Constructor Summary
protected AbstractRvIcbm(int command, long icbmMessageId, int status, long rvSessionId, CapabilityBlock cap, LiveWritable rvDataWriter)
          Creates a new outgoing rendezvous ICBM command with the given properties.
protected AbstractRvIcbm(int command, long icbmMessageId, long rvSessionId, RvCommand rvCommand)
          Creates a new RV ICBM with the given SNAC command subtype, rendezvous session ID, and the properties of the given RvCommand.
protected AbstractRvIcbm(int command, SnacPacket packet)
          Generates a rendezvous ICBM from the given incoming SNAC packet.
 
Method Summary
 CapabilityBlock getCapability()
          Returns the capability that this rendezvous is using.
 ByteBlock getRvData()
          Returns the rendezvous-specific data in this rendezvous command.
 long getRvSessionId()
          Returns the rendezvous session ID sent in this command.
 int getRvStatus()
          Returns the status code of this rendezvous.
 java.lang.String toString()
           
 
Methods inherited from class AbstractIcbm
getChannel, getChannelData, getIcbmChannel, getIcbmMessageId, writeChannelData, writeData
 
Methods inherited from class SnacCommand
getCommand, getFamily, getFlag1, getFlag2
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RVSTATUS_REQUEST

public static final int RVSTATUS_REQUEST
A status code indicating that this rendezvous ICBM is a request.

See Also:
Constant Field Values

RVSTATUS_ACCEPT

public static final int RVSTATUS_ACCEPT
A status code indicating that a rendezvous has been accepted.

See Also:
Constant Field Values

RVSTATUS_DENY

public static final int RVSTATUS_DENY
A status code indicating that a rendezvous has been denied or cancelled.

See Also:
Constant Field Values
Constructor Detail

AbstractRvIcbm

protected AbstractRvIcbm(int command,
                         SnacPacket packet)
Generates a rendezvous ICBM from the given incoming SNAC packet.

Parameters:
command - the SNAC command subtype of this command
packet - an incoming rendezvous ICBM packet

AbstractRvIcbm

protected AbstractRvIcbm(int command,
                         long icbmMessageId,
                         int status,
                         long rvSessionId,
                         CapabilityBlock cap,
                         LiveWritable rvDataWriter)
Creates a new outgoing rendezvous ICBM command with the given properties.

Parameters:
command - the SNAC command subtype of this command
icbmMessageId - an ICBM message ID to attach to this command
status - a status code, like RVSTATUS_REQUEST
rvSessionId - a rendezvous session ID to attach to this command
cap - the capability block associated with this command
rvDataWriter - an object to write rendezvous-command-specific data

AbstractRvIcbm

protected AbstractRvIcbm(int command,
                         long icbmMessageId,
                         long rvSessionId,
                         RvCommand rvCommand)
Creates a new RV ICBM with the given SNAC command subtype, rendezvous session ID, and the properties of the given RvCommand.

Parameters:
command - the SNAC command subtype for this command
icbmMessageId - an ICBM message ID for this RV ICBM
rvSessionId - this RV ICBM's RV session ID
rvCommand - an RV command whose properties should be used in this RV ICBM
Method Detail

getRvStatus

public final int getRvStatus()
Returns the status code of this rendezvous. Will normally be one of RVSTATUS_REQUEST, RVSTATUS_ACCEPT, and RVSTATUS_DENY.

Returns:
this rendezvous's status code

getRvSessionId

public final long getRvSessionId()
Returns the rendezvous session ID sent in this command. This is normally the ID of the rendezvous session in which this command was sent.

Returns:
this rendezvous's rendezvous session ID

getCapability

public final CapabilityBlock getCapability()
Returns the capability that this rendezvous is using.

Returns:
this rendezvous's associated capability block

getRvData

public final ByteBlock getRvData()
Returns the rendezvous-specific data in this rendezvous command. The contents of this block vary from capability to capability.

Returns:
the rendezvous-specific data

toString

public java.lang.String toString()
Overrides:
toString in class AbstractIcbm