dist1.acb.common.transport
Class Packet

java.lang.Object
  extended bydist1.acb.common.transport.Packet
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Request, Response

public abstract class Packet
extends java.lang.Object
implements java.io.Serializable

A packet - base class for all transfered messages

Version:
$Revision: 1.7 $
Author:
Alexander Stasiv
See Also:
Serialized Form

Constructor Summary
protected Packet(Id id)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 Id getId()
          Get id of the Packet.
 java.lang.String toString()
          Returns string with description of the object
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Packet

protected Packet(Id id)
Method Detail

getId

public Id getId()
Get id of the Packet. Corresponding request and response have same id. If a server side can not make out the request id, response must has id equal zero.

Returns:
id

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. The only Id is compared.

Parameters:
obj - the reference object with which to compare
Returns:
true if this object is the same as the obj argument; false otherwise

toString

public java.lang.String toString()
Returns string with description of the object

Returns:
Description


Copyright © 2004 Phoenix Team (CMU/AIT). All Rights Reserved.