DRCL J-Sim API

drcl.inet.protocol.cbt
Class CBTPacket

java.lang.Object
  extended bydrcl.DrclObj
      extended bydrcl.inet.protocol.cbt.CBTPacket
All Implemented Interfaces:
CBTConstants, java.lang.Cloneable, ObjectCloneable, ObjectDuplicable, java.io.Serializable

public class CBTPacket
extends DrclObj
implements CBTConstants

Defines the format of the packet used by CBT. The format is simplified from what is defined in RFC2453.

See Also:
Serialized Form

Field Summary
 long[] addrArray
           
 long core
           
 java.lang.Object extension
           
 long group
           
 long lasthop
           
 long requester
           
 int type
           
 
Fields inherited from interface drcl.inet.protocol.cbt.CBTConstants
CONFIRMED, DOWNSTREAM_EXPIRE, ECHO, ECHO_REPLY, ECHO_REQUEST, ECHO_RTX, FLUSH_TREE, INIT, JOIN_ACK, JOIN_REQUEST, JOIN_RTX, JOIN_TIMEOUT, QUIT_NOTIFICATION, QUIT_RTX, QUITTING, STATES, TIMER_TYPES, TRANSIENT, TYPES, UPSTREAM_EXPIRE
 
Constructor Summary
CBTPacket()
           
CBTPacket(int type_, long requester_, long[] addrArray_, long currenthop_, java.lang.Object extension_)
          For echo-request/echo-reply.
CBTPacket(int type_, long requester_, long group_, long core_, long currenthop_, java.lang.Object extension_)
          For all types except echo-request/echo-reply.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this object.
 void duplicate(java.lang.Object source_)
          opies the content of the source_ object to this object.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

public int type

requester

public long requester

lasthop

public long lasthop

group

public long group

core

public long core

addrArray

public long[] addrArray

extension

public java.lang.Object extension
Constructor Detail

CBTPacket

public CBTPacket()

CBTPacket

public CBTPacket(int type_,
                 long requester_,
                 long group_,
                 long core_,
                 long currenthop_,
                 java.lang.Object extension_)
For all types except echo-request/echo-reply.


CBTPacket

public CBTPacket(int type_,
                 long requester_,
                 long[] addrArray_,
                 long currenthop_,
                 java.lang.Object extension_)
For echo-request/echo-reply.

Method Detail

duplicate

public void duplicate(java.lang.Object source_)
Description copied from class: DrclObj
opies the content of the source_ object to this object. he subclass must implement this method to realize DrclObj.clone().

Specified by:
duplicate in interface ObjectDuplicable
Overrides:
duplicate in class DrclObj

clone

public java.lang.Object clone()
Description copied from class: DrclObj
Returns a clone of this object. By default, this method creates an object of the same class and calls DrclObj.duplicate(Object) to duplicate the content of this object to the newly-created one.

This method uses getClass().newInstance() to create new instance. Hence, subclasses need to override this method only if the subclass is not declared as public or does not have explicit no-argument constructor. A subclass may override this method for performance reason.

Specified by:
clone in interface ObjectCloneable
Overrides:
clone in class DrclObj

toString

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

DRCL J-Sim API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~