ANTS v2.0 API

apps.stats
Class StatsCapsule

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

public class StatsCapsule
extends Capsule

Stats request capsule.

Author:
Utah Janos Team

Field Summary
 java.util.Vector branches
           
 byte depth
           
 short dpt
           
 long keyid
           
 long now
           
 int rootaddress
           
 
Fields inherited from class ants.core.Capsule
MAX_TTL
 
Constructor Summary
StatsCapsule()
           
StatsCapsule(int d)
           
 
Method Summary
 Xdr decode()
          Decode a capsule header from this Capsule's xdr field.
 Xdr encode()
          Stats request capsules look like:
4 Address of the root of the tree
4 Unique key id of this request tree
2 Application port
1 Depth
4 Time capsule was sent
 boolean evaluate(Node n)
          The forwarding routine for the Capsule.
 int length()
          Return the length of the capsule header that all capsule encodings will include.
 
Methods inherited from class ants.core.Capsule
create, encodeCapsuleForSend, findExtension, findMID, findPID, getDst, getPrevious, getSrc, getTTL, prime, setDst, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rootaddress

public int rootaddress

keyid

public long keyid

dpt

public short dpt

depth

public byte depth

now

public long now

branches

public java.util.Vector branches
Constructor Detail

StatsCapsule

public StatsCapsule()

StatsCapsule

public StatsCapsule(int d)
Method Detail

length

public int length()
Description copied from class: Capsule
Return the length of the capsule header that all capsule encodings will include.
Overrides:
length in class Capsule
Tags copied from class: Capsule
Returns:
the length of the capsule header

encode

public Xdr encode()
Stats request capsules look like:
4 Address of the root of the tree
4 Unique key id of this request tree
2 Application port
1 Depth
4 Time capsule was sent
Overrides:
encode in class Capsule
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 Capsule
Tags copied from class: Capsule
Returns:
the new Xdr based on the current xdr.

evaluate

public boolean evaluate(Node n)
Description copied from class: Capsule
The forwarding routine for the Capsule. This is invoked by the router when a capsule is received.

This method should not access other Java classes, and should only interact with the local system through the local node interface. This routine should "terminate quickly."

XXX perhaps default to forwarding the Capsule?

Overrides:
evaluate in class Capsule
Tags copied from class: Capsule
Parameters:
node - the local node interface
Returns:
an indicationof whether the forwarding was successful.

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/