org.javagroups.protocols
Class PerfHeader

java.lang.Object
  |
  +--org.javagroups.Header
        |
        +--org.javagroups.protocols.PerfHeader
All Implemented Interfaces:
java.lang.Cloneable, java.io.Externalizable, java.io.Serializable

public class PerfHeader
extends Header

Inserted by PERF into each message. Records the time taken by each protocol to process the message to which this header is attached. Travels down through the stack and up the other stack with the message.

Author:
Bela Ban
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.javagroups.Header
HDR_OVERHEAD
 
Constructor Summary
PerfHeader()
           
PerfHeader(java.lang.Object sender, java.lang.Object receiver)
           
 
Method Summary
 void addEntry(java.lang.String prot_name)
          Adds a new entry to both hashtables
static void main(java.lang.String[] args)
           
 java.lang.String printContents(boolean detailed)
           
 java.lang.String printContents(boolean detailed, java.util.Vector prots)
           
 void readExternal(java.io.ObjectInput in)
           
 void setDone(java.lang.String prot_name, int type)
           
 void setEndTime()
           
 void setNetworkReceived()
           
 void setNetworkSent()
           
 void setReceived(java.lang.String prot_name, int type)
           
 long size()
          To be implemented by subclasses.
 java.lang.String toString()
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PerfHeader

public PerfHeader()

PerfHeader

public PerfHeader(java.lang.Object sender,
                  java.lang.Object receiver)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class Header

printContents

public java.lang.String printContents(boolean detailed)

printContents

public java.lang.String printContents(boolean detailed,
                                      java.util.Vector prots)

setEndTime

public void setEndTime()

setReceived

public void setReceived(java.lang.String prot_name,
                        int type)

setDone

public void setDone(java.lang.String prot_name,
                    int type)

setNetworkSent

public void setNetworkSent()

setNetworkReceived

public void setNetworkReceived()

addEntry

public void addEntry(java.lang.String prot_name)
Adds a new entry to both hashtables


writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException

size

public long size()
Description copied from class: Header
To be implemented by subclasses. Return the size of this object for the serialized version of it. I.e. how many bytes this object takes when flattened into a buffer. This may be different for each instance, or can be the same. This may also just be an estimation. E.g. FRAG uses it on Message to determine whether or not to fragment the message. Fragmentation itself will be accurate, because the entire message will actually be serialized into a byte buffer, so we can determine the exact size.

Overrides:
size in class Header

main

public static void main(java.lang.String[] args)


Copyright ? 2001,2002 www.javagroups.com . All Rights Reserved.