com.adventnet.snmp.snmp2.agent
Class TrapEntry

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

public class TrapEntry
extends BaseTableEntry

Contains the data handling under trapEntry group


Field Summary
protected  java.lang.String agentCommunity
          The community of the Trap received.
(package private) static int AGENTCOMMUNITY
           
protected  java.lang.String agentHost
          The agentHost of the Trap received.
(package private) static int AGENTHOST
           
protected  java.lang.Integer agentHostType
           
(package private) static int AGENTHOSTTYPE
           
protected  java.lang.Integer agentStatus
           
(package private) static int AGENTSTATUS
           
protected  int agentTrapPortNumber
          The agentTrap Port of the Trap received.
(package private) static int AGENTTRAPPORTNUMBER
           
(package private) static int index
           
protected  int[] instanceOID
          The InstanceOID value for this Entry.
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.BaseTableEntry
agentName, instanceOID
 
Constructor Summary
TrapEntry()
          Default Constructor - does nothing.
 
Method Summary
 int[] computeInstanceOID()
          This method is used for recomputing the Instance OID.
 java.lang.String getAgentCommunity()
          Handles the SNMP Get Request for agentCommunity
 java.lang.String getAgentHost()
          Handles the SNMP Get Request for agentHost
 java.lang.Integer getAgentHostType()
          Handles the SNMP Get Request for agentHostType
 java.lang.Integer getAgentStatus()
          Handles the SNMP Get Request for trapStatus
 int getAgentTrapPortNumber()
          Handles the SNMP Get Request for agentPort
 int getCount()
          Method to get the Entry count.
 int getIndex()
           
 int[] getInstanceOID()
          Getter for the Instance OID,Part of interface TableEntry.
 void setAgentCommunity(java.lang.String value)
          Handles the SNMP Set Request for agentCommunity
 void setAgentHost(java.lang.String value)
          Handles the SNMP Set Request for agentHost
 void setAgentHostType(java.lang.Integer value)
          Handles the SNMP Set Request for agentHostType
 void setAgentRef(SnmpAgent agentRef)
          Method to set the SnmpAgent Refernce.
 void setAgentStatus(java.lang.Integer value)
          Handles the SNMP Set Request for trapStatus
 void setAgentTrapPortNumber(int value)
          Handles the SNMP Set Request for agentPort
 void setAttributes(java.util.Hashtable values, java.util.Vector indexList)
           
 void setIndex(int index)
           
 void setInstanceOID(int[] instanceOID)
          Setter for the Instance OID, Part of interface TableEntry.
 void setrowStatus(java.lang.Integer value)
          Method to set the rowStatus value
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.BaseTableEntry
decrementCount, getAttributes, setAgentRef, setCount
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

agentHostType

protected java.lang.Integer agentHostType

agentHost

protected java.lang.String agentHost
The agentHost of the Trap received.

agentTrapPortNumber

protected int agentTrapPortNumber
The agentTrap Port of the Trap received.

agentCommunity

protected java.lang.String agentCommunity
The community of the Trap received.

agentStatus

protected java.lang.Integer agentStatus

AGENTHOSTTYPE

static final int AGENTHOSTTYPE

AGENTHOST

static final int AGENTHOST

AGENTTRAPPORTNUMBER

static final int AGENTTRAPPORTNUMBER

AGENTCOMMUNITY

static final int AGENTCOMMUNITY

AGENTSTATUS

static final int AGENTSTATUS

index

static int index

instanceOID

protected int[] instanceOID
The InstanceOID value for this Entry.
Constructor Detail

TrapEntry

public TrapEntry()
Default Constructor - does nothing.
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 AgentException

getAgentHostType

public java.lang.Integer getAgentHostType()
                                   throws AgentException
Handles the SNMP Get Request for agentHostType

setAgentHostType

public void setAgentHostType(java.lang.Integer value)
                      throws AgentException
Handles the SNMP Set Request for agentHostType
Parameters:
value - - The Integer value to be set

setAgentRef

public void setAgentRef(SnmpAgent agentRef)
Method to set the SnmpAgent Refernce.
Parameters:
agentRef - instance of SnmpAgent

getAgentHost

public java.lang.String getAgentHost()
                              throws AgentException
Handles the SNMP Get Request for agentHost
Returns:
The AgentHost String of the Trap received.
Throws:
AgentException - on error.

setAgentHost

public void setAgentHost(java.lang.String value)
                  throws AgentException
Handles the SNMP Set Request for agentHost
Parameters:
value - The Host IPAddress String to be set for this entry
Throws:
AgentException - on error

getAgentTrapPortNumber

public int getAgentTrapPortNumber()
                           throws AgentException
Handles the SNMP Get Request for agentPort
Returns:
The Agent Trap Port Number from where the Trap received.
Throws:
AgentException - on error.

setAgentTrapPortNumber

public void setAgentTrapPortNumber(int value)
                            throws AgentException
Handles the SNMP Set Request for agentPort
Parameters:
value - The port value to be set for this entry
Throws:
AgentException - on error

getAgentCommunity

public java.lang.String getAgentCommunity()
                                   throws AgentException
Handles the SNMP Get Request for agentCommunity
Returns:
The Community String of the Trap received.
Throws:
AgentException - on error.

setAgentCommunity

public void setAgentCommunity(java.lang.String value)
                       throws AgentException
Handles the SNMP Set Request for agentCommunity
Parameters:
value - The Community String to be set for this entry
Throws:
AgentException - on error

getAgentStatus

public java.lang.Integer getAgentStatus()
                                 throws AgentException
Handles the SNMP Get Request for trapStatus
Returns:
The Status of the entry.
Throws:
AgentException - on error.

setAgentStatus

public void setAgentStatus(java.lang.Integer value)
                    throws AgentException
Handles the SNMP Set Request for trapStatus
Parameters:
value - The RowStatus int for this entry
Throws:
AgentException - on error

setrowStatus

public void setrowStatus(java.lang.Integer value)
Description copied from interface: RowStatusHandlerInterface
Method to set the rowStatus value
Tags copied from interface: RowStatusHandlerInterface
Parameters:
value - the Integer specifying the rowStatus value.
Throws:
AgentExcption - on error during this event.

getInstanceOID

public int[] getInstanceOID()
Getter for the Instance OID,Part of interface TableEntry.
Overrides:
getInstanceOID in class BaseTableEntry
Returns:
The instanceOID requested.

setInstanceOID

public void setInstanceOID(int[] instanceOID)
Setter for the Instance OID, Part of interface TableEntry.
Overrides:
setInstanceOID in class BaseTableEntry
Parameters:
instanceOID - The Instance OID to be set.

computeInstanceOID

public int[] computeInstanceOID()
This method is used for recomputing the Instance OID.
Overrides:
computeInstanceOID in class BaseTableEntry
Returns:
The Computed Instance OID.
See Also:
AgentUtil.encodeInstanceString

getCount

public int getCount()
Method to get the Entry count.
Overrides:
getCount in class BaseTableEntry
Returns:
The count.