All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class magician.Utils.UnsynchDatagramPacket

java.lang.Object
   |
   +----magician.Utils.UnsynchDatagramPacket

public class UnsynchDatagramPacket
extends Object
takes the


Variable Index

 o address
 o buf
 o length
 o MAX_DATAGRAM_PACKET_LEN
 o packetPool
 o port

Constructor Index

 o UnsynchDatagramPacket(byte[], int, InetAddress, int)
Constructs a datagram packet for sending packets of length ilength to the specified port number on the specified host.

Method Index

 o free(UnsynchDatagramPacket)
release a datagram packet instance back to the free pool
 o getAddress()
Returns the IP address of the machine to which this datagram is being sent or from which the datagram was received.
 o getData()
Returns the data received or the data to be sent.
 o getLength()
Returns the length of the data to be sent or the length of the data received.
 o getNewDatagramPacket()
returns an initialized instance of a UnsynchDatagramPacket
 o getPort()
Returns the port number on the remote host to which this datagram is being sent or from which the datagram was received.
 o reinitialize()
re-initializes the packet for reuse idea taken from Singhal etal paper from IBM TJ Watson Research Center
 o setAddress(InetAddress)
 o setData(byte[])
 o setLength(int)
 o setPort(int)

Variables

 o buf
 byte buf[]
 o length
 int length
 o address
 InetAddress address
 o port
 int port
 o MAX_DATAGRAM_PACKET_LEN
 static final int MAX_DATAGRAM_PACKET_LEN
 o packetPool
 static Vector packetPool

Constructors

 o UnsynchDatagramPacket
 public UnsynchDatagramPacket(byte ibuf[],
                              int ilength,
                              InetAddress iaddr,
                              int iport)
Constructs a datagram packet for sending packets of length ilength to the specified port number on the specified host. The length argument must be less than or equal to ibuf.length.

Parameters:
ibuf - the packet data.
ilength - the packet length.
iaddr - the destination address.
iport - the destination port number.
See Also:
InetAddress

Methods

 o getNewDatagramPacket
 public static synchronized UnsynchDatagramPacket getNewDatagramPacket()
returns an initialized instance of a UnsynchDatagramPacket

Returns:
an UnsynchDatagramPacket instance
 o free
 public static synchronized void free(UnsynchDatagramPacket packet)
release a datagram packet instance back to the free pool

Parameters:
UnsynchDatagramPacket - the instance to be returned
 o getAddress
 public InetAddress getAddress()
Returns the IP address of the machine to which this datagram is being sent or from which the datagram was received.

Returns:
the IP address of the machine to which this datagram is being sent or from which the datagram was received.
See Also:
InetAddress
 o getPort
 public int getPort()
Returns the port number on the remote host to which this datagram is being sent or from which the datagram was received.

Returns:
the port number on the remote host to which this datagram is being sent or from which the datagram was received.
 o getData
 public byte[] getData()
Returns the data received or the data to be sent.

Returns:
the data received or the data to be sent.
 o getLength
 public int getLength()
Returns the length of the data to be sent or the length of the data received.

Returns:
the length of the data to be sent or the length of the data received.
 o setAddress
 public void setAddress(InetAddress iaddr)
 o setPort
 public void setPort(int iport)
 o setData
 public void setData(byte ibuf[])
 o setLength
 public void setLength(int ilength)
 o reinitialize
 public void reinitialize()
re-initializes the packet for reuse idea taken from Singhal etal paper from IBM TJ Watson Research Center


All Packages  Class Hierarchy  This Package  Previous  Next  Index
1