Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 5_1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.co.westhawk.examplev3
Class SnmpTarget

    java.lang.Object
      |
      +--uk.co.westhawk.examplev3.SnmpTarget

public class SnmpTarget
extends java.lang.Object

The SnmpTarget class is used in the StreamEventMonitor class. It creates either a SNMPv1 or a SNMPv3 context and offers various get requests.

Version:
  $Revision: 1.3 $ $Date: 2006/01/17 17:43:52 $
Author:
  Tim Panton
See Also:
  `StreamEventMonitor`

Constructor Summary
`SnmpTarget()`

Method Summary
`void` | `setObjectID(java.lang.String oid)` Sets an OID.
`void` | `setObjectIDList(java.lang.String[] oids)` Sets a list of OIDs.
`void` | `setParameters(java.lang.String host, int port, java.lang.String community, boolean netscape)` Sets the SNMPv1 parameters and creates a SnmpContextPool context.
`void` | `setParameters(java.lang.String host, int port, java.lang.String user, java.lang.String pass, java.lang.String contextName, byte[] contextEngineId, int proto, boolean netscape)` Sets the SNMPv3 parameters and creates a SnmpContextv3Pool context.
`varbind` | `snmpGetNextVariableBinding()` Performs a (blocked) getNextRequest with the context created in setParameters.
`AsnObject` | `snmpGetVariable()` Performs a (blocked) getRequest with the context created in setParameters.
`varbind` | `snmpGetVariableBinding()` Performs a (blocked) getRequest with the context created in setParameters.
`varbind[]` | `snmpGetVariableBindings()` Performs a (blocked) getRequest with the context created in setParameters.
`AsnObject[]` | `snmpGetVariables()` Performs a (blocked) getRequest with the context created in setParameters.
`AsnObject` | `snmpSetVariable(AsnObject var)` Performs a (blocked) setRequest with the context created in setParameters.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SnmpTarget

    public SnmpTarget()

Method Detail

### setParameters

    public void setParameters(java.lang.String host,
                              int port,
                              java.lang.String community,
                              boolean netscape)

  Sets the SNMPv1 parameters and creates a SnmpContextPool context.

### setParameters

    public void setParameters(java.lang.String host,
                              int port,
                              java.lang.String user,
                              java.lang.String pass,
                              java.lang.String contextName,
                              byte[] contextEngineId,
                              int proto,
                              boolean netscape)

  Sets the SNMPv3 parameters and creates a SnmpContextv3Pool context.

### setObjectID

    public void setObjectID(java.lang.String oid)

  Sets an OID.

### setObjectIDList

    public void setObjectIDList(java.lang.String[] oids)

  Sets a list of OIDs.

### snmpGetVariable

    public AsnObject snmpGetVariable()

  Performs a (blocked) getRequest with the context created in setParameters.

  See Also:
    `BlockPdu.getResponseVariable()`

### snmpGetVariables

    public AsnObject[] snmpGetVariables()

  Performs a (blocked) getRequest with the context created in setParameters.

  See Also:
    `BlockPdu.getResponseVariables()`

### snmpGetVariableBinding

    public varbind snmpGetVariableBinding()

  Performs a (blocked) getRequest with the context created in setParameters.

  See Also:
    `BlockPdu.getResponseVariableBinding()`

### snmpGetVariableBindings

    public varbind[] snmpGetVariableBindings()

  Performs a (blocked) getRequest with the context created in setParameters.

  See Also:
    `BlockPdu.getResponseVariableBindings()`

### snmpGetNextVariableBinding

    public varbind snmpGetNextVariableBinding()

  Performs a (blocked) getNextRequest with the context created in setParameters.

  See Also:
    `BlockPdu.getResponseVariableBinding()`

### snmpSetVariable

    public AsnObject snmpSetVariable(AsnObject var)

  Performs a (blocked) setRequest with the context created in setParameters.

  See Also:
    `BlockPdu.getResponseVariable()`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 5_1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD