Bees v0.5.0 API

bees.core
Class DataResponseCapsule

java.lang.Object
  |
  +--bees.core.Packet
        |
        +--bees.core.ANEPPacket
              |
              +--bees.core.Capsule
                    |
                    +--bees.core.DataResponseCapsule

public abstract class DataResponseCapsule
extends Capsule

A DataResponseCapsule is the complement of the DataRequestCapsule, it is used to carry the response back to the requesting node.


Constructor Summary
protected DataResponseCapsule()
          Construct an empty DataResponseCapsule.
protected DataResponseCapsule(DataRequestCapsule req, byte[] bytes)
          Construct a DataResponseCapsule with the given values.
 
Method Summary
 void decode(Xdr xdr)
          Decode this Capsule's state from the given Xdr.
 void encode(Xdr xdr)
          Encode this Capsule's state into the given Xdr.
 byte[] getChunkBytes()
           
 int getTotalLength()
           
 boolean merge(DataAggregator da)
          Merge the contents of this response into the given DataAggregator.
 java.lang.String toString()
           
 
Methods inherited from class bees.core.Capsule
addToPool, checkPermission, clone, decodingException, equals, evaluate, evaluate, fromCapsule, fromExternal, getCapsuleID, getFlowDesc, getSession, getSession, getSource, internalDecode, internalEncode, internalReset, reset, skipOptions, specializeCapsule
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataResponseCapsule

protected DataResponseCapsule()
Construct an empty DataResponseCapsule.

DataResponseCapsule

protected DataResponseCapsule(DataRequestCapsule req,
                              byte[] bytes)
Construct a DataResponseCapsule with the given values.
Parameters:
req - The request capsule.
bytes - The complete byte array that should be used to satisfy the request.
Method Detail

getTotalLength

public int getTotalLength()
Returns:
The total length of the byte array being transferred.

getChunkBytes

public byte[] getChunkBytes()
Returns:
The bytes that make up the requested chunks.

decode

public void decode(Xdr xdr)
Description copied from class: Capsule
Decode this Capsule's state from the given Xdr.
Overrides:
decode in class Capsule
See Also:
Capsule.decode(Xdr)

encode

public void encode(Xdr xdr)
Description copied from class: Capsule
Encode this Capsule's state into the given Xdr.
Overrides:
encode in class Capsule
See Also:
Capsule.encode(Xdr)

merge

public boolean merge(DataAggregator da)
Merge the contents of this response into the given DataAggregator.
Parameters:
da - The DataAggregator that should be filled in.
Returns:
True if the contents of DataAggregator has been completed.

toString

public java.lang.String toString()
Overrides:
toString in class Capsule
See Also:
Object.toString()

Bees v0.5.0 API

This documentation is Copyright (C) 2002 The University of Utah. All Rights Reserved. See the individual source files for distribution terms.
Documentation, software, and mailing lists for Bees v0.5.0 can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/