ANTS v2.0 API

apps.stats
Class StatsReturnCapsule

java.lang.Object
  |
  +--ants.core.Capsule
        |
        +--ants.core.DataCapsule
              |
              +--apps.stats.StatsReturnCapsule

public class StatsReturnCapsule
extends DataCapsule

Stats return capsule.

Author:
Utah Janos Team

Field Summary
 java.util.Vector branches
           
 long capTime
           
 int infosource
           
 long latency
           
 int nodessentto
           
 int parentnode
           
 
Fields inherited from class ants.core.DataCapsule
dpt, spt, VERSION
 
Fields inherited from class ants.core.Capsule
MAX_TTL
 
Constructor Summary
StatsReturnCapsule()
           
StatsReturnCapsule(int d)
           
StatsReturnCapsule(short sa, short da, int na, ByteArray d)
           
 
Method Summary
 Xdr decode()
          Decode a capsule header from this Capsule's xdr field.
 Xdr encode()
          Return capsule looks like:
4 Address of the actual source of the information
4 Address of the node that requested stats from source node
4 Time capsule this is a response to was sent
4 Latency (0 if latency has yet to be figured)
4 Number of nodes the source of this return sent to
 boolean evaluate(Node n)
          Forwarding function for DataCapsules.
 int length()
          Return length of this data capsule.
 void showInformation(Node n)
          Print out the information that is contained in this capsule
 
Methods inherited from class ants.core.DataCapsule
getData, setData, toString
 
Methods inherited from class ants.core.Capsule
create, encodeCapsuleForSend, findExtension, findMID, findPID, getDst, getPrevious, getSrc, getTTL, prime, setDst
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

infosource

public int infosource

parentnode

public int parentnode

capTime

public long capTime

latency

public long latency

nodessentto

public int nodessentto

branches

public java.util.Vector branches
Constructor Detail

StatsReturnCapsule

public StatsReturnCapsule()

StatsReturnCapsule

public StatsReturnCapsule(int d)

StatsReturnCapsule

public StatsReturnCapsule(short sa,
                          short da,
                          int na,
                          ByteArray d)
Method Detail

length

public int length()
Description copied from class: DataCapsule
Return length of this data capsule.
Overrides:
length in class DataCapsule
Tags copied from class: DataCapsule
See Also:
Capsule.length()

encode

public Xdr encode()
Return capsule looks like:
4 Address of the actual source of the information
4 Address of the node that requested stats from source node
4 Time capsule this is a response to was sent
4 Latency (0 if latency has yet to be figured)
4 Number of nodes the source of this return sent to

The data in the datacapsule contains strings which specify the actual statistics of the node this is returning from

Overrides:
encode in class DataCapsule
Tags copied from class: Capsule
Returns:
the new Xdr representing this capsule.
See Also:
#xdr

decode

public Xdr decode()
Description copied from class: Capsule
Decode a capsule header from this Capsule's xdr field.
Overrides:
decode in class DataCapsule
Tags copied from class: Capsule
Returns:
the new Xdr based on the current xdr.

evaluate

public boolean evaluate(Node n)
Description copied from class: DataCapsule
Forwarding function for DataCapsules. Forwards the capsule to the appropriate application port if the capsule is on its destination node, otherwise forwards the capsule on to its destination node.
Overrides:
evaluate in class DataCapsule
Tags copied from class: Capsule
Parameters:
node - the local node interface
Returns:
an indicationof whether the forwarding was successful.

showInformation

public void showInformation(Node n)
Print out the information that is contained in this capsule

ANTS v2.0 API

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