|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.net.Packet
drcl.net.FooPacket
A packet class that keeps both packet count and byte count.
| Field Summary |
| Fields inherited from class drcl.net.Packet |
body, headerSize, id, size |
| Constructor Summary | |
FooPacket()
|
|
FooPacket(int pktsize_,
int pktcnt_,
long bytecnt_)
|
|
| Method Summary | |
java.lang.String |
_toString(java.lang.String separator_)
Prints the packet header. |
java.lang.Object |
clone()
Returns a clone of this object. |
long |
getByteCount()
Returns the byte count of this packet in the connection to which this packet belongs. |
java.lang.String |
getName()
Returns the name of this packet. |
int |
getNumberCount()
Returns the "sequence" of the object. |
int |
getPacketCount()
Returns the count of this packet in the connection to which this packet belongs. |
java.lang.String |
getPacketType()
Returns null; this class does not provide packet type information. |
long |
getSizeCount()
Returns the size "sequence" of the object. |
boolean |
isByteCountSupported()
|
boolean |
isPacketCountSupported()
|
void |
set(int pktcount_,
long bytecount_)
|
void |
setByteCount(long cnt_)
|
void |
setPacketCount(int cnt_)
|
| Methods inherited from class drcl.net.Packet |
equals, getBody, getHeaderSize, getPacketSize, getSize, getTimestamp, isTimestampSupported, setBody, setBody, setHeaderSize, setPacketSize, setSize, setTimestamp, toString, toString, wraps |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public FooPacket()
public FooPacket(int pktsize_,
int pktcnt_,
long bytecnt_)
| Method Detail |
public java.lang.String getName()
Packet
getName in class Packetpublic void setPacketCount(int cnt_)
public int getPacketCount()
PacketPacketException if the encapsulated object is not a packet.
getPacketCount in class Packetpublic int getNumberCount()
Countable
getNumberCount in interface CountablegetNumberCount in class PacketPacket.getPacketCount()public boolean isPacketCountSupported()
isPacketCountSupported in class Packetpublic void setByteCount(long cnt_)
public long getByteCount()
PacketPacketException if the encapsulated object is not a packet.
This method approximates the byte count with the byte count obtained from
the encapsulated packet plus the header size times the packet count.
getByteCount in class Packetpublic long getSizeCount()
Countable
getSizeCount in interface CountablegetSizeCount in class PacketPacket.getByteCount()public boolean isByteCountSupported()
isByteCountSupported in class Packet
public void set(int pktcount_,
long bytecount_)
public java.lang.String getPacketType()
null; this class does not provide packet type information.
getPacketType in class Packetpublic java.lang.Object clone()
ObjectCloneable
clone in interface ObjectCloneableclone in class Packetpublic java.lang.String _toString(java.lang.String separator_)
Packet
_toString in class Packet
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||