com.adventnet.snmp.snmp2.agent
Class ForwardingEntry

java.lang.Object
  extended by com.adventnet.snmp.snmp2.agent.BaseTableEntry
      extended by com.adventnet.snmp.snmp2.agent.ForwardingEntry
All Implemented Interfaces:
RowStatusHandlerInterface, TableEntry, java.io.Serializable

public class ForwardingEntry
extends BaseTableEntry
implements java.io.Serializable

Contains the data handling for ForwardingEntry

See Also:
Serialized Form

Field Summary
(package private) static int COMMUNITY
           
(package private) static int index
           
(package private) static int MANAGERHOST
           
(package private) static int MANAGERHOSTTYPE
           
(package private) static int MANAGERPORT
           
(package private) static int RETRIES
           
(package private) static int ROWSTATUS
           
(package private) static int TIMEOUT
           
(package private) static int VERSION
           
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.BaseTableEntry
agentName
 
Constructor Summary
ForwardingEntry()
          The Default Constructor for Forwarding Entry Class.
ForwardingEntry(java.lang.String managerHost, java.lang.Integer managerPort, java.lang.Integer version, java.lang.String community, java.lang.Long timeOut, java.lang.Long retries, java.lang.Integer rowStatus)
           
 
Method Summary
 void computeAndSetInstanceOID()
           
 int getIndex()
           
 java.lang.Integer getManagerHostType()
          Handles the SNMP Get Request for v1v2ManagerHostType
 java.lang.String getV1v2ManagerCommunity()
          Handles the SNMP Get Request for V1V2 Manager Community
 java.lang.String getV1v2ManagerHost()
          Handles the SNMP Get Request for managerHost
 java.lang.Integer getV1v2ManagerPort()
          Handles the SNMP Get Request for managerPort
 java.lang.Long getV1v2ManagerRetries()
          Handles the SNMP Get Request for managerRetries
 java.lang.Integer getV1v2ManagerStatus()
          Handles the SNMP Get Request for rowStatus
 java.lang.Long getV1v2ManagerTimeOut()
          Handles the SNMP Get Request for manager Timeout
 java.lang.Integer getV1v2ManagerVersion()
          Handles the SNMP Get Request for manager Version
 void setAttributes(java.util.Hashtable values, java.util.Vector indexList)
           
 void setIndex(int index)
           
 void setManagerHostType(java.lang.Integer value)
          Handles the SNMP Set Request for v1v2ManagerHostType
 void setrowStatus(java.lang.Integer value)
          Method to set the rowStatus value
 void setV1v2ManagerCommunity(java.lang.String com)
          Handles the SNMP Set Request for manager community
 void setV1v2ManagerHost(java.lang.String host)
          Handles the SNMP Set Request for managerHost
 void setV1v2ManagerPort(java.lang.Integer port)
          Handles the SNMP Set Request for managerPort
 void setV1v2ManagerRetries(java.lang.Long ret)
          Handles the SNMP Set Request for managerRetries
 void setV1v2ManagerStatus(java.lang.Integer status)
          Handles the SNMP Set Request for rowStatus
 void setV1v2ManagerTimeOut(java.lang.Long tout)
          Handles the SNMP Set Request for managerTimeout
 void setV1v2ManagerVersion(java.lang.Integer ver)
          Handles the SNMP Set Request for manager Version
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.BaseTableEntry
computeInstanceOID, decrementCount, getAttributes, getCount, getInstanceOID, setAgentRef, setCount, setInstanceOID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MANAGERHOSTTYPE

static final int MANAGERHOSTTYPE
See Also:
Constant Field Values

MANAGERHOST

static final int MANAGERHOST
See Also:
Constant Field Values

MANAGERPORT

static final int MANAGERPORT
See Also:
Constant Field Values

VERSION

static final int VERSION
See Also:
Constant Field Values

COMMUNITY

static final int COMMUNITY
See Also:
Constant Field Values

TIMEOUT

static final int TIMEOUT
See Also:
Constant Field Values

RETRIES

static final int RETRIES
See Also:
Constant Field Values

ROWSTATUS

static final int ROWSTATUS
See Also:
Constant Field Values

index

static int index
Constructor Detail

ForwardingEntry

public ForwardingEntry()
The Default Constructor for Forwarding Entry Class.


ForwardingEntry

public ForwardingEntry(java.lang.String managerHost,
                       java.lang.Integer managerPort,
                       java.lang.Integer version,
                       java.lang.String community,
                       java.lang.Long timeOut,
                       java.lang.Long retries,
                       java.lang.Integer rowStatus)
Parameters:
managerHost - the managerHost to which trap to be sent
managerPort - the manager post to which trap to be sent
version - the Snmp version of the trap to be sent
community - the community String to be used in the trap
timeout - used in case of informs
retries - used in case of informs
rowStatus - rowStatus for this row having details about manager
Method Detail

getIndex

public int getIndex()

setIndex

public void setIndex(int index)

setAttributes

public void setAttributes(java.util.Hashtable values,
                          java.util.Vector indexList)
                   throws AgentSnmpException
Throws:
AgentSnmpException

getManagerHostType

public java.lang.Integer getManagerHostType()
                                     throws AgentSnmpException
Handles the SNMP Get Request for v1v2ManagerHostType

Throws:
AgentSnmpException

setManagerHostType

public void setManagerHostType(java.lang.Integer value)
                        throws AgentSnmpException
Handles the SNMP Set Request for v1v2ManagerHostType

Parameters:
value - - The Integer value to be set
Throws:
AgentSnmpException

getV1v2ManagerHost

public java.lang.String getV1v2ManagerHost()
                                    throws AgentSnmpException
Handles the SNMP Get Request for managerHost

Returns:
The Manager Host for whom the Trap is to be forwarded
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this event.
See Also:
setV1v2ManagerHost(String host)

setV1v2ManagerHost

public void setV1v2ManagerHost(java.lang.String host)
                        throws AgentSnmpException
Handles the SNMP Set Request for managerHost

Parameters:
host - The String specifying the Manager HostName in IpAddress format. e.g., "192.168.1.98", default is 127.0.0.1
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this event.
See Also:
getV1v2ManagerHost()

getV1v2ManagerCommunity

public java.lang.String getV1v2ManagerCommunity()
                                         throws AgentSnmpException
Handles the SNMP Get Request for V1V2 Manager Community

Returns:
The Manager Community with which the Trap PDU will be sent.
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this event.
See Also:
setV1v2ManagerCommunity(String com)

setV1v2ManagerCommunity

public void setV1v2ManagerCommunity(java.lang.String com)
                             throws AgentSnmpException
Handles the SNMP Set Request for manager community

Parameters:
com - The String community to be set to the Trap PDU
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this event.
See Also:
getV1v2ManagerCommunity()

getV1v2ManagerPort

public java.lang.Integer getV1v2ManagerPort()
                                     throws AgentSnmpException
Handles the SNMP Get Request for managerPort

Returns:
The Manager Port to which the Traps are targetted
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this event.
See Also:
setV1v2ManagerPort(Integer port)

setV1v2ManagerPort

public void setV1v2ManagerPort(java.lang.Integer port)
                        throws AgentSnmpException
Handles the SNMP Set Request for managerPort

Parameters:
port - The port specifying the Manager Target Port
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this event.
See Also:
getV1v2ManagerPort()

getV1v2ManagerVersion

public java.lang.Integer getV1v2ManagerVersion()
                                        throws AgentSnmpException
Handles the SNMP Get Request for manager Version

Returns:
The Version with which the Trap is to be sent
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this event.
See Also:
setV1v2ManagerVersion(Integer ver)

setV1v2ManagerVersion

public void setV1v2ManagerVersion(java.lang.Integer ver)
                           throws AgentSnmpException
Handles the SNMP Set Request for manager Version

Parameters:
ver - The version int specifying e.g., 1 for Snmp Version 1 by default this will be 2 i.e., Snmp Version 2.
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this event.
See Also:
getV1v2ManagerVersion()

getV1v2ManagerTimeOut

public java.lang.Long getV1v2ManagerTimeOut()
                                     throws AgentSnmpException
Handles the SNMP Get Request for manager Timeout

Returns:
The TimeOut value of the Trap PDU.
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this event.
See Also:
setV1v2ManagerTimeOut(Long tout)

setV1v2ManagerTimeOut

public void setV1v2ManagerTimeOut(java.lang.Long tout)
                           throws AgentSnmpException
Handles the SNMP Set Request for managerTimeout

Parameters:
tout - The Long value specifying the timeout value
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this event.
See Also:
getV1v2ManagerTimeOut()

getV1v2ManagerRetries

public java.lang.Long getV1v2ManagerRetries()
                                     throws AgentSnmpException
Handles the SNMP Get Request for managerRetries

Returns:
The number of retries that will be made for this trap.
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this event.
See Also:
setV1v2ManagerRetries(Long ret)

setV1v2ManagerRetries

public void setV1v2ManagerRetries(java.lang.Long ret)
                           throws AgentSnmpException
Handles the SNMP Set Request for managerRetries

Parameters:
ret - the Long value to be set as the retries in the TrapPDU.
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this event.
See Also:
getV1v2ManagerRetries()

getV1v2ManagerStatus

public java.lang.Integer getV1v2ManagerStatus()
                                       throws AgentSnmpException
Handles the SNMP Get Request for rowStatus

Returns:
The rowStatus implementation for this Entry
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this event.
See Also:
setV1v2ManagerStatus(Integer status)

setV1v2ManagerStatus

public void setV1v2ManagerStatus(java.lang.Integer status)
                          throws AgentSnmpException
Handles the SNMP Set Request for rowStatus

Parameters:
statud - The Integer specifying the RowStatus value for this Entry
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this event.
See Also:
getV1v2ManagerStatus()

setrowStatus

public void setrowStatus(java.lang.Integer value)
Description copied from interface: RowStatusHandlerInterface
Method to set the rowStatus value

Specified by:
setrowStatus in interface RowStatusHandlerInterface
Parameters:
value - the Integer specifying the rowStatus value.

computeAndSetInstanceOID

public void computeAndSetInstanceOID()