jcifs.util
Class PacketEvent
java.lang.Object
|
+--jcifs.util.PacketEvent
- public class PacketEvent
- extends Object
- implements Cloneable
Simply encapsulates the DatagramPacket
and it's reception
time.
- Since:
- jcifs-0.1
- Author:
- Michael B. Allen
- See Also:
MultiDatagramSocket
,
PacketEventQueue
,
DatagramPacket
getPacket
public DatagramPacket getPacket()
- Retrieve the
DatagramPacket
.
- Returns:
- the packet
getTime
public long getTime()
- Return the time the packet was received. The first thing
MultiDatagramSocket
does when it receives a packet is note the time. So,
if the packet sits in the PacketEventQueue
for a while the time
is still accruate.
- Returns:
- the time in milliseconds as a
long
clone
public Object clone()
- Clone this packet. The cloneing operation is 'deep' in that it copies
the data of the underlying packet into a new buffer. This is important
for the reasons described in the Important Note: of the
MultiDatagramSocket
Class description.
- Overrides:
- clone in class Object