com.adventnet.snmp.ejb
Interface SnmpTarget

All Superinterfaces:
javax.ejb.EJBObject, java.rmi.Remote
All Known Subinterfaces:
SnmpTable

public interface SnmpTarget
extends javax.ejb.EJBObject

This is the interface for the SnmpTargetEJB. The client of this EJB would use this interface to invoke methods on the EJB. This a session bean, useful for deploying in a clustered configuration. Most methods mirror the methods in com.adventnet.snmp.beans.SnmpTarget.


Field Summary
static int MD5_AUTH
          v3 only Constant for SNMPV3 usmUserAuthProtocol
static int NO_AUTH
          v3 only Constant for SNMPV3 usmNoAuthProtocol
static int SHA_AUTH
          v3 only Constant for SNMPV3 usmUserAuthProtocol
static byte SNMPGET
          Constant for SNMP get request.
static byte SNMPGETBULK
          v2c and v3 only Constant for SNMP V2 Get Bulk request.
static byte SNMPGETNEXT
          Constant for SNMP get next request.
static byte SNMPINFORM
          v2c and v3 only Constant for SNMP V2 INFORM request.
static byte SNMPREPORT
          v2c and v3 only Constant for SNMP V2 Report request.
static byte SNMPRESPONSE
          Constant for SNMP response request
static byte SNMPSET
          Constant for SNMP set request request.
static byte SNMPTRAP
          Constant for SNMP trap request.
static byte SNMPV2TRAP
          v2c and v3 only Constant for SNMP V2 Trap request.
static int VERSION1
          v2c and v3 only Constant for SNMP Version 1.
static int VERSION2C
          v2c and v3 only Constant for SNMP Version 2C.
static int VERSION3
          v3 only Constant for SNMP Version 3.
 
Method Summary
 int addObjectID(java.lang.String s)
          Add an OID specified by string to the OID list and return the index of the entry
 void addResultListener(ResultListener l)
          Add a listener for events from this target.
 int addSnmpOID(SnmpOID oid)
          Add an OID to the list of OIDs and return theSnmpTarget.the index of the added entry
 void create_v3_tables()
           
 boolean getAttemptPartial()
          Returns the boolean state of whether this target will try to get partial data from an agent if a multiple variable request.
 java.lang.String getAuthPassword()
          v3 only Get the SNMP Auth Password
 int getAuthProtocol()
          v3 only Get the SNMP Auth Protocol
 java.lang.String getCommunity()
          Get the SNMP target Community
 java.lang.String getContextID()
          v3 only Get the SNMP V3 contextID
 java.lang.String getContextName()
          v3 only Get the SNMP V3 Context name
 int getErrorCode()
          get the error code from the last request.
 java.lang.String getErrorString()
          Get the error string from the last request.
 int getExceptionCode()
          v2c and v3 only Gets the exception code for the last request.
 int getMaxNumRows()
          Gets the maximum number of rows that can be processed.
 int getMaxRepetitions()
          v2c and v3 only Get the SNMP target max repetitions value for a getbulk request
 java.lang.String getMibModules()
          Get the MIBs loaded in this applet/application - a white-space separated list of mib files.
 MibOperations getMibOperations()
          Get the MibOperations object reference.
 int getNonRepeaters()
          v2c and v3 only Get the SNMP target non-repeaters value for a getbulk request
 java.lang.String getObjectID()
          Return the first object ID as a string
 java.lang.String getObjectID(int index)
          Return the object ID at index as a string
 java.lang.String[] getObjectIDList()
          Return the list of object IDs as a string array
 java.lang.String getPrincipal()
          v3 only Get the SNMP Principal
 java.lang.String getPrivPassword()
          v3 only Get the SNMP Privacy Password \
 int getRetries()
          Get the SNMP target retries value.
 java.lang.String getSecurityLevel()
          v3 only get the SNMP V3 SecurityLevel
 int getSecurityModel()
          v3 only get the SNMP V3 securityModel
 boolean getSendTimeoutEvents()
          Returns the boolean state of whether this target will send timeout events to a registered listener.
 SnmpOID getSnmpOID()
          Return the first SnmpOID from the list of object IDs.
 SnmpOID[] getSnmpOIDList()
          Return the list of object IDs as an array of SnmpOID instances
 int getSnmpVersion()
          v2c and v3 only Get the SNMP target SNMP Version.
 java.lang.String getTargetHost()
          Get the SNMP target hostname
 int getTargetPort()
          Get the SNMP target port number
 int getTimeout()
          Get the SNMP target timeout value
 java.lang.String getWriteCommunity()
          Get the SNMP target write Community to be used for set requests
 void initSecurityProvider()
          v3 only Initialise the SNMPv3 Security provider
 boolean isInSubTree(SnmpOID rootoid, SnmpOID objid)
          Check if objid has rootoid as an ancestor.
 boolean isSerialize()
          v3 only return the status of Serialization of v3 tables ( USMUserTable and SnmpEngineTable )
 boolean isSupportedSecurityModel(int secModel)
          v3 only Specifies if a particular security model is supported or not.
 void loadMibs(java.lang.String mibs)
          Load the mibs specified by white-space separated list of mibs.
 void manage_v3_tables()
          v3 only Method to create new users and add them to userTable in USMUserTable.
 void releaseResources()
          Though the resources will be cleaned up by the garbage collector, if the application is no more using the SnmpTarget bean instances, this method can be used to immediately release the resources.
 void removeResultListener(ResultListener l)
          Remove a listener for events from this target.
 void setAttemptPartial(boolean b)
          Sets the boolean state of whether this target will try to get partial data from an agent if a multiple variable request.
 void setAuthPassword(java.lang.String password)
          v3 only Set the SNMP Auth Password
 void setAuthProtocol(int protocol)
          v3 only Set the SNMP Auth Protocol
 void setCommunity(java.lang.String s)
          Set the SNMP target Community
 void setContextID(java.lang.String ctxtID)
          v3 only Set the SNMP V3 contextID
 void setContextName(java.lang.String cName)
          v3 only Set the SNMP V3 Context name
 void setDebug(boolean debug)
          determine is debug output will be printed
 void setMaxNumRows(int maxRows)
          Sets the maximum number of rows that can be processed.
 void setMaxRepetitions(int i)
          v2c and v3 only Set the SNMP target max repetitions value for a getbulk request
 void setMibModules(java.lang.String mibs)
          Set the MIBs loaded in this applet/application - a white-space separated list of mib files.
 void setNonRepeaters(int i)
          v2c and v3 only Set the SNMP target non-repeaters value for a getbulk request
 void setObjectID(int index, java.lang.String s)
          Set the object ID value at index based on specified string
 void setObjectID(java.lang.String oid)
          Set the first Object ID for this SNMP target session.
 void setObjectIDList(java.lang.String[] s)
          Set the list of object IDs based on the specified string array
 void setPrincipal(java.lang.String s)
          v3 only Set the SNMP Principal
 void setPrivPassword(java.lang.String password)
          v3 only set the SNMP Privacy Password
 void setRetries(int i)
          Set the SNMP target retries value.
 void setSecurityLevel(byte sLevel)
          v3 only set the SNMP V3 SecurityLevel
 void setSecurityModel(int secModel)
          v3 only Set the SNMPv3 Security Model
 void setSendTimeoutEvents(boolean b)
          Sets the boolean state of whether this target will send timeout events to a registered listener.
 void setSnmpOID(SnmpOID oid)
          Set the first SnmpOID in the list of object IDs.
 void setSnmpOIDList(SnmpOID[] list)
          Set the list of object IDs as the given array of SnmpOID instances
 void setSnmpVersion(int i)
          v2c and v3 only Set the SNMP target SNMP Version.
 void setTargetHost(java.lang.String hostname)
          Set the hostname for this SNMP target session.
 void setTargetPort(int i)
          Set the SNMP target port number
 void setTimeout(int i)
          Set the SNMP target timeout value
 void setTimeoutInMilliSec(int time)
          Sets the timeout value which should be given in milliseconds.
 void setWriteCommunity(java.lang.String s)
          Set the SNMP target write Community to be used for set requests
 java.lang.String snmpGet()
          Performs an SNMP get and returns the value as a string.
 SnmpVar snmpGet(SnmpOID oid)
          Gets the SNMP variable identified by specified Object Identifier.
 java.lang.String[][] snmpGetAllList()
          Get all instances of variables in the OID list.
 SnmpVarBind[][] snmpGetAllVariableBindings()
          Get all instances of variables in the OID list.
 SnmpVar[][] snmpGetAllVariables()
          Get all instances of variables in the OID list.
 java.lang.String[][] snmpGetBulkList()
          v2c and v3 only Get bulk on list of variables in the OID list.
 SnmpVarBind[][] snmpGetBulkVariableBindings()
          v2c and v3 only Get bulk on list of variables in the OID list.
 SnmpVar[][] snmpGetBulkVariables()
          v2c and v3 only Get bulk on list of variables in the OID list.
 java.lang.String[] snmpGetList()
          Queries the agent and returns the list of SNMP variable bindings from the agent using the Object Identifier list previously set in this SnmpTarget instance.
 SnmpVar[] snmpGetList(SnmpOID[] oids)
          Gets the list of SNMP variables identified by the Object Identifier list stored in this SnmpTarget instance.
 java.lang.String snmpGetNext()
          Performs an SNMP getNext and returns the value as a string.
 SnmpVar snmpGetNext(SnmpOID oid)
          Gets the SNMP variable identified by specified Object Identifier.
 java.lang.String[] snmpGetNextList()
          Queries the agent and returns the list of SNMP variable bindings from the agent using the Object Identifier list previously set in this SnmpTarget instance.
 SnmpVar[] snmpGetNextList(SnmpOID[] oids)
          Gets the list of SNMP variables identified by the Object Identifier list stored in this SnmpTarget instance.
 SnmpVar snmpGetNextVariable()
          Queries the target and returns the SNMP variable identified by the first Object Identifier stored in this SnmpTarget instance.
 SnmpVarBind snmpGetNextVariableBinding()
          Queries the target and returns the SNMP variable identified by the first Object Identifier stored in this SnmpTarget instance.
 SnmpVarBind[] snmpGetNextVariableBindings()
          Queries the agent and returns the list of SNMP variable bindings from the agent using the Object Identifier list previously set in this SnmpTarget instance.
 SnmpVar[] snmpGetNextVariables()
          Queries the agent and returns the list of SNMP variable bindings from the agent using the Object Identifier list previously set in this SnmpTarget instance.
 SnmpVar snmpGetVariable()
          Queries the target and returns the SNMP variable identified by the first Object Identifier stored in this SnmpTarget instance.
 SnmpVarBind snmpGetVariableBinding()
          Queries the target and returns the SNMP variable identified by the first Object Identifier stored in this SnmpTarget instance.
 SnmpVarBind[] snmpGetVariableBindings()
          Queries the agent and returns the list of SNMP variable bindings from the agent using the Object Identifier list previously set in this SnmpTarget instance.
 SnmpVar[] snmpGetVariables()
          Queries the agent and returns the list of SNMP variable bindings from the agent using the Object Identifier list previously set in this SnmpTarget instance.
 SnmpVarBind[] snmpSendInformRequest(long uptime, SnmpOID trapOid, SnmpVar[] values)
          v2c and v3 only Send an SNMPV2 inform pdu with parameters specified and variable bindings using object ids from the Object Identifier list previously set in this SnmpTarget instance, and the values specified.
 java.lang.String[] snmpSendInformRequest(long uptime, java.lang.String trapOid, java.lang.String[] values)
          v2c and v3 only Send an SNMPV2 inform pdu with parameters specified and variable bindings using object ids from the Object Identifier list previously set in this SnmpTarget instance, and the values specified.
 void snmpSendNotification(long uptime, SnmpOID trapOid, SnmpVar[] values)
          Send an SNMPV2 notification pdu with parameters specified and variable bindings using object ids from the Object Identifier list previously set in this SnmpTarget instance, and the values specified.
 void snmpSendTrap(java.lang.String enterprise, java.lang.String agenthost, int genericType, int specificType, long uptime, java.lang.String[] values)
          Send an SNMP trap, with parameters specified and variable bindings using object ids from the Object Identifier list previously set in * this SnmpTarget instance, and the values specified.
 java.lang.String snmpSet(java.lang.String value)
          Does an SNMP set to the target using value specified of the first variable on the variable list.
 java.lang.String snmpSet(java.lang.String value, byte type)
          Does an SNMP set to the target of the first variable on the variable list using value specified.
 java.lang.String[] snmpSetList(java.lang.String[] values)
          Set the list of SNMP variable bindings on the agent using the Object Identifier list previously set in this SnmpTarget instance.
 SnmpVar snmpSetVariable(SnmpVar var)
          Does an SNMP set with specified value to the target and returns the SNMP variable identified by the first Object Identifier stored in this SnmpTarget instance.
 SnmpVar[] snmpSetVariables(SnmpVar[] values)
          Do an SNMP set, with values specified, the list of SNMP variable bindings on the agent, using the Object Identifier list previously set in this SnmpTarget instance.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Field Detail

SNMPGET

public static final byte SNMPGET
Constant for SNMP get request.

See Also:
Constant Field Values

SNMPGETNEXT

public static final byte SNMPGETNEXT
Constant for SNMP get next request.

See Also:
Constant Field Values

SNMPRESPONSE

public static final byte SNMPRESPONSE
Constant for SNMP response request

See Also:
Constant Field Values

SNMPSET

public static final byte SNMPSET
Constant for SNMP set request request.

See Also:
Constant Field Values

SNMPTRAP

public static final byte SNMPTRAP
Constant for SNMP trap request.

See Also:
Constant Field Values

SNMPGETBULK

public static final byte SNMPGETBULK
v2c and v3 only Constant for SNMP V2 Get Bulk request.

See Also:
Constant Field Values

SNMPINFORM

public static final byte SNMPINFORM
v2c and v3 only Constant for SNMP V2 INFORM request.

See Also:
Constant Field Values

SNMPV2TRAP

public static final byte SNMPV2TRAP
v2c and v3 only Constant for SNMP V2 Trap request.

See Also:
Constant Field Values

SNMPREPORT

public static final byte SNMPREPORT
v2c and v3 only Constant for SNMP V2 Report request.

See Also:
Constant Field Values

VERSION1

public static final int VERSION1
v2c and v3 only Constant for SNMP Version 1.

See Also:
Constant Field Values

VERSION2C

public static final int VERSION2C
v2c and v3 only Constant for SNMP Version 2C.

See Also:
Constant Field Values

VERSION3

public static final int VERSION3
v3 only Constant for SNMP Version 3.

See Also:
Constant Field Values

NO_AUTH

public static final int NO_AUTH
v3 only Constant for SNMPV3 usmNoAuthProtocol

See Also:
Constant Field Values

MD5_AUTH

public static final int MD5_AUTH
v3 only Constant for SNMPV3 usmUserAuthProtocol

See Also:
Constant Field Values

SHA_AUTH

public static final int SHA_AUTH
v3 only Constant for SNMPV3 usmUserAuthProtocol

See Also:
Constant Field Values
Method Detail

setTargetHost

public void setTargetHost(java.lang.String hostname)
                   throws java.rmi.RemoteException
Set the hostname for this SNMP target session.

Parameters:
hostname - String SNMP agent host name
Throws:
java.rmi.RemoteException - if there is a communications or systems failure

setObjectID

public void setObjectID(java.lang.String oid)
                 throws java.rmi.RemoteException
Set the first Object ID for this SNMP target session.

Throws:
java.rmi.RemoteException - if there is a communications or systems failure

snmpGet

public java.lang.String snmpGet()
                         throws java.rmi.RemoteException
Performs an SNMP get and returns the value as a string. The return value is null in case of SNMP error. See the getErrorString() for more information on the error.

Returns:
String Result of get operation
Throws:
java.rmi.RemoteException - if there is a communications or systems failure

loadMibs

public void loadMibs(java.lang.String mibs)
              throws java.rmi.RemoteException
Load the mibs specified by white-space separated list of mibs. If first SnmpTarget has been opened with applet parameter, then URLs will be used. MIB loading applies across all beans in this package, i.e. MIBs can be loaded in any of the bean instances, and will be available across all beans in this package, across the VM.

java.rmi.RemoteException

snmpGetNext

public java.lang.String snmpGetNext()
                             throws java.rmi.RemoteException
Performs an SNMP getNext and returns the value as a string. The return value is null in case of SNMP error. See the getErrorString() for more information on the error.

Returns:
String Result of get operation
Throws:
java.rmi.RemoteException - if there is a communications or systems failure

snmpGetVariable

public SnmpVar snmpGetVariable()
                        throws java.rmi.RemoteException
Queries the target and returns the SNMP variable identified by the first Object Identifier stored in this SnmpTarget instance. Return null if no OID specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpGetVariableBinding

public SnmpVarBind snmpGetVariableBinding()
                                   throws java.rmi.RemoteException
Queries the target and returns the SNMP variable identified by the first Object Identifier stored in this SnmpTarget instance. Return null if no OID specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpGet

public SnmpVar snmpGet(SnmpOID oid)
                throws java.rmi.RemoteException
Gets the SNMP variable identified by specified Object Identifier. Return null if no OID specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpGetList

public java.lang.String[] snmpGetList()
                               throws java.rmi.RemoteException
Queries the agent and returns the list of SNMP variable bindings from the agent using the Object Identifier list previously set in this SnmpTarget instance. Return null if no OIDs specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpGetVariables

public SnmpVar[] snmpGetVariables()
                           throws java.rmi.RemoteException
Queries the agent and returns the list of SNMP variable bindings from the agent using the Object Identifier list previously set in this SnmpTarget instance. Return null if no OIDs specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpGetVariableBindings

public SnmpVarBind[] snmpGetVariableBindings()
                                      throws java.rmi.RemoteException
Queries the agent and returns the list of SNMP variable bindings from the agent using the Object Identifier list previously set in this SnmpTarget instance. Return null if no OIDs specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpGetList

public SnmpVar[] snmpGetList(SnmpOID[] oids)
                      throws java.rmi.RemoteException
Gets the list of SNMP variables identified by the Object Identifier list stored in this SnmpTarget instance. Return null if no OIDs specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpGetNextVariable

public SnmpVar snmpGetNextVariable()
                            throws java.rmi.RemoteException
Queries the target and returns the SNMP variable identified by the first Object Identifier stored in this SnmpTarget instance. Return null if no OID specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpGetNextVariableBinding

public SnmpVarBind snmpGetNextVariableBinding()
                                       throws java.rmi.RemoteException
Queries the target and returns the SNMP variable identified by the first Object Identifier stored in this SnmpTarget instance. Return null if no OID specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpGetNext

public SnmpVar snmpGetNext(SnmpOID oid)
                    throws java.rmi.RemoteException
Gets the SNMP variable identified by specified Object Identifier. Return null if no OID specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpGetNextList

public java.lang.String[] snmpGetNextList()
                                   throws java.rmi.RemoteException
Queries the agent and returns the list of SNMP variable bindings from the agent using the Object Identifier list previously set in this SnmpTarget instance. Return null if no OIDs specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpGetNextVariables

public SnmpVar[] snmpGetNextVariables()
                               throws java.rmi.RemoteException
Queries the agent and returns the list of SNMP variable bindings from the agent using the Object Identifier list previously set in this SnmpTarget instance. Return null if no OIDs specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpGetNextVariableBindings

public SnmpVarBind[] snmpGetNextVariableBindings()
                                          throws java.rmi.RemoteException
Queries the agent and returns the list of SNMP variable bindings from the agent using the Object Identifier list previously set in this SnmpTarget instance. Return null if no OIDs specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpGetNextList

public SnmpVar[] snmpGetNextList(SnmpOID[] oids)
                          throws java.rmi.RemoteException
Gets the list of SNMP variables identified by the Object Identifier list stored in this SnmpTarget instance. Return null if no OIDs specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpSet

public java.lang.String snmpSet(java.lang.String value)
                         throws java.rmi.RemoteException
Does an SNMP set to the target using value specified of the first variable on the variable list. This method will fail if MIB with this variable is not loaded of this is not a leaf node in the MIB. Returns as a string the value returned by the target. Throws Exception if no OID specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpSet

public java.lang.String snmpSet(java.lang.String value,
                                byte type)
                         throws java.rmi.RemoteException
Does an SNMP set to the target of the first variable on the variable list using value specified. Returns as a string the value returned by the target. Throws Exception if no OID specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpSetVariable

public SnmpVar snmpSetVariable(SnmpVar var)
                        throws java.rmi.RemoteException
Does an SNMP set with specified value to the target and returns the SNMP variable identified by the first Object Identifier stored in this SnmpTarget instance. Return null if no OID specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpSetList

public java.lang.String[] snmpSetList(java.lang.String[] values)
                               throws java.rmi.RemoteException
Set the list of SNMP variable bindings on the agent using the Object Identifier list previously set in this SnmpTarget instance. Return null if no OIDs specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpSetVariables

public SnmpVar[] snmpSetVariables(SnmpVar[] values)
                           throws java.rmi.RemoteException
Do an SNMP set, with values specified, the list of SNMP variable bindings on the agent, using the Object Identifier list previously set in this SnmpTarget instance. Return null if no OIDs specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpSendTrap

public void snmpSendTrap(java.lang.String enterprise,
                         java.lang.String agenthost,
                         int genericType,
                         int specificType,
                         long uptime,
                         java.lang.String[] values)
                  throws java.rmi.RemoteException
Send an SNMP trap, with parameters specified and variable bindings using object ids from the Object Identifier list previously set in * this SnmpTarget instance, and the values specified. Return null if no OIDs specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpSendNotification

public void snmpSendNotification(long uptime,
                                 SnmpOID trapOid,
                                 SnmpVar[] values)
                          throws java.rmi.RemoteException
Send an SNMPV2 notification pdu with parameters specified and variable bindings using object ids from the Object Identifier list previously set in this SnmpTarget instance, and the values specified.

Parameters:
uptime - The sysUptime value. This is the first oid sent with the notification. The corresponding oid need not be present in the oidList.
values - Contains an array of SnmpVar values corresponding to the oids in the oidList.
trapOid - This should contain the oid corresponding to the snmpTrapOID.
Throws:
DataException - is thrown for invalid values.
java.rmi.RemoteException

snmpSendInformRequest

public java.lang.String[] snmpSendInformRequest(long uptime,
                                                java.lang.String trapOid,
                                                java.lang.String[] values)
                                         throws java.rmi.RemoteException
v2c and v3 only Send an SNMPV2 inform pdu with parameters specified and variable bindings using object ids from the Object Identifier list previously set in this SnmpTarget instance, and the values specified.

Parameters:
uptime - The sysUptime value. This is the first oid sent with the notification. The corresponding oid need not be present in the oidList.
values - Contains an array of string values corresponding to the oids in the oidList.
trapOid - This should contain the oid string corresponding to the snmpTrapOID.
Throws:
DataException - is thrown for invalid values.
java.rmi.RemoteException

snmpSendInformRequest

public SnmpVarBind[] snmpSendInformRequest(long uptime,
                                           SnmpOID trapOid,
                                           SnmpVar[] values)
                                    throws java.rmi.RemoteException
v2c and v3 only Send an SNMPV2 inform pdu with parameters specified and variable bindings using object ids from the Object Identifier list previously set in this SnmpTarget instance, and the values specified.

Parameters:
uptime - The sysUptime value. This is the first oid sent with the notification. The corresponding oid need not be present in the oidList.
values - Contains an array of SnmpVar values corresponding to the oids in the oidList.
trapOid - This should contain the oid corresponding to the snmpTrapOID.
Throws:
DataException - is thrown for invalid values.
java.rmi.RemoteException

addObjectID

public int addObjectID(java.lang.String s)
                throws java.rmi.RemoteException
Add an OID specified by string to the OID list and return the index of the entry

java.rmi.RemoteException

addSnmpOID

public int addSnmpOID(SnmpOID oid)
               throws java.rmi.RemoteException
Add an OID to the list of OIDs and return theSnmpTarget.the index of the added entry

java.rmi.RemoteException

getObjectID

public java.lang.String getObjectID(int index)
                             throws java.rmi.RemoteException
Return the object ID at index as a string

java.rmi.RemoteException

getObjectID

public java.lang.String getObjectID()
                             throws java.rmi.RemoteException
Return the first object ID as a string

java.rmi.RemoteException

setObjectID

public void setObjectID(int index,
                        java.lang.String s)
                 throws java.rmi.RemoteException
Set the object ID value at index based on specified string

java.rmi.RemoteException

getObjectIDList

public java.lang.String[] getObjectIDList()
                                   throws java.rmi.RemoteException
Return the list of object IDs as a string array

java.rmi.RemoteException

setObjectIDList

public void setObjectIDList(java.lang.String[] s)
                     throws java.rmi.RemoteException
Set the list of object IDs based on the specified string array

java.rmi.RemoteException

getSnmpOID

public SnmpOID getSnmpOID()
                   throws java.rmi.RemoteException
Return the first SnmpOID from the list of object IDs.

java.rmi.RemoteException

setDebug

public void setDebug(boolean debug)
              throws java.rmi.RemoteException
determine is debug output will be printed

java.rmi.RemoteException

getMibModules

public java.lang.String getMibModules()
                               throws java.rmi.RemoteException
Get the MIBs loaded in this applet/application - a white-space separated list of mib files.

java.rmi.RemoteException

setMibModules

public void setMibModules(java.lang.String mibs)
                   throws java.rmi.RemoteException
Set the MIBs loaded in this applet/application - a white-space separated list of mib files.

java.rmi.RemoteException

setSnmpOID

public void setSnmpOID(SnmpOID oid)
                throws java.rmi.RemoteException
Set the first SnmpOID in the list of object IDs.

java.rmi.RemoteException

getSnmpOIDList

public SnmpOID[] getSnmpOIDList()
                         throws java.rmi.RemoteException
Return the list of object IDs as an array of SnmpOID instances

java.rmi.RemoteException

setSnmpOIDList

public void setSnmpOIDList(SnmpOID[] list)
                    throws java.rmi.RemoteException
Set the list of object IDs as the given array of SnmpOID instances

java.rmi.RemoteException

getTargetHost

public java.lang.String getTargetHost()
                               throws java.rmi.RemoteException
Get the SNMP target hostname

java.rmi.RemoteException

getTargetPort

public int getTargetPort()
                  throws java.rmi.RemoteException
Get the SNMP target port number

java.rmi.RemoteException

setTargetPort

public void setTargetPort(int i)
                   throws java.rmi.RemoteException
Set the SNMP target port number

java.rmi.RemoteException

getCommunity

public java.lang.String getCommunity()
                              throws java.rmi.RemoteException
Get the SNMP target Community

java.rmi.RemoteException

setCommunity

public void setCommunity(java.lang.String s)
                  throws java.rmi.RemoteException
Set the SNMP target Community

java.rmi.RemoteException

getWriteCommunity

public java.lang.String getWriteCommunity()
                                   throws java.rmi.RemoteException
Get the SNMP target write Community to be used for set requests

java.rmi.RemoteException

setWriteCommunity

public void setWriteCommunity(java.lang.String s)
                       throws java.rmi.RemoteException
Set the SNMP target write Community to be used for set requests

java.rmi.RemoteException

getTimeout

public int getTimeout()
               throws java.rmi.RemoteException
Get the SNMP target timeout value

java.rmi.RemoteException

setTimeout

public void setTimeout(int i)
                throws java.rmi.RemoteException
Set the SNMP target timeout value

java.rmi.RemoteException

getRetries

public int getRetries()
               throws java.rmi.RemoteException
Get the SNMP target retries value. Default is 0.

java.rmi.RemoteException

setRetries

public void setRetries(int i)
                throws java.rmi.RemoteException
Set the SNMP target retries value. Default is 0.

java.rmi.RemoteException

getMaxRepetitions

public int getMaxRepetitions()
                      throws java.rmi.RemoteException
v2c and v3 only Get the SNMP target max repetitions value for a getbulk request

java.rmi.RemoteException

setMaxRepetitions

public void setMaxRepetitions(int i)
                       throws java.rmi.RemoteException
v2c and v3 only Set the SNMP target max repetitions value for a getbulk request

java.rmi.RemoteException

getNonRepeaters

public int getNonRepeaters()
                    throws java.rmi.RemoteException
v2c and v3 only Get the SNMP target non-repeaters value for a getbulk request

java.rmi.RemoteException

setNonRepeaters

public void setNonRepeaters(int i)
                     throws java.rmi.RemoteException
v2c and v3 only Set the SNMP target non-repeaters value for a getbulk request

java.rmi.RemoteException

getSnmpVersion

public int getSnmpVersion()
                   throws java.rmi.RemoteException
v2c and v3 only Get the SNMP target SNMP Version. 0 is Version 1 (default) and 1 is Version V2C.

java.rmi.RemoteException

setSnmpVersion

public void setSnmpVersion(int i)
                    throws java.rmi.RemoteException
v2c and v3 only Set the SNMP target SNMP Version. 0 is Version 1 (default) and 1 is Version V2C.

java.rmi.RemoteException

getErrorString

public java.lang.String getErrorString()
                                throws java.rmi.RemoteException
Get the error string from the last request.

java.rmi.RemoteException

getErrorCode

public int getErrorCode()
                 throws java.rmi.RemoteException
get the error code from the last request.

java.rmi.RemoteException

getAttemptPartial

public boolean getAttemptPartial()
                          throws java.rmi.RemoteException
Returns the boolean state of whether this target will try to get partial data from an agent if a multiple variable request.

java.rmi.RemoteException

setAttemptPartial

public void setAttemptPartial(boolean b)
                       throws java.rmi.RemoteException
Sets the boolean state of whether this target will try to get partial data from an agent if a multiple variable request.

java.rmi.RemoteException

getSendTimeoutEvents

public boolean getSendTimeoutEvents()
                             throws java.rmi.RemoteException
Returns the boolean state of whether this target will send timeout events to a registered listener.

java.rmi.RemoteException

setSendTimeoutEvents

public void setSendTimeoutEvents(boolean b)
                          throws java.rmi.RemoteException
Sets the boolean state of whether this target will send timeout events to a registered listener.

java.rmi.RemoteException

addResultListener

public void addResultListener(ResultListener l)
                       throws java.rmi.RemoteException
Add a listener for events from this target. The listener listens for events from any or all SNMP requests.

java.rmi.RemoteException

removeResultListener

public void removeResultListener(ResultListener l)
                          throws java.rmi.RemoteException
Remove a listener for events from this target.

java.rmi.RemoteException

getMibOperations

public MibOperations getMibOperations()
                               throws java.rmi.RemoteException
Get the MibOperations object reference. This allows using additonal MibOperations functions if needed.

java.rmi.RemoteException

snmpGetAllList

public java.lang.String[][] snmpGetAllList()
                                    throws java.rmi.RemoteException
Get all instances of variables in the OID list. Returns variables as a two dimensional array of strings Useful for small tables. Return null if no OIDs specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpGetAllVariables

public SnmpVar[][] snmpGetAllVariables()
                                throws java.rmi.RemoteException
Get all instances of variables in the OID list. Returns variables as a two dimensional array of SnmpVar's Useful for small tables. Return null if no OIDs specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpGetAllVariableBindings

public SnmpVarBind[][] snmpGetAllVariableBindings()
                                           throws java.rmi.RemoteException
Get all instances of variables in the OID list. Returns variables as a two dimensional array of SnmpVarBind's Useful for small tables. Return null if no OIDs specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

java.rmi.RemoteException

snmpGetBulkList

public java.lang.String[][] snmpGetBulkList()
                                     throws java.rmi.RemoteException
v2c and v3 only Get bulk on list of variables in the OID list. Available only for SNMPv2c v3 onlyand SNMPv3 cases. v2c and v3 only Returns String-valued variables as a two dimensional array of String's. Returns null if no OIDs specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

Please see RFC 1905 if you're not familiar with getbulk. Beyond the first set of non-repeater OIDS, i.e. OIDs that want only a single next value, the data can be viewed a table, where we're getting rows upto "max repetitions" rows. The returned data is composed of a two-dimensional array where the first "nonRepeaters" columns have only the first data element filled in. The remaining have the rows filled in as expected. Typically, non-repeaters is 0, and we'd be returning a completely filled-in 2-D array of values.

The OID List after this request is set to the last set of OIDs in the returned bulk data, except for the initial non-repeaters for which it is set to the first and only returned OID.

java.rmi.RemoteException

snmpGetBulkVariableBindings

public SnmpVarBind[][] snmpGetBulkVariableBindings()
                                            throws java.rmi.RemoteException
v2c and v3 only Get bulk on list of variables in the OID list. Available only for SNMPv2c v3 onlyand SNMPv3 cases. v2c and v3 only Returns variable bindings as a two dimensional array of SnmpVarBind's. Returns null if no OIDs specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

Please see RFC 1905 if you're not familiar with getbulk. Beyond the first set of non-repeater OIDS, i.e. OIDs that want only a single next value, the data can be viewed a table, where we're getting rows upto "max repetitions" rows. The returned data is composed of a two-dimensional array where the first "nonRepeaters" columns have only the first data element filled in. The remaining have the rows filled in as expected. Typically, non-repeaters is 0, and we'd be returning a completely filled-in 2-D array of values.

The OID List after this request is set to the last set of OIDs in the returned bulk data, except for the initial non-repeaters for which it is set to the first and only returned OID.

java.rmi.RemoteException

snmpGetBulkVariables

public SnmpVar[][] snmpGetBulkVariables()
                                 throws java.rmi.RemoteException
v2c and v3 only Get bulk on list of variables in the OID list. Available only for SNMPv2c v3 onlyand SNMPv3 cases. v2c and v3 only Returns variables as a two dimensional array of SnmpVar's. Returns null if no OIDs specified earlier or in case of errors. See error data for details, i.e. use getErrorString() to see the reason for failure.

Please see RFC 1905 if you're not familiar with getbulk. Beyond the first set of non-repeater OIDS, i.e. OIDs that want only a single next value, the data can be viewed a table, where we're getting rows upto "max repetitions" rows. The returned data is composed of a two-dimensional array where the first "nonRepeaters" columns have only the first data element filled in. The remaining have the rows filled in as expected. Typically, non-repeaters is 0, and we'd be returning a completely filled-in 2-D array of values.

The OID List after this request is set to the last set of OIDs in the returned bulk data, except for the initial non-repeaters for which it is set to the first and only returned OID.

java.rmi.RemoteException

isInSubTree

public boolean isInSubTree(SnmpOID rootoid,
                           SnmpOID objid)
                    throws java.rmi.RemoteException
Check if objid has rootoid as an ancestor. Return true if it does. This performs a straightforward compare to see if the object-id starts with the rootoid. It is useful for walking through a column in which a walk could be terminated when the returned object id is not in the sub-tree of the column oid.

java.rmi.RemoteException

getSecurityLevel

public java.lang.String getSecurityLevel()
                                  throws java.rmi.RemoteException
v3 only get the SNMP V3 SecurityLevel

java.rmi.RemoteException

setSecurityLevel

public void setSecurityLevel(byte sLevel)
                      throws java.rmi.RemoteException
v3 only set the SNMP V3 SecurityLevel

java.rmi.RemoteException

isSerialize

public boolean isSerialize()
                    throws java.rmi.RemoteException
v3 only return the status of Serialization of v3 tables ( USMUserTable and SnmpEngineTable )

java.rmi.RemoteException

create_v3_tables

public void create_v3_tables()
                      throws java.rmi.RemoteException
java.rmi.RemoteException

getPrincipal

public java.lang.String getPrincipal()
                              throws java.rmi.RemoteException
v3 only Get the SNMP Principal

java.rmi.RemoteException

setPrincipal

public void setPrincipal(java.lang.String s)
                  throws java.rmi.RemoteException
v3 only Set the SNMP Principal

java.rmi.RemoteException

getSecurityModel

public int getSecurityModel()
                     throws java.rmi.RemoteException
v3 only get the SNMP V3 securityModel

java.rmi.RemoteException

setSecurityModel

public void setSecurityModel(int secModel)
                      throws java.rmi.RemoteException
v3 only Set the SNMPv3 Security Model

java.rmi.RemoteException

initSecurityProvider

public void initSecurityProvider()
                          throws java.rmi.RemoteException
v3 only Initialise the SNMPv3 Security provider

java.rmi.RemoteException

getAuthProtocol

public int getAuthProtocol()
                    throws java.rmi.RemoteException
v3 only Get the SNMP Auth Protocol

java.rmi.RemoteException

setAuthProtocol

public void setAuthProtocol(int protocol)
                     throws java.rmi.RemoteException
v3 only Set the SNMP Auth Protocol

java.rmi.RemoteException

getAuthPassword

public java.lang.String getAuthPassword()
                                 throws java.rmi.RemoteException
v3 only Get the SNMP Auth Password

java.rmi.RemoteException

setAuthPassword

public void setAuthPassword(java.lang.String password)
                     throws java.rmi.RemoteException
v3 only Set the SNMP Auth Password

java.rmi.RemoteException

getPrivPassword

public java.lang.String getPrivPassword()
                                 throws java.rmi.RemoteException
v3 only Get the SNMP Privacy Password \

java.rmi.RemoteException

setPrivPassword

public void setPrivPassword(java.lang.String password)
                     throws java.rmi.RemoteException
v3 only set the SNMP Privacy Password

java.rmi.RemoteException

getContextName

public java.lang.String getContextName()
                                throws java.rmi.RemoteException
v3 only Get the SNMP V3 Context name

java.rmi.RemoteException

setContextName

public void setContextName(java.lang.String cName)
                    throws java.rmi.RemoteException
v3 only Set the SNMP V3 Context name

java.rmi.RemoteException

getContextID

public java.lang.String getContextID()
                              throws java.rmi.RemoteException
v3 only Get the SNMP V3 contextID

java.rmi.RemoteException

setContextID

public void setContextID(java.lang.String ctxtID)
                  throws java.rmi.RemoteException
v3 only Set the SNMP V3 contextID

java.rmi.RemoteException

setMaxNumRows

public void setMaxNumRows(int maxRows)
                   throws java.rmi.RemoteException
Sets the maximum number of rows that can be processed. Default value is MAX_NUM_ROWS set in the SnmpTarget.

java.rmi.RemoteException

getMaxNumRows

public int getMaxNumRows()
                  throws java.rmi.RemoteException
Gets the maximum number of rows that can be processed. Default value is MAX_NUM_ROWS set in the SnmpTarget.

java.rmi.RemoteException

releaseResources

public void releaseResources()
                      throws java.rmi.RemoteException
Though the resources will be cleaned up by the garbage collector, if the application is no more using the SnmpTarget bean instances, this method can be used to immediately release the resources. Close the session and api if number of targets sharing it becomes zero. Otherwise decrement the targets count for that session and api.

java.rmi.RemoteException

getExceptionCode

public int getExceptionCode()
                     throws java.rmi.RemoteException
v2c and v3 only Gets the exception code for the last request. Before sending any request the exception code will be -1.

Returns:
the exception code in case of exception and 0 if there is no exception.
java.rmi.RemoteException

setTimeoutInMilliSec

public void setTimeoutInMilliSec(int time)
                          throws java.rmi.RemoteException
Sets the timeout value which should be given in milliseconds.

Parameters:
time - The timeout value to be set in milliseconds.
java.rmi.RemoteException

isSupportedSecurityModel

public boolean isSupportedSecurityModel(int secModel)
                                 throws java.rmi.RemoteException
v3 only Specifies if a particular security model is supported or not. Returns true if the security model is supported. False otherwise.

Parameters:
secModel - The secuirty model number which needs to be checked if it is supported.
Returns:
true if the specified securitymodel is supported. False otherwise.
java.rmi.RemoteException

manage_v3_tables

public void manage_v3_tables()
                      throws java.rmi.RemoteException
v3 only Method to create new users and add them to userTable in USMUserTable. If the v3 parameters specified are already present in the userTable, it modifies the entry. However the UserName cannot be modified.

java.rmi.RemoteException


Copyright (c)ZOHO Corp. 1996-2012