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 SimpleUsmAgent

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

All Implemented Interfaces:
  UsmAgent

public class SimpleUsmAgent
extends java.lang.Object
implements UsmAgent

This implementation of UsmAgent just returns static, constant values.

Users are advised and encouraged to provide a better, more accurate implementation of UsmAgent.

See SNMP-USER-BASED-SM-MIB.

Since:
  4_14
Version:
  $Revision: 1.5 $ $Date: 2006/03/23 14:54:09 $
Author:
  Birgit Arkesteijn
See Also:
  `SnmpContextv3`

Field Summary

Fields inherited from interface uk.co.westhawk.snmp.stack.UsmAgent
`MYFAKEHOSTNAME, version_id`

Constructor Summary
`SimpleUsmAgent()`

Method Summary
`int` | `getSnmpEngineBoots()` Returns the authoritative Engine Boots.
`java.lang.String` | `getSnmpEngineId()` Returns the authoritative SNMP Engine ID.
`int` | `getSnmpEngineTime()` Returns the authoritative Engine Time.
`long` | `getUsmStatsNotInTimeWindows()` Returns the value of the usmStatsNotInTimeWindows counter.
`long` | `getUsmStatsUnknownEngineIDs()` Returns the value of the usmStatsUnknownEngineIDs counter.
`void` | `setSnmpContext(SnmpContextv3Basis c)` Sets the SNMP context.
`void` | `setSnmpEngineBoots(int boots)`
`void` | `setSnmpEngineId(java.lang.String snmpEngineId)`
`void` | `setSnmpEngineTime(int time)` Returns the authoritative Engine Time.
`void` | `setUsmStatsNotInTimeWindows(int usmStatsNotInTimeWindows)`
`void` | `setUsmStatsUnknownEngineIDs(int usmStatsUnknownEngineIDs)`

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

Constructor Detail

### SimpleUsmAgent

    public SimpleUsmAgent()

Method Detail

### setSnmpEngineId

    public void setSnmpEngineId(java.lang.String snmpEngineId)

### getSnmpEngineId

    public java.lang.String getSnmpEngineId()

  Description copied from interface: `UsmAgent`
  Returns the authoritative SNMP Engine ID. It uniquely and unambiguously identifies the SNMP engine, within an administrative domain.

  The Engine ID is the (case insensitive) string representation of a hexadecimal number, without any prefix, for example 010000a1d41e4946.

  Specified by:
    `getSnmpEngineId` in interface `UsmAgent`
  See Also:
    `SnmpUtilities.toBytes(String)`

### setSnmpEngineBoots

    public void setSnmpEngineBoots(int boots)

### getSnmpEngineBoots

    public int getSnmpEngineBoots()

  Description copied from interface: `UsmAgent`
  Returns the authoritative Engine Boots. It is a count of the number of times the SNMP engine has re-booted/re-initialized since snmpEngineID was last configured.

  Specified by:
    `getSnmpEngineBoots` in interface `UsmAgent`

### setSnmpEngineTime

    public void setSnmpEngineTime(int time)

  Returns the authoritative Engine Time. If the discovery failed, 1 will be returned.

  Returns:
    The Engine Time

### getSnmpEngineTime

    public int getSnmpEngineTime()

  Description copied from interface: `UsmAgent`
  Returns the authoritative Engine Time. It is the number of seconds since the snmpEngineBoots counter was last incremented.

  Specified by:
    `getSnmpEngineTime` in interface `UsmAgent`

### setSnmpContext

    public void setSnmpContext(SnmpContextv3Basis c)

  Sets the SNMP context. It will do a discovery if needed.

  Specified by:
    `setSnmpContext` in interface `UsmAgent`

### setUsmStatsUnknownEngineIDs

    public void setUsmStatsUnknownEngineIDs(int usmStatsUnknownEngineIDs)

### getUsmStatsUnknownEngineIDs

    public long getUsmStatsUnknownEngineIDs()

  Description copied from interface: `UsmAgent`
  Returns the value of the usmStatsUnknownEngineIDs counter. The stack needs this when responding to a discovery request.

  Specified by:
    `getUsmStatsUnknownEngineIDs` in interface `UsmAgent`

### setUsmStatsNotInTimeWindows

    public void setUsmStatsNotInTimeWindows(int usmStatsNotInTimeWindows)

### getUsmStatsNotInTimeWindows

    public long getUsmStatsNotInTimeWindows()

  Description copied from interface: `UsmAgent`
  Returns the value of the usmStatsNotInTimeWindows counter. The stack needs this when responding to a discovery request.

  Specified by:
    `getUsmStatsNotInTimeWindows` in interface `UsmAgent`

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