com.adventnet.snmp.sas
Class ProtocolDataUnit

java.lang.Object
  |
  +--com.adventnet.snmp.sas.ProtocolDataUnit
All Implemented Interfaces:
java.io.Serializable

public class ProtocolDataUnit
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Constructor Summary
ProtocolDataUnit()
          Constructs a ProtocolDataUnit instance with default values.
ProtocolDataUnit(byte[] data, java.net.InetAddress address, int remote, int local)
          Constructs a ProtocolDataUnit instance with the given values.
 
Method Summary
 byte[] getData()
          The data that is associated with this instance.
 java.lang.String getHostAddress()
          Gets the remoteAddress of this ProtocolDataUnit.
 int getLocalPort()
          Returns the localPort of this ProtocolDataUnit.
 java.net.InetAddress getRemoteAddress()
          Returns the remoteAddress of this ProtocolDataUnit.
 int getRemotePort()
          Returns the remotePort of this ProtocolDataUnit.
 void setData(byte[] data)
          Sets the data on this ProtocolDataUnit.
 void setHostAddress(java.lang.String hostAddr)
          Sets the remoteAddress on this ProtocolDataUnit.
 void setLocalPort(int port)
          Sets the localPort on this ProtocolDataUnit.
 void setRemoteAddress(java.net.InetAddress addr)
          Sets the remoteAddress on this ProtocolDataUnit.
 void setRemotePort(int port)
          Sets the remotePort on this ProtocolDataUnit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtocolDataUnit

public ProtocolDataUnit()
Constructs a ProtocolDataUnit instance with default values.


ProtocolDataUnit

public ProtocolDataUnit(byte[] data,
                        java.net.InetAddress address,
                        int remote,
                        int local)
Constructs a ProtocolDataUnit instance with the given values.

Parameters:
data - The data that needs to be associated with this instance.
address - The remote address associated with this instance.
remote - The remotePort associated with this instance.
local - The localPort associated with this instance.
Method Detail

getData

public byte[] getData()
The data that is associated with this instance.

Returns:
data corresponding to this instance.

setData

public void setData(byte[] data)
Sets the data on this ProtocolDataUnit.

Parameters:
data - The data to be set.

getRemoteAddress

public java.net.InetAddress getRemoteAddress()
Returns the remoteAddress of this ProtocolDataUnit.

Returns:
The remoteAddress corresponding to this ProtocolDataUnit.

setRemoteAddress

public void setRemoteAddress(java.net.InetAddress addr)
Sets the remoteAddress on this ProtocolDataUnit.

Parameters:
addr - The remoteAddress to be set.

getRemotePort

public int getRemotePort()
Returns the remotePort of this ProtocolDataUnit.

Returns:
The remotePort corresponding to this ProtocolDataUnit.

setRemotePort

public void setRemotePort(int port)
Sets the remotePort on this ProtocolDataUnit.

Parameters:
port - The remotePort to be set.

getLocalPort

public int getLocalPort()
Returns the localPort of this ProtocolDataUnit.

Returns:
The localPort corresponding to this ProtocolDataUnit.

setLocalPort

public void setLocalPort(int port)
Sets the localPort on this ProtocolDataUnit.

Parameters:
port - The localPort to be set.

getHostAddress

public java.lang.String getHostAddress()
Gets the remoteAddress of this ProtocolDataUnit.

Returns:
The remoteAddress corresponding to this ProtocolDataUnit.

setHostAddress

public void setHostAddress(java.lang.String hostAddr)
Sets the remoteAddress on this ProtocolDataUnit.

Parameters:
hostAddr - The remoteAddress to be set.


Copyright (c)AdventNet Inc., 1996-2006