Class
Tree
          
PREV CLASS NEXT CLASS
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD
 

com.newstep.solid.netio.packet
Class Packet

public class Packet      
Represents the packets exchanged in a packet based protocol channel containing
the remote address of the remote endpoint from which the packet was
originated or to which it is destined, allowing the packet channel to behave
in a non-connection oriented fashion.
 
Links:
Kernel Association Association Link
to Class PacketChannelEndpoint
the remove endpoint from which the packet came OR to which the packet is
to be delivered
Associates type:
association
Client cardinality:
1
Client navigability:
NOT NAVIGABLE
Client visibility:
private
Supplier cardinality:
1
Supplier navigability:
NAVIGABLE
Supplier visibility:
private
 
 

Field Summary
private ByteBuffer
public final static int
Constructor Summary
public void
Packet(Byte data, PacketChannelEndpoint remoteEndpoint)
public void
Method Summary
public ByteBuffer
public byte[]
public void
setBuffer(ByteBuffer dataBuffer)
public void
setData(Byte data)
public void
public String
Field Detail
dataBuffer
private ByteBuffer dataBuffer
the packet data buffer
Multiplicity:
1
 

MAX_DATA_SIZE
public final static int MAX_DATA_SIZE
the maximum packet data buffer size
Final.
Multiplicity:
1
Static.
 

remoteEndpoint
PacketChannelEndpoint remoteEndpoint
the remove endpoint from which the packet came OR to which the packet is
to be delivered
 

remoteEndpoint
private PacketChannelEndpoint remoteEndpoint
the remove endpoint from which the packet came OR to which the packet is
to be delivered
Multiplicity:
1
 
Constructor Detail
Packet
public void Packet (Byte data, PacketChannelEndpoint remoteEndpoint)
 
creates a packet with the specified data for the specified remote endpoint
Parameters:
data the data to be sent in the packet
remoteEndpoint the remote endpoint from which the packet was
originated or to which it is destined
Stereotype:
create
 

Packet
public void Packet ()
 
creates an empty packet
Stereotype:
create
 
Method Detail
getBuffer
public ByteBuffer getBuffer ()
 
Return:
the packet data buffer
 

getData
public byte[] getData ()
 
retrieves a copy of the packet data as a byte buffer
Return:
retrieves a copy of the packet data
 

getRemoteEndpoint
public PacketChannelEndpoint getRemoteEndpoint ()
 
Return:
the remote endpoint from which the packet was originated or to
which it is destined
 

setBuffer
public void setBuffer (ByteBuffer dataBuffer)
 
assigns the packet data buffer
Parameters:
dataBuffer the packet data buffer
 

setData
public void setData (Byte data)
 
assigns the specified data to the packet


NOTE: the specified byte array becomes the backing array for the
Packet's internal ByteBuffer. Changes made to the array's data subsequent
to the setData function will be reflected in the Packet's ByteBuffer

Parameters:
data byte buffer to be assigned as the packet
 

setRemoteEndpoint
public void setRemoteEndpoint (PacketChannelEndpoint remoteEndpoint)
 
assigns the remote endpoint from which the packet was originated or to
which it is destined
Parameters:
remoteEndpoint the remote endpoint from which the packet was
originated or to which it is destined
 

toString
public String toString ()
 
Return:
the stringified packet information
 

Class
Tree
          
PREV CLASS NEXT CLASS
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD