|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectRvCommand
AbstractRvCmd
A base class for the basic rendezvous format used by all known AIM clients. Provides a simpler way to read and write the RV data as a TLV chain as well as for reading and writing the common "service data block." Also provides a means of writing "header TLV's" before the RV-type-specific
Field Summary |
Fields inherited from class RvCommand |
RVSTATUS_ACCEPT, RVSTATUS_DENY, RVSTATUS_REQUEST |
Constructor Summary | |
protected |
AbstractRvCmd(int rvStatus,
CapabilityBlock cap)
Creates a new outgoing RV command with the given properties. |
protected |
AbstractRvCmd(RecvRvIcbm icbm)
Creates a new RV command from the given incoming rendezvous ICBM command. |
Method Summary | |
protected TlvChain |
getRvTlvs()
Returns the TLV's contained in this rendezvous command's RV data block. |
protected ByteBlock |
getServiceData()
Returns the "service data" block contained in this command, if any. |
protected boolean |
hasServiceData()
Returns whether this RV command's TLV list should contain a "service data block" TLV. |
protected abstract void |
writeHeaderRvTlvs(java.io.OutputStream out)
Writes this RV command's "header TLV's" to the given stream. |
void |
writeRvData(java.io.OutputStream out)
Writes this RV command's "rendezvous data block" to the given stream. |
protected abstract void |
writeRvTlvs(java.io.OutputStream out)
Writes this RV command's list of rendezvous TLV's to the given stream. |
protected void |
writeServiceData(java.io.OutputStream out)
Writes this RV command's "service data block." |
Methods inherited from class RvCommand |
getCapabilityBlock, getRvStatus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected AbstractRvCmd(RecvRvIcbm icbm)
icbm
- an incoming rendezvous ICBM commandprotected AbstractRvCmd(int rvStatus, CapabilityBlock cap)
rvStatus
- the rendezvous status code for this commandcap
- the capability block ("rendezvous type") of this RV commandMethod Detail |
protected final ByteBlock getServiceData()
0x2711
rendezvous
TLV. Note that this will be null
if this command was not
read from an incoming RecvRvIcbm
. This method will also
return null
if this command was read in from an incoming
RV ICBM but contained no service data block.
protected final TlvChain getRvTlvs()
null
if this rendezvous command was not
read from an incoming RecvRvIcbm
but was instead created
manually. This command will not otherwise return null
for
reasons of ease of use. Note that The returned TLV chain may not contain
all of the original TLV's that were received in the incoming RV ICBM; for
example, the returned chain will not contain TLV's of type
0x2711
as that value is extracted and can be retrieved with
a call to getServiceData()
.
public final void writeRvData(java.io.OutputStream out) throws java.io.IOException
RvCommand
writeRvData
in class RvCommand
out
- the stream to which to write
java.io.IOException
- if an I/O error occursprotected abstract void writeHeaderRvTlvs(java.io.OutputStream out) throws java.io.IOException
writeRvTlvs(java.io.OutputStream)
; it
provides a means for subclasses to write a set of TLV's that are present
in all subclasses.
out
- the stream to which to write
java.io.IOException
- if an I/O error occursprotected abstract void writeRvTlvs(java.io.OutputStream out) throws java.io.IOException
out
- the stream to which to write
java.io.IOException
- if an I/O error occursprotected boolean hasServiceData()
false
for an object, writeServiceData
will
never be called on that object. The default implementation of this method
returns true
.
writeServiceData(java.io.OutputStream)
protected void writeServiceData(java.io.OutputStream out) throws java.io.IOException
hasServiceData()
returns false
. The default
implementation of this method does not write any data to the stream.
out
- the stream to which to write
java.io.IOException
- if an I/O error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |