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

## com.sun.management.comm
Class SnmpV3AdaptorServer

    java.lang.Object
      com.sun.jdmk.comm.CommunicatorServer
          com.sun.management.comm.CommunicatorServer
              com.sun.management.comm.SnmpAdaptorServer
                  com.sun.management.comm.SnmpV3AdaptorServer

All Implemented Interfaces:
  CommunicatorServerMBean, MBeanRegistration, NotificationBroadcaster, Runnable, SnmpAdaptorServerMBean, SnmpDefinitions, SnmpMibHandler, SnmpV3AdaptorServerMBean

public class SnmpV3AdaptorServer
extends SnmpAdaptorServer
implements SnmpV3AdaptorServerMBean

Implements an adaptor on top of the SNMP V3 protocol.

This adaptor deals with SNMP V1 and V2c protocols too (thanks to the `SnmpAdaptorServer` inheritence).

The `SnmpV3AdaptorServer`can be seen as an SNMP V3 engine. The engine is constructed at `SnmpV3AdaptorServer` construction time. This engine contains :

- 3 Message Processing Model (SNMP V1, V2 and V3)
- 1 Message Security Model (User based Security Model) implementing `usmHMACMD5AuthProtocol` and `usmHMACSHAAuthProtocol` authentication algorithms.
- 1 Access Control Model compatible with IP Acl for SNMP V1 and SNMP V2. It also implements of a simple user based Acm using a user based ACL.

IP Acl is configured as with `SnmpAdaptorServer`. To configure user Acl, see `JdmkUserAcl`.

Since:
  Java DMK 5.1

Field Summary

Fields inherited from class com.sun.jdmk.comm.CommunicatorServer
`HTML_TYPE, HTTP_TYPE, HTTPS_TYPE, OFFLINE, ONLINE, RMI_TYPE, SNMP_TYPE, STARTING, STOPPING`

Fields inherited from interface com.sun.management.snmp.SnmpDefinitions
`authMask, authNoPriv, authPriv, authPrivMask, CtxtConsFlag, noAuthNoPriv, noGroupName, noSuchContext, noSuchView, notInView, pduGetBulkRequestPdu, pduGetNextRequestPdu, pduGetRequestPdu, pduGetResponsePdu, pduInformRequestPdu, pduReportPdu, pduSetRequestPdu, pduV1TrapPdu, pduV2TrapPdu, pduWalkRequest, privMask, reportableFlag, snmpAuthNotSupported, snmpBadSecurityLevel, snmpPrivNotSupported, snmpReqAborted, snmpReqEncodingError, snmpReqHandleTooBig, snmpReqInternalError, snmpReqPacketOverflow, snmpReqRefireAfterVbFix, snmpReqSocketIOError, snmpReqTimeout, snmpReqTooBigImpossible, snmpReqUnknownError, snmpRspAuthorizationError, snmpRspBadValue, snmpRspCommitFailed, snmpRspDecodingError, snmpRspEndOfTable, snmpRspGenErr, snmpRspInconsistentName, snmpRspInconsistentValue, snmpRspNoAccess, snmpRspNoCreation, snmpRspNoError, snmpRspNoSuchName, snmpRspNotWritable, snmpRspReadOnly, snmpRspResourceUnavailable, snmpRspTooBig, snmpRspUndoFailed, snmpRspWrongEncoding, snmpRspWrongLength, snmpRspWrongType, snmpRspWrongValue, snmpUnknownPrincipal, snmpUsmBadEngineId, snmpUsmInvalidTimeliness, snmpUsmSecurityModel, snmpV1AccessControlModel, snmpV1MsgProcessingModel, snmpV1SecurityModel, snmpV2AccessControlModel, snmpV2MsgProcessingModel, snmpV2SecurityModel, snmpV3AccessControlModel, snmpV3MsgProcessingModel, snmpVersionOne, snmpVersionThree, snmpVersionTwo, snmpWrongSnmpVersion, trapAuthenticationFailure, trapColdStart, trapEgpNeighborLoss, trapEnterpriseSpecific, trapLinkDown, trapLinkUp, trapWarmStart`

Constructor Summary
`SnmpV3AdaptorServer()` Initializes this SNMP protocol adaptor using the default port (161).
`SnmpV3AdaptorServer(boolean useAcl, int port, InetAddress addr)` Initializes this SNMP protocol adaptor using the specified port and the specified `InetAddress`.
`SnmpV3AdaptorServer(InetAddress addr)` Initializes this SNMP protocol adaptor using the default port (161) and the specified `InetAddress`.
`SnmpV3AdaptorServer(InetAddressAcl acl)` Initializes this SNMP protocol adaptor using the default port (161) and the specified IP address based ACL implementation.
`SnmpV3AdaptorServer(InetAddressAcl acl, InetAddress addr)` Initializes this SNMP protocol adaptor using the specified IP address based ACL implementation and the specified `InetAddress`.
`SnmpV3AdaptorServer(InetAddressAcl acl, int port)` Initializes this SNMP protocol adaptor using the specified port and the specified IP address based ACL implementation.
`SnmpV3AdaptorServer(InetAddressAcl acl, int port, InetAddress addr)` Initializes this SNMP protocol adaptor using the specified port, the specified address based ACL implementation and the specified `InetAddress`.
`SnmpV3AdaptorServer(int port)` Initializes this SNMP protocol adaptor using the specified port.
`SnmpV3AdaptorServer(int port, InetAddress addr)` Initializes this SNMP protocol adaptor using the specified port and the specified `InetAddress`.
`SnmpV3AdaptorServer(SnmpEngineParameters parameters, SnmpEngineFactory factory, boolean useAcl, int port, InetAddress addr)` Initializes this SNMP protocol adaptor with a specified factory, engine parameters, port and the specified `InetAddress`.
`SnmpV3AdaptorServer(SnmpEngineParameters parameters, SnmpEngineFactory factory, InetAddressAcl ipacl, int port, InetAddress addr)` Initializes this SNMP protocol adaptor with a specified factory, engine parameters, an ACL implementation, a port, and the specified `InetAddress`.

Method Summary
`SnmpMibHandler` | `addMib(SnmpMibAgent mib, String contextName)` Adds a new contextualized MIB in the SNMP MIB handler.
`SnmpMibHandler` | `addMib(SnmpMibAgent mib, String contextName, SnmpOid[] oids)` Adds a new contextualized MIB in the SNMP MIB handler.
`void` | `addRequestForwarder(SnmpRequestForwarder forwarder, SnmpEngineId contextEngineId)` Adds a new MIB forwarder attached to a passed engine Id.
`protected ObjectName` | `createUsmMibObjectName(SnmpEngine engine)` This method is called by the adaptor.
`boolean` | `disableCommunityStringAtContext()` Deactivate the community string to context translation.
`boolean` | `disableSnmpV1V2SetRequest()` Disable SNMP V1 and V2 set requests.
`boolean` | `enableCommunityStringAtContext()` Activate the community string to context translation.
`boolean` | `enableSnmpV1V2SetRequest()` Enable SNMP V1 and V2 set requests.
`int[]` | `getAccessControlModelIds()` Returns an array of access control model Ids.
`String[]` | `getAccessControlModelNames()` Returns an array of access control model names.
`String[]` | `getContexts()` Returns the list of contexts in which some MIBs have been registered.
`SnmpEngine` | `getEngine()` Returns the associated `SnmpEngine` value.
`SnmpEngineId` | `getEngineId()` Returns the associated `SnmpEngineId` value.
`String[]` | `getMibs()` Returns the names of the MIBs available in this SNMP protocol adaptor.
`String[]` | `getMibs(String context)` Returns the names of the MIBs registered in the passed contextName.
`int[]` | `getMsgProcessingModelIds()` Returns an array of message processing model Ids.
`String[]` | `getMsgProcessingModelNames()` Returns an array of message processing model names.
`int[]` | `getSecurityModelIds()` Returns an array of security model Ids.
`String[]` | `getSecurityModelNames()` Returns an array of security model names.
`Long` | `getSnmpInvalidMsgs()` Returns `snmpInvalidMsgs` as defined in RFC 2572 SNMP-MPD-MIB.
`Long` | `getSnmpUnknownContexts()` Returns `snmpUnknownContexts` as defined in RFC 2573 SNMP-TARGET-MIB.
`Long` | `getSnmpUnknownPDUHandlers()` Returns `snmpUnknownPDUHandlers` as defined in RFC 2572 SNMP-MPD-MIB.
`Long` | `getSnmpUnknownSecurityModels()` Returns `snmpUnknownSecurityModels` as defined in RFC 2572 SNMP-MPD-MIB.
`String[]` | `getUsmSecurityAlgorithms()` Returns an array of User based Security Model supported algorithms.
`boolean` | `isCommunityStringAtContextEnabled()` The community to context translation activation status.
`boolean` | `isSnmpV1V2SetRequestAuthorized()` The SNMP V1 and V2 set requests authorization status.
`void` | `registerUsmMib()` In order to register the USM mib in the `SnmpV3AdaptorServer`.
`void` | `registerUsmMib(MBeanServer server, ObjectName obj)` In order to register the USM mib in the `MBeanServer` .
`boolean` | `removeMib(SnmpMibAgent mib, String contextName)` Removes a contextualized MIB from the SNMP protocol adaptor.
`boolean` | `removeMib(SnmpMibAgent mib, String contextName, SnmpOid[] oids)` Removes the specified MIB from the SNMP protocol adaptor.
`boolean` | `removeRequestForwarder(SnmpEngineId engineId)` Removes a request forwarder.
`SnmpV3InformRequest` | `snmpV3InformRequest(InetAddress addr, SnmpInformHandler cb, SnmpScopedPduRequest pdu, SnmpOid trapOid, SnmpVarBindList varBindList)` You shouldn't use this method directly.
`void` | `snmpV3Trap(InetAddress addr, SnmpScopedPduRequest pdu)` You shouldn't call this method directly.
`void` | `snmpV3Trap(SnmpScopedPduRequest pdu)` You shouldn't call this method directly.
`void` | `snmpV3Trap(SnmpUsmPeer peer, SnmpScopedPduRequest pdu)` You shouldn't call this method directly.
`SnmpV3InformRequest` | `snmpV3UsmInformRequest(SnmpUsmPeer informPeer, SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList list)` Sends an inform request using SNMP V3 inform request format.
`void` | `snmpV3UsmTrap(InetAddress addr, String principal, int securityLevel, String contextName, SnmpOid trapOid, SnmpVarBindList list)` Sends a trap to the specified address using Usm as security model.
`void` | `snmpV3UsmTrap(InetAddress addr, String principal, int securityLevel, String contextName, SnmpOid trapOid, SnmpVarBindList list, SnmpTimeticks time)` Sends a trap to the specified address using Usm as security model.
`void` | `snmpV3UsmTrap(SnmpUsmPeer peer, SnmpOid trapOid, SnmpVarBindList list, SnmpTimeticks time)` Sends a trap to the specified `SnmpUsmPeer` using Usm as security model.
`void` | `snmpV3UsmTrap(String principal, int securityLevel, String contextName, SnmpOid trapOid, SnmpVarBindList list)` Sends a trap to all IP addresses in `InetAddressAcl` using Usm as security model.

Methods inherited from class com.sun.management.comm.SnmpAdaptorServer
`addMib, addMib, doBind, doError, doProcess, doReceive, doUnbind, finalize, getActiveClientCount, getAuthRespEnabled, getAuthTrapEnabled, getBufferSize, getEnterpriseOid, getHost, getInetAddressAcl, getInformPort, getMaxActiveClientCount, getMaxTries, getPduFactory, getPort, getProtocol, getServedClientCount, getSnmpInASNParseErrs, getSnmpInBadCommunityNames, getSnmpInBadCommunityUses, getSnmpInBadVersions, getSnmpInGetNexts, getSnmpInGetRequests, getSnmpInPkts, getSnmpInSetRequests, getSnmpInTotalReqVars, getSnmpInTotalSetVars, getSnmpOutBadValues, getSnmpOutGenErrs, getSnmpOutGetResponses, getSnmpOutNoSuchNames, getSnmpOutPkts, getSnmpOutTooBigs, getSnmpOutTraps, getSnmpProxyDrops, getSnmpSilentDrops, getSysUpTime, getTimeout, getTrapPort, getUserDataFactory, mapErrorStatus, postDeregister, postRegister, preDeregister, preRegister, removeMib, removeMib, setAuthRespEnabled, setAuthTrapEnabled, setBufferSize, setEnterpriseOid, setInformPort, setMaxActiveClientCount, setMaxTries, setPduFactory, setPort, setTimeout, setTrapPort, setUserDataFactory, snmpInformRequest, snmpInformRequest, snmpInformRequest, snmpPduTrap, snmpPduTrap, snmpV1Trap, snmpV1Trap, snmpV1Trap, snmpV1Trap, snmpV2Trap, snmpV2Trap, snmpV2Trap, snmpV2Trap, stop`

Methods inherited from class com.sun.management.comm.CommunicatorServer
`addNotificationListener, getMBeanServer, getNotificationInfo, getState, getStateString, isActive, removeNotificationListener, run, setMBeanServer, start, waitState`

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

Methods inherited from interface com.sun.management.comm.SnmpAdaptorServerMBean
`addMib, addMib, getActiveClientCount, getAuthRespEnabled, getAuthTrapEnabled, getBufferSize, getEnterpriseOid, getInetAddressAcl, getInformPort, getMaxActiveClientCount, getMaxTries, getPduFactory, getProtocol, getServedClientCount, getSnmpInASNParseErrs, getSnmpInBadCommunityNames, getSnmpInBadCommunityUses, getSnmpInBadVersions, getSnmpInGetNexts, getSnmpInGetRequests, getSnmpInPkts, getSnmpInSetRequests, getSnmpInTotalReqVars, getSnmpInTotalSetVars, getSnmpOutBadValues, getSnmpOutGenErrs, getSnmpOutGetResponses, getSnmpOutNoSuchNames, getSnmpOutPkts, getSnmpOutTooBigs, getSnmpOutTraps, getSnmpProxyDrops, getSnmpSilentDrops, getTimeout, getTrapPort, getUserDataFactory, removeMib, setAuthRespEnabled, setAuthTrapEnabled, setBufferSize, setEnterpriseOid, setInformPort, setMaxActiveClientCount, setMaxTries, setPduFactory, setTimeout, setTrapPort, setUserDataFactory, snmpInformRequest, snmpInformRequest, snmpInformRequest, snmpPduTrap, snmpPduTrap, snmpV1Trap, snmpV1Trap, snmpV1Trap, snmpV2Trap, snmpV2Trap, snmpV2Trap`

Methods inherited from interface com.sun.jdmk.comm.CommunicatorServerMBean
`getHost, getPort, getState, getStateString, isActive, setPort, start, stop, waitState`

Constructor Detail

### SnmpV3AdaptorServer

    public SnmpV3AdaptorServer()
                        throws IllegalArgumentException

  Initializes this SNMP protocol adaptor using the default port (161). Use the `JdmkAcl` default implementation of the `InetAddressAcl` interface. The SNMP engine is instantiated at the same time.

  WARNING : The engine id is computed as follows:

  - If an lcd file is provided containing the property "localEngineID", this property value is used.
  .
  - If not, the adaptor computes an engine Id using the host and port number.

  In some cases the adaptor will fail during creation :

  - At least one of the provided configuration files doesn't exist (Acl files, lcd file)
  - The provided LCD file contains erroneous data.

Throws:
  `IllegalArgumentException` - If one of the specified configuration files doesn't exist or is incorrect.

### SnmpV3AdaptorServer

    public SnmpV3AdaptorServer(int port)
                        throws IllegalArgumentException

  Initializes this SNMP protocol adaptor using the specified port. Use the `JdmkAcl` default implementation of the `InetAddressAcl` interface.

  WARNING : The engine id is computed as follows:

  - If an lcd file is provided containing the property "localEngineID", this property value is used.
  .
  - If not, the adaptor computes an engine Id using the host and port number.

  In some cases the adaptor will fail during creation :

  - At least one of the provided configuration files doesn't exist (Acl files, lcd file)
  - The provided LCD file contains erroneous data.

Parameters:
  `port` - The port number for sending SNMP responses.
Throws:
  `IllegalArgumentException` - If one of the specified configuration files doesn't exist or is incorrect.

### SnmpV3AdaptorServer

    public SnmpV3AdaptorServer(InetAddressAcl acl)
                        throws IllegalArgumentException

  Initializes this SNMP protocol adaptor using the default port (161) and the specified IP address based ACL implementation.

  WARNING : The engine id is computed as follows:

  - If an lcd file is provided containing the property "localEngineID", this property value is used.
  .
  - If not, the adaptor computes an engine Id using the host and port number.

  In some cases the adaptor will fail during creation :

  - At least one of the provided configuration files doesn't exist (Acl files, lcd file)
  - The provided LCD file contains erroneous data.

Parameters:
  `acl` - The `InetAddressAcl` implementation.
Throws:
  `IllegalArgumentException` - If one of the specified configuration files doesn't exist or is incorrect.

### SnmpV3AdaptorServer

    public SnmpV3AdaptorServer(InetAddress addr)
                        throws IllegalArgumentException

  Initializes this SNMP protocol adaptor using the default port (161) and the specified `InetAddress`. Use the `JdmkAcl` default implementation of the `InetAddressAcl` interface.

  WARNING : The engine id is computed as follows:

  - If an lcd file is provided containing the property "localEngineID", this property value is used.
  .
  - If not, the adaptor computes an engine Id using the host and port number.

  In some cases the adaptor will fail during creation :

  - At least one of the provided configuration files doesn't exist (Acl files, lcd file)
  - The provided LCD file contains erroneous data.

Parameters:
  `addr` - The IP address to bind.
Throws:
  `IllegalArgumentException` - If one of the specified configuration files doesn't exist or is incorrect.

### SnmpV3AdaptorServer

    public SnmpV3AdaptorServer(InetAddressAcl acl,
                               int port)
                        throws IllegalArgumentException

  Initializes this SNMP protocol adaptor using the specified port and the specified IP address based ACL implementation.

  WARNING : The engine id is computed as follows:

  - If an lcd file is provided containing the property "localEngineID", this property value is used.
  .
  - If not, the adaptor computes an engine Id using the host and port number.

  In some cases the adaptor will fail during creation :

  - At least one of the provided configuration files doesn't exist (Acl files, lcd file)
  - The provided LCD file contains erroneous data.

Parameters:
  `acl` - The `InetAddressAcl` implementation.
  `port` - The port number for sending SNMP responses.
Throws:
  `IllegalArgumentException` - If one of the specified configuration files doesn't exist or is incorrect.

### SnmpV3AdaptorServer

    public SnmpV3AdaptorServer(int port,
                               InetAddress addr)
                        throws IllegalArgumentException

  Initializes this SNMP protocol adaptor using the specified port and the specified `InetAddress`. Use the `JdmkAcl` default implementation of the `InetAddressAcl` interface.

  WARNING : The engine id is computed as follows:

  - If an lcd file is provided containing the property "localEngineID", this property value is used.
  .
  - If not, the adaptor computes an engine Id using the host and port number.

  In some cases the adaptor will fail during creation :

  - At least one of the provided configuration files doesn't exist (Acl files, lcd file)
  - The provided LCD file contains erroneous data.

Parameters:
  `port` - The port number for sending SNMP responses.
  `addr` - The IP address to bind.
Throws:
  `IllegalArgumentException` - If one of the specified configuration files doesn't exist or is incorrect.

### SnmpV3AdaptorServer

    public SnmpV3AdaptorServer(InetAddressAcl acl,
                               InetAddress addr)
                        throws IllegalArgumentException

  Initializes this SNMP protocol adaptor using the specified IP address based ACL implementation and the specified `InetAddress`.

  WARNING : The engine id is computed as follows:

  - If an lcd file is provided containing the property "localEngineID", this property value is used.
  .
  - If not, the adaptor computes an engine Id using the host and port number.

  In some cases the adaptor will fail during creation :

  - At least one of the provided configuration files doesn't exist (Acl files, lcd file)
  - The provided LCD file contains erroneous data.

Parameters:
  `acl` - The `InetAddressAcl` implementation.
  `addr` - The IP address to bind.
Throws:
  `IllegalArgumentException` - If one of the specified configuration files doesn't exist or is incorrect.

### SnmpV3AdaptorServer

    public SnmpV3AdaptorServer(InetAddressAcl acl,
                               int port,
                               InetAddress addr)
                        throws IllegalArgumentException

  Initializes this SNMP protocol adaptor using the specified port, the specified address based ACL implementation and the specified `InetAddress`.

  WARNING : The engine id is computed as follows:

  - If an lcd file is provided containing the property "localEngineID", this property value is used.
  .
  - If not, the adaptor computes an engine Id using the host and port number.

  In some cases the adaptor will fail during creation :

  - At least one of the provided configuration files doesn't exist (Acl files, lcd file)
  - The provided LCD file contains erroneous data.

Parameters:
  `acl` - The `InetAddressAcl` implementation.
  `port` - The port number for sending SNMP responses.
  `addr` - The IP address to bind.
Throws:
  `IllegalArgumentException` - If one of the specified configuration files doesn't exist or is incorrect.

### SnmpV3AdaptorServer

    public SnmpV3AdaptorServer(boolean useAcl,
                               int port,
                               InetAddress addr)
                        throws IllegalArgumentException

  Initializes this SNMP protocol adaptor using the specified port and the specified `InetAddress`. This constructor allows you to initialize an SNMP adaptor without using the ACL mechanism (by setting the `useAcl` parameter to false).
  This constructor must be used in particular with a platform that does not support the `java.security.acl` package like pJava.

  WARNING : The engine id is computed as follows:

  - If an lcd file is provided containing the property "localEngineID", this property value is used.
  .
  - If not, the adaptor computes an engine Id using the host and port number.

  In some cases the adaptor will fail during creation :

  - At least one of the provided configuration files doesn't exist (Acl files, lcd file)
  - The provided LCD file contains erroneous data.

Parameters:
  `useAcl` - Specifies if this new SNMP adaptor uses the ACL mechanism. If the specified parameter is set to `true`, this constructor is equivalent to `SnmpV3AdaptorServer(int port, InetAddress addr)`.
  `port` - The port number for sending SNMP responses.
  `addr` - The IP address to bind.
Throws:
  `IllegalArgumentException` - If one of the specified configuration files doesn't exist or is incorrect.

### SnmpV3AdaptorServer

    public SnmpV3AdaptorServer(SnmpEngineParameters parameters,
                               SnmpEngineFactory factory,
                               InetAddressAcl ipacl,
                               int port,
                               InetAddress addr)
                        throws IllegalArgumentException

  Initializes this SNMP protocol adaptor with a specified factory, engine parameters, an ACL implementation, a port, and the specified `InetAddress`.

  WARNING : The engine id is computed as follows:

  - If an lcd file is provided containing the property "localEngineID", this property value is used.
  .
  - If the engine id of the specified engine parameters is not null, this one is used.
  - If not, the adaptor computes an engine Id using the host and port number.

  In some cases the adaptor will fail during creation :

  - At least one of the provided configuration files doesn't exist (Acl files, lcd file)
  - The provided LCD file contains erroneous data.

Parameters:
  `parameters` - The engine parameters to use.
  `factory` - The factory to use in order to create the engine.
  `ipacl` - The `InetAddressAcl` implementation.
  `port` - The port number for sending SNMP responses.
  `addr` - The IP address to bind.
Throws:
  `IllegalArgumentException` - If one of the specified configuration files doesn't exist or is incorrect.

### SnmpV3AdaptorServer

    public SnmpV3AdaptorServer(SnmpEngineParameters parameters,
                               SnmpEngineFactory factory,
                               boolean useAcl,
                               int port,
                               InetAddress addr)
                        throws IllegalArgumentException

  Initializes this SNMP protocol adaptor with a specified factory, engine parameters, port and the specified `InetAddress`. This constructor allows you to initialize an SNMP adaptor without using the ACL mechanism (by setting the `useAcl` parameter to false).
  This constructor must be used in particular with a platform that does not support the `java.security.acl` package like pJava.

  WARNING : The engine id is computed as follows:

  - If an lcd file is provided containing the property "localEngineID", this property value is used.
  .
  - If the engine id of the specified engine parameters is not null, this one is used.
  - If not, the adaptor computes an engine Id using the host and port number.

  In some cases the adaptor will fail during creation :

  - At least one of the provided configuration files doesn't exist (Acl files, lcd file)
  - The provided LCD file contains erroneous data.

Parameters:
  `parameters` - The engine parameters to use.
  `factory` - The factory to use in order to create the engine.
  `useAcl` - If set to false, no ACL is used.
  `port` - The port number for sending SNMP responses.
  `addr` - The IP address to bind.
Throws:
  `IllegalArgumentException` - If one of the specified configuration files doesn't exist or is incorrect.

Method Detail

### getSnmpUnknownSecurityModels

    public Long getSnmpUnknownSecurityModels()

  Returns `snmpUnknownSecurityModels` as defined in RFC 2572 SNMP-MPD-MIB.

  Specified by:
    `getSnmpUnknownSecurityModels` in interface `SnmpV3AdaptorServerMBean`
  Returns:
    snmpUnknownSecurityModels counter.

### getSnmpInvalidMsgs

    public Long getSnmpInvalidMsgs()

  Returns `snmpInvalidMsgs` as defined in RFC 2572 SNMP-MPD-MIB.

  Specified by:
    `getSnmpInvalidMsgs` in interface `SnmpV3AdaptorServerMBean`
  Returns:
    snmpInvalidMsgs counter.

### getSnmpUnknownContexts

    public Long getSnmpUnknownContexts()

  Returns `snmpUnknownContexts` as defined in RFC 2573 SNMP-TARGET-MIB.

  Specified by:
    `getSnmpUnknownContexts` in interface `SnmpV3AdaptorServerMBean`
  Returns:
    snmpUnknownContexts counter.

### getSnmpUnknownPDUHandlers

    public Long getSnmpUnknownPDUHandlers()

  Returns `snmpUnknownPDUHandlers` as defined in RFC 2572 SNMP-MPD-MIB.

  Returns:
    snmpUnknownPDUHandlers counter.

### getEngine

    public SnmpEngine getEngine()

  Returns the associated `SnmpEngine` value.

  Returns:
    The engine.

### getEngineId

    public SnmpEngineId getEngineId()

  Returns the associated `SnmpEngineId` value.

  Specified by:
    `getEngineId` in interface `SnmpV3AdaptorServerMBean`
  Returns:
    The engine Id.

### addMib

    public SnmpMibHandler addMib(SnmpMibAgent mib,
                                 String contextName)
                          throws IllegalArgumentException

  Adds a new contextualized MIB in the SNMP MIB handler.

  Specified by:
    `addMib` in interface `SnmpV3AdaptorServerMBean`
  Overrides:
    `addMib` in class `SnmpAdaptorServer`
  Parameters:
    `mib` - The MIB to add.
    `contextName` - The MIB context. If null or contextName.length == 0, will be registered in the default context.
  Returns:
    A reference to the SNMP MIB handler.
  Throws:
    `IllegalArgumentException` - If the parameter is null.

### enableCommunityStringAtContext

    public boolean enableCommunityStringAtContext()

  Activate the community string to context translation. When making SNMP V1 and V2, you can access the scoped MIB. To do so, you need to have a community string of the following form : community@context-name. Requests having such a community string will be routed to the scoped MIBs. By default this translation is activated.

  Specified by:
    `enableCommunityStringAtContext` in interface `SnmpV3AdaptorServerMBean`
  Returns:
    boolean True, activation succeeded.

### disableCommunityStringAtContext

    public boolean disableCommunityStringAtContext()

  Deactivate the community string to context translation. When making SNMP V1 and V2, you can access the scoped MIB. To do so, you need to have a community string of the following form : community@context-name. Requests having such a community string will be routed to the scoped MIBs. By default this translation is activated.

  Specified by:
    `disableCommunityStringAtContext` in interface `SnmpV3AdaptorServerMBean`
  Returns:
    boolean True, deactivation succeeded.

### isCommunityStringAtContextEnabled

    public boolean isCommunityStringAtContextEnabled()

  The community to context translation activation status.

  Specified by:
    `isCommunityStringAtContextEnabled` in interface `SnmpV3AdaptorServerMBean`
  Returns:
    boolean True, the translation will be applied on each received SNMP V1 and V2 community string.

### enableSnmpV1V2SetRequest

    public boolean enableSnmpV1V2SetRequest()

  Enable SNMP V1 and V2 set requests. Be aware that can lead to a security hole in a context of SNMP V3 management. By default SNMP V1 and V2 set requests are not authorized.

  Returns:
    boolean True the activation succeeded.

### disableSnmpV1V2SetRequest

    public boolean disableSnmpV1V2SetRequest()

  Disable SNMP V1 and V2 set requests. By default SNMP V1 and V2 set requests are not authorized.

  Returns:
    boolean True the deactivation succeeded.

### isSnmpV1V2SetRequestAuthorized

    public boolean isSnmpV1V2SetRequestAuthorized()

  The SNMP V1 and V2 set requests authorization status. By default SNMP V1 and V2 set requests are not authorized.

  Returns:
    boolean True SNMP V1 and V2 requests are authorized.

### addRequestForwarder

    public void addRequestForwarder(SnmpRequestForwarder forwarder,
                                    SnmpEngineId contextEngineId)

  Adds a new MIB forwarder attached to a passed engine Id. Every request received for the specified engineId will be routed to the passed MibAgent.

  Parameters:
    `forwarder` - The forwarder to add.
    `contextEngineId` - The context engine Id this forwarder forwards to.
  Throws:
    `IllegalArgumentException` - If one of the parameters is null.

### removeRequestForwarder

    public boolean removeRequestForwarder(SnmpEngineId engineId)

  Removes a request forwarder.

  Parameters:
    `engineId` - The context engine id.
  Throws:
    `IllegalArgumentException` - if engineId is null.

### addMib

    public SnmpMibHandler addMib(SnmpMibAgent mib,
                                 String contextName,
                                 SnmpOid[] oids)
                          throws IllegalArgumentException

  Adds a new contextualized MIB in the SNMP MIB handler.

  Specified by:
    `addMib` in interface `SnmpV3AdaptorServerMBean`
  Overrides:
    `addMib` in class `SnmpAdaptorServer`
  Parameters:
    `mib` - The MIB to add.
    `contextName` - The MIB context. If null or contextName.length == 0, will be registered in the default context.
    `oids` - The set of OIDs this agent implements. If null or oids.length == 0, this is equivalent to calling `addMib(SnmpMibAgent mib, String contextName)`
  Returns:
    A reference to the SNMP MIB handler.
  Throws:
    `IllegalArgumentException` - If the parameter is null.

### removeMib

    public boolean removeMib(SnmpMibAgent mib,
                             String contextName)

  Removes a contextualized MIB from the SNMP protocol adaptor.

  Specified by:
    `removeMib` in interface `SnmpV3AdaptorServerMBean`
  Overrides:
    `removeMib` in class `SnmpAdaptorServer`
  Parameters:
    `mib` - The MIB to be removed.
    `contextName` - The MIB context. If null or contextName.length == 0, will be removed from the default context.
  Returns:
    `true` if the specified `mib` was a MIB included in the SNMP MIB handler, `false` otherwise.

### removeMib

    public boolean removeMib(SnmpMibAgent mib,
                             String contextName,
                             SnmpOid[] oids)

  Removes the specified MIB from the SNMP protocol adaptor.

  Specified by:
    `removeMib` in interface `SnmpMibHandler`
  Overrides:
    `removeMib` in class `SnmpAdaptorServer`
  Parameters:
    `mib` - The MIB to be removed.
    `contextName` - The context name used at registration time. If null or contextName.length == 0, will be removed from the default context.
    `oids` - The oid the MIB was previously registered for. If null or oids.length == 0, this is equivalent to calling `removeMib(SnmpMibAgent mib, String contextName)`
  Returns:
    `true` if the specified `mib` was a MIB included in the SNMP MIB handler, `false` otherwise.

### registerUsmMib

    public void registerUsmMib(MBeanServer server,
                               ObjectName obj)
                        throws InstanceAlreadyExistsException,
                               MBeanRegistrationException,
                               NotCompliantMBeanException

  In order to register the USM mib in the `MBeanServer` .

  Parameters:
    `server` - The MBeanServer in which to register the mib.
    `obj` - The object name to use. If no object name is provided, the following concatenation is used:

    SnmpEngineId.toString() + "/SNMP_USER_BASED_SM_MIB:name=Usm-MIB-RFC2574"

  Throws:
    `InstanceAlreadyExistsException`
    `MBeanRegistrationException`
    `NotCompliantMBeanException`

### registerUsmMib

    public void registerUsmMib()
                        throws IllegalAccessException

  In order to register the USM mib in the `SnmpV3AdaptorServer`. The MIB is registered under no scope.

  Throws:
    `IllegalAccessException`

### getSecurityModelIds

    public int[] getSecurityModelIds()

  Returns an array of security model Ids.

  Specified by:
    `getSecurityModelIds` in interface `SnmpV3AdaptorServerMBean`
  Returns:
    The security model Ids.

### getSecurityModelNames

    public String[] getSecurityModelNames()

  Returns an array of security model names.

  Specified by:
    `getSecurityModelNames` in interface `SnmpV3AdaptorServerMBean`
  Returns:
    The security model names.

### getMsgProcessingModelIds

    public int[] getMsgProcessingModelIds()

  Returns an array of message processing model Ids.

  Specified by:
    `getMsgProcessingModelIds` in interface `SnmpV3AdaptorServerMBean`
  Returns:
    The message processing model Ids.

### getMsgProcessingModelNames

    public String[] getMsgProcessingModelNames()

  Returns an array of message processing model names.

  Specified by:
    `getMsgProcessingModelNames` in interface `SnmpV3AdaptorServerMBean`
  Returns:
    The message processing model names.

### getAccessControlModelIds

    public int[] getAccessControlModelIds()

  Returns an array of access control model Ids.

  Specified by:
    `getAccessControlModelIds` in interface `SnmpV3AdaptorServerMBean`
  Returns:
    the access control models Ids.

### getAccessControlModelNames

    public String[] getAccessControlModelNames()

  Returns an array of access control model names.

  Specified by:
    `getAccessControlModelNames` in interface `SnmpV3AdaptorServerMBean`
  Returns:
    the access control models names.

### getUsmSecurityAlgorithms

    public String[] getUsmSecurityAlgorithms()

  Returns an array of User based Security Model supported algorithms.

  Specified by:
    `getUsmSecurityAlgorithms` in interface `SnmpV3AdaptorServerMBean`
  Returns:
    The supported algorithms.

### getMibs

    public String[] getMibs()

  Returns the names of the MIBs available in this SNMP protocol adaptor. Some of these mibs can be registered in a specific context.

  Specified by:
    `getMibs` in interface `SnmpAdaptorServerMBean`
  Overrides:
    `getMibs` in class `SnmpAdaptorServer`
  Returns:
    An array of MIB names.

### getMibs

    public String[] getMibs(String context)

  Returns the names of the MIBs registered in the passed contextName.

  Specified by:
    `getMibs` in interface `SnmpV3AdaptorServerMBean`
  Parameters:
    `context` - The context name.
  Returns:
    An array of MIB names.

### getContexts

    public String[] getContexts()

  Returns the list of contexts in which some MIBs have been registered.

  Specified by:
    `getContexts` in interface `SnmpV3AdaptorServerMBean`
  Returns:
    An array of context names.

### snmpV3Trap

    public void snmpV3Trap(SnmpUsmPeer peer,
                           SnmpScopedPduRequest pdu)
                    throws IOException,
                           SnmpStatusException

  You shouldn't call this method directly. Sends a trap to the specified address.

  Parameters:
    `peer` - The peer to which the trap will be sent.
    `pdu` - The trap pdu.
  Throws:
    `IOException` - An I/O error occurred while sending the trap.
    `SnmpStatusException` - If the trap exceeds the limit defined by `bufferSize` or if a security error occurred when sending the trap. See `SnmpDefinitions` for error status.

### snmpV3Trap

    public void snmpV3Trap(InetAddress addr,
                           SnmpScopedPduRequest pdu)
                    throws IOException,
                           SnmpStatusException

  You shouldn't call this method directly. Sends a trap to the specified address.

  Parameters:
    `addr` - The trap address destination.
    `pdu` - The trap pdu.
  Throws:
    `IOException` - An I/O error occurred while sending the trap.
    `SnmpStatusException` - If the trap exceeds the limit defined by `bufferSize` or if a security error occurred when sending the trap. Have a look to `SnmpDefinitions` for error status.

### snmpV3Trap

    public void snmpV3Trap(SnmpScopedPduRequest pdu)
                    throws IOException,
                           SnmpStatusException

  You shouldn't call this method directly. Sends a trap to all IP addresses in `InetAddressAcl`.

  Parameters:
    `pdu` - The trap pdu.
  Throws:
    `IOException` - An I/O error occurred while sending the trap.
    `SnmpStatusException` - If the trap exceeds the limit defined by `bufferSize` or if a security error occurred when sending the trap. Have a look to `SnmpDefinitions` for error status.

### snmpV3UsmTrap

    public void snmpV3UsmTrap(String principal,
                              int securityLevel,
                              String contextName,
                              SnmpOid trapOid,
                              SnmpVarBindList list)
                       throws IOException,
                              SnmpStatusException

  Sends a trap to all IP addresses in `InetAddressAcl` using Usm as security model. Traps are time stamped with the current time.

  Specified by:
    `snmpV3UsmTrap` in interface `SnmpV3AdaptorServerMBean`
  Parameters:
    `principal` - The user name to use.
    `securityLevel` - The V3 security level.
    `contextName` - The V3 context name. The `contextEngineId` is the local engine Id.
    `trapOid` - The OId identifying the trap.
    `list` - A list of `SnmpVarBind` instances or null.
  Throws:
    `IOException` - An I/O error occurred while sending the trap.
    `SnmpStatusException` - If the trap exceeds the limit defined by `bufferSize` or if a security error occurred when sending the trap. Have a look to `SnmpDefinitions` for error status.

### snmpV3UsmTrap

    public void snmpV3UsmTrap(InetAddress addr,
                              String principal,
                              int securityLevel,
                              String contextName,
                              SnmpOid trapOid,
                              SnmpVarBindList list)
                       throws IOException,
                              SnmpStatusException

  Sends a trap to the specified address using Usm as security model. Traps are time stamped with the current time.

  Specified by:
    `snmpV3UsmTrap` in interface `SnmpV3AdaptorServerMBean`
  Parameters:
    `addr` - The trap address destination.
    `principal` - The user name to use.
    `securityLevel` - The V3 security level.
    `contextName` - The V3 context name. The `contextEngineId` is the local engine Id.
    `trapOid` - The OId identifying the trap.
    `list` - A list of `SnmpVarBind` instances or null.
  Throws:
    `IOException` - An I/O error occurred while sending the trap.
    `SnmpStatusException` - If the trap exceeds the limit defined by `bufferSize` or if a security error occurred when sending the trap. Have a look to `SnmpDefinitions` for error status.

### snmpV3UsmTrap

    public void snmpV3UsmTrap(InetAddress addr,
                              String principal,
                              int securityLevel,
                              String contextName,
                              SnmpOid trapOid,
                              SnmpVarBindList list,
                              SnmpTimeticks time)
                       throws IOException,
                              SnmpStatusException

  Sends a trap to the specified address using Usm as security model. Traps are time stamped with the current time.

  Specified by:
    `snmpV3UsmTrap` in interface `SnmpV3AdaptorServerMBean`
  Parameters:
    `addr` - The trap address destination.
    `principal` - The user name to use.
    `securityLevel` - The V3 security level.
    `contextName` - The V3 context name. The `contextEngineId` is the local engine Id.
    `trapOid` - The OID identifying the trap.
    `list` - A list of `SnmpVarBind` instances or null.
    `time` - The time stamp (overwrite the current time).
  Throws:
    `IOException` - An I/O error occurred while sending the trap.
    `SnmpStatusException` - If the trap exceeds the limit defined by `bufferSize` or if a security error occurred when sending the trap. Have a look to `SnmpDefinitions` for error status.

### snmpV3UsmTrap

    public void snmpV3UsmTrap(SnmpUsmPeer peer,
                              SnmpOid trapOid,
                              SnmpVarBindList list,
                              SnmpTimeticks time)
                       throws IOException,
                              SnmpStatusException,
                              IllegalArgumentException

  Sends a trap to the specified `SnmpUsmPeer` using Usm as security model. Security parameters and context name used are the one located in SnmpUsmPeer. Be sure to update them. NO Usm discovery is needed when sending trap.

  Specified by:
    `snmpV3UsmTrap` in interface `SnmpV3AdaptorServerMBean`
  Parameters:
    `peer` - The trap destination.
    `trapOid` - The OID identifying the trap.
    `list` - A list of `SnmpVarBind` instances or null.
    `time` - The time stamp (overwrite the current time).
  Throws:
    `IOException` - An I/O error occurred while sending the trap.
    `SnmpStatusException` - If the trap exceeds the limit defined by `bufferSize`.
    `IllegalArgumentException` - If no `SnmpUsmParameters` are set.

### snmpV3UsmInformRequest

    public SnmpV3InformRequest snmpV3UsmInformRequest(SnmpUsmPeer informPeer,
                                                      SnmpInformHandler cb,
                                                      SnmpOid trapOid,
                                                      SnmpVarBindList list)
                                               throws IllegalStateException,
                                                      IOException,
                                                      SnmpStatusException

  Sends an inform request using SNMP V3 inform request format.
  The inform is sent to the specified `InetAddress` destination. The inform is sent in an SNMP V3 message. Engine Id of the inform receiver will be discovered using Snmp V3 engine Id discovery.
  The variable list included in the outgoing inform is composed of the following items:
  - `sysUpTime.0` with its current value
  - `snmpTrapOid.0` with the value specified by `trapOid`
  - `all the (oid,values)` from the specified `varBindList`
  To send an inform request, the SNMP adaptor server must be active.

  Specified by:
    `snmpV3UsmInformRequest` in interface `SnmpV3AdaptorServerMBean`
  Parameters:
    `informPeer` - The peer to which the inform is sent.
    `cb` - The callback that is invoked when a request is complete.
    `trapOid` - The OId identifying the trap.
    `list` - A list of `SnmpVarBind` instances or null.
  Returns:
    The inform request object.
  Throws:
    `IllegalStateException` - This method has been invoked while the SNMP adaptor server was not active or if the provided peer is not usable with informs (no engine id discovery done).
    `IOException` - An I/O error occurred while sending the inform request.
    `SnmpStatusException` - If the inform request exceeds the limit defined by `bufferSize`.

### snmpV3InformRequest

    public SnmpV3InformRequest snmpV3InformRequest(InetAddress addr,
                                                   SnmpInformHandler cb,
                                                   SnmpScopedPduRequest pdu,
                                                   SnmpOid trapOid,
                                                   SnmpVarBindList varBindList)
                                            throws IllegalStateException,
                                                   IOException,
                                                   SnmpStatusException

  You shouldn't use this method directly. Sends an inform using SNMP V3 inform request format.
  The inform is sent to the specified `InetAddress` destination. The inform is sent in a SNMP V3 message.
  The variable list included in the outgoing inform is composed of the following items:
  - `sysUpTime.0` with its current value
  - `snmpTrapOid.0` with the value specified by `trapOid`
  - `all the (oid,values)` from the specified `varBindList`
  To send an inform request, the SNMP adaptor server must be active.

  Parameters:
    `addr` - The `InetAddress` destination for this inform request.
    `pdu` - The scoped Pdu used when sending the inform.
    `cb` - The callback that is invoked when a request is complete.
    `trapOid` - The OID identifying the trap.
    `varBindList` - A list of `SnmpVarBind` instances or null.
  Returns:
    The inform request object.
  Throws:
    `IllegalStateException` - This method has been invoked while the SNMP adaptor server was not active.
    `IOException` - An I/O error occurred while sending the inform request.
    `SnmpStatusException` - If the inform request exceeds the limit defined by `bufferSize`.

### createUsmMibObjectName

    protected ObjectName createUsmMibObjectName(SnmpEngine engine)
                                         throws MalformedObjectNameException

  This method is called by the adaptor. It returns an object name used when registering the MIB.

  Parameters:
    `engine` - The SNMP engine.
  Returns:
    The object name.
  Throws:
    `MalformedObjectNameException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| FCS Release jdmk-5_1-b34.2 2005.11.29_16:24:00_MET
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1998-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.