com.adventnet.snmp.snmp2.agent
Class AgentTcpProtocolOptionsImpl

java.lang.Object
  |
  +--com.adventnet.snmp.snmp2.agent.AgentTcpProtocolOptionsImpl

public class AgentTcpProtocolOptionsImpl
extends java.lang.Object
implements ProtocolOptions

Implemention of the ProtocolOptions interface for TCP/IP protocol.


Field Summary
(package private)  java.lang.String key
           
(package private)  int localPort
           
(package private)  java.lang.String remoteHost
           
(package private)  int remotePort
           
 
Constructor Summary
AgentTcpProtocolOptionsImpl(java.lang.String remoteHost, int remotePort, int localPort)
          Constructor that creates the AgentTcpProtocolOptionsImpl object.
 
Method Summary
 int getLocalPort()
          Get the local port configured.
 java.lang.String getRemoteHost()
          Get the remote host with which this SNMP entity will communicate.
 int getRemotePort()
          Get the remote port with which this SNMP entity will communicate.
 java.lang.String getSessionId()
          Get a unique session id that is associated with each SNMP session initiated from this SNMP entity.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

remoteHost

java.lang.String remoteHost

remotePort

int remotePort

localPort

int localPort

key

java.lang.String key
Constructor Detail

AgentTcpProtocolOptionsImpl

public AgentTcpProtocolOptionsImpl(java.lang.String remoteHost,
                                   int remotePort,
                                   int localPort)
Constructor that creates the AgentTcpProtocolOptionsImpl object.
Parameters:
remoteHost - The Remote Host to be connected.
remotePort - The Remote Port to which it is to be connected.
localPort - The Local Port Number.
Method Detail

getRemoteHost

public java.lang.String getRemoteHost()
Get the remote host with which this SNMP entity will communicate.
Returns:
The Remote Host Name.

getRemotePort

public int getRemotePort()
Get the remote port with which this SNMP entity will communicate.
Returns:
The Remote Port Number.

getLocalPort

public int getLocalPort()
Get the local port configured.
Returns:
The Local Port Number.

getSessionId

public java.lang.String getSessionId()
Get a unique session id that is associated with each SNMP session initiated from this SNMP entity.

This is used by the SNMP v3 module. For example, this can even be a combination of the host and port.

Specified by:
getSessionId in interface ProtocolOptions
Returns:
The Session Id Value Required.