net.kano.joscar.rvcmd
Class AbstractRejectRvCmd

java.lang.Object
  extended byRvCommand
      extended byAbstractRvCmd
          extended byAbstractRejectRvCmd
Direct Known Subclasses:
AddinsRejectRvCmd, ChatInviteRejectRvCmd, DirectIMRejectRvCmd, FileSendRejectRvCmd, GetFileRejectRvCmd, VoiceRejectRvCmd

public abstract class AbstractRejectRvCmd
extends AbstractRvCmd

A base class for RV "reject" commands, commands with a status code of RvCommand.RVSTATUS_DENY and containing a rejection code.


Field Summary
static int REJECTCODE_CANCELLED
          A rejection code indicating that the user cancelled or denied a rendezvous request.
 
Fields inherited from class RvCommand
RVSTATUS_ACCEPT, RVSTATUS_DENY, RVSTATUS_REQUEST
 
Constructor Summary
protected AbstractRejectRvCmd(CapabilityBlock cap, int rejectionCode)
          Creates a new outgoing rejection RV command with the given properties.
protected AbstractRejectRvCmd(RecvRvIcbm icbm)
          Creates a new rejection RV command from the given incoming rejection RV ICBM command.
 
Method Summary
 int getRejectCode()
          Returns the rejection code contained in this rejection RV command.
 java.lang.String toString()
           
protected  void writeHeaderRvTlvs(java.io.OutputStream out)
          Writes this RV command's "header TLV's" to the given stream.
protected  void writeRvTlvs(java.io.OutputStream out)
          Provides a default implementation for writing this command's RV TLV's.
 
Methods inherited from class AbstractRvCmd
getRvTlvs, getServiceData, hasServiceData, writeRvData, writeServiceData
 
Methods inherited from class RvCommand
getCapabilityBlock, getRvStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REJECTCODE_CANCELLED

public static final int REJECTCODE_CANCELLED
A rejection code indicating that the user cancelled or denied a rendezvous request.

See Also:
Constant Field Values
Constructor Detail

AbstractRejectRvCmd

protected AbstractRejectRvCmd(RecvRvIcbm icbm)
Creates a new rejection RV command from the given incoming rejection RV ICBM command.

Parameters:
icbm - an incoming rejection RV ICBM command

AbstractRejectRvCmd

protected AbstractRejectRvCmd(CapabilityBlock cap,
                              int rejectionCode)
Creates a new outgoing rejection RV command with the given properties.

Parameters:
cap - the capability block associated with this RV command
rejectionCode - the rejection code to send in this RV command
Method Detail

getRejectCode

public final int getRejectCode()
Returns the rejection code contained in this rejection RV command.

Returns:
this RV command's rejection code

writeHeaderRvTlvs

protected final void writeHeaderRvTlvs(java.io.OutputStream out)
                                throws java.io.IOException
Description copied from class: AbstractRvCmd
Writes this RV command's "header TLV's" to the given stream. This method will always be called prior to any call to AbstractRvCmd.writeRvTlvs(java.io.OutputStream); it provides a means for subclasses to write a set of TLV's that are present in all subclasses.

Specified by:
writeHeaderRvTlvs in class AbstractRvCmd
Parameters:
out - the stream to which to write
Throws:
java.io.IOException - if an I/O error occurs

writeRvTlvs

protected void writeRvTlvs(java.io.OutputStream out)
                    throws java.io.IOException
Provides a default implementation for writing this command's RV TLV's. This implementation does not write any RV TLV's to the given stream, as most rejection RV commands contain only one TLV, the associated rejection code.

Specified by:
writeRvTlvs in class AbstractRvCmd
Parameters:
out - the stream to which to write
Throws:
java.io.IOException - if an I/O error occurs

toString

public java.lang.String toString()