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.jdmk.comm
Class SnmpAdaptorServer

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

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

Direct Known Subclasses:
  SnmpV3AdaptorServer

Deprecated. Use package `com.sun.management.comm` in preference to classes in this package. This class may be removed in a future version of Java DMK.

public class SnmpAdaptorServer
extends CommunicatorServer
implements SnmpAdaptorServerMBean, MBeanRegistration, SnmpDefinitions, SnmpMibHandler

Implements an adaptor on top of the SNMP protocol.

When this SNMP protocol adaptor is started it creates a datagram socket and is able to receive requests and send traps or inform requests. When it is stopped, the socket is closed and neither requests and nor traps/inform request are processed.

The default port number of the socket is 161. This default value can be changed by specifying a port number:

- in the object constructor
- using the `setPort` method before starting the adaptor

The default object name is define by `com.sun.jdmk.ServiceName.DOMAIN` and `com.sun.jdmk.ServiceName.SNMP_ADAPTOR_SERVER`.

The SNMP protocol adaptor supports versions 1 and 2 of the SNMP protocol in a stateless way: when it receives a v1 request, it replies with a v1 response, when it receives a v2 request it replies with a v2 response.
The method `snmpV1Trap` sends traps using SNMP v1 format. The method `snmpV2Trap` sends traps using SNMP v2 format. The method `snmpInformRequest` sends inform requests using SNMP v2 format.

To receive data packets, the SNMP protocol adaptor uses a buffer whose size can be configured using the property `bufferSize` (default value is 1024). Packets which do not fit into the buffer are rejected. Increasing `bufferSize` allows the exchange of bigger packets. However, the underlying networking system may impose a limit on the size of UDP packets. Packets bigger than this limit will be rejected, no matter what the value of `bufferSize`.

An SNMP protocol adaptor may serve several managers concurrently. The number of concurrent managers can be limited using the property `maxActiveClientCount`.

The SNMP protocol adaptor specifies a default value (10) for the `maxActiveClientCount` property. When the adaptor is stopped, the active requests are interrupted and an error result is sent to the managers.

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 javax.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
`SnmpAdaptorServer()` Deprecated. Initializes this SNMP protocol adaptor using the default port (161).
`SnmpAdaptorServer(boolean useAcl, int port, InetAddress addr)` Deprecated. Initializes this SNMP protocol adaptor using the specified port and the specified `InetAddress`.
`SnmpAdaptorServer(InetAddress addr)` Deprecated. Initializes this SNMP protocol adaptor using the default port (161) and the specified `InetAddress`.
`SnmpAdaptorServer(InetAddressAcl acl)` Deprecated. Initializes this SNMP protocol adaptor using the default port (161) and the specified IP address based ACL implementation.
`SnmpAdaptorServer(InetAddressAcl acl, InetAddress addr)` Deprecated. Initializes this SNMP protocol adaptor using the specified IP address based ACL implementation and the specified `InetAddress`.
`SnmpAdaptorServer(InetAddressAcl acl, int port)` Deprecated. Initializes this SNMP protocol adaptor using the specified port and the specified IP address based ACL implementation.
`SnmpAdaptorServer(InetAddressAcl acl, int port, InetAddress addr)` Deprecated. Initializes this SNMP protocol adaptor using the specified port, the specified address based ACL implementation and the specified `InetAddress`.
`SnmpAdaptorServer(int port)` Deprecated. Initializes this SNMP protocol adaptor using the specified port.
`SnmpAdaptorServer(int port, InetAddress addr)` Deprecated. Initializes this SNMP protocol adaptor using the specified port and the specified `InetAddress`.
`SnmpAdaptorServer(IPAcl acl, InetAddress addr)` Deprecated. As of Java Dynamic Management Kit 5.0, use instead the constructor making use of `InetAddressAcl`.
`SnmpAdaptorServer(IPAcl acl, int port)` Deprecated. As of Java Dynamic Management Kit 5.0, use instead the constructor making use of `InetAddressAcl`.
`SnmpAdaptorServer(IPAcl acl, int port, InetAddress addr)` Deprecated. As of Java Dynamic Management Kit 5.0, use instead the constructor making use of `InetAddressAcl`.

Method Summary
`SnmpMibHandler` | `addMib(SnmpMibAgent mib)` Deprecated. Adds a new MIB in the SNMP MIB handler.
`SnmpMibHandler` | `addMib(SnmpMibAgent mib, SnmpOid[] oids)` Deprecated. Adds a new MIB in the SNMP MIB handler.
`SnmpMibHandler` | `addMib(SnmpMibAgent mib, String contextName)` Deprecated. Adds a new MIB in the SNMP MIB handler.
`SnmpMibHandler` | `addMib(SnmpMibAgent mib, String contextName, SnmpOid[] oids)` Deprecated. Adds a new MIB in the SNMP MIB handler.
`protected void` | `doBind()` Deprecated. Creates the datagram socket.
`protected void` | `doError(Exception e)` Deprecated.
`protected void` | `doProcess()` Deprecated. Not used in this context.
`protected void` | `doReceive()` Deprecated. Reads a packet from the datagram socket and creates a request handler which decodes and processes the request.
`protected void` | `doUnbind()` Deprecated. Closes the datagram socket.
`protected void` | `finalize()` Deprecated. Finalizer of the SNMP protocol adaptor objects.
`int` | `getActiveClientCount()` Deprecated. Gets the number of managers currently being processed by this SNMP protocol adaptor.
`boolean` | `getAuthRespEnabled()` Deprecated. Returns `true` if this SNMP protocol adaptor sends a response in case of authentication failure.
`boolean` | `getAuthTrapEnabled()` Deprecated. Returns `true` if authentication traps are enabled.
`Integer` | `getBufferSize()` Deprecated. Returns the buffer size of this SNMP protocol adaptor.
`String` | `getEnterpriseOid()` Deprecated. Returns the enterprise OID.
`String` | `getHost()` Deprecated.
`InetAddressAcl` | `getInetAddressAcl()` Deprecated. Returns the Ip address based ACL used by this SNMP protocol adaptor.
`int` | `getInformPort()` Deprecated. Returns the port used by this SNMP protocol adaptor for sending inform requests.
`IPAcl` | `getIPAcl()` Deprecated. As of Java Dynamic Management Kit 5.0, replaced by `getInetAddressAcl()`
`int` | `getMaxActiveClientCount()` Deprecated. Gets the maximum number of managers that this SNMP protocol adaptor can process concurrently.
`int` | `getMaxTries()` Deprecated. Gets the number of times to try sending an inform request before giving up.
`String[]` | `getMibs()` Deprecated. Returns the names of the MIBs available in this SNMP protocol adaptor.
`SnmpPduFactory` | `getPduFactory()` Deprecated. Returns the message factory of this SNMP protocol adaptor.
`int` | `getPort()` Deprecated.
`String` | `getProtocol()` Deprecated. Returns the protocol of this SNMP protocol adaptor.
`int` | `getServedClientCount()` Deprecated. Gets the number of managers that have been processed by this SNMP protocol adaptor since its creation.
`Long` | `getSnmpInASNParseErrs()` Deprecated. Returns the `snmpInASNParseErrs` value defined in MIB-II.
`Long` | `getSnmpInBadCommunityNames()` Deprecated. Returns the `snmpInBadCommunityNames` value defined in MIB-II.
`Long` | `getSnmpInBadCommunityUses()` Deprecated. Returns the `snmpInBadCommunityUses` value defined in MIB-II.
`Long` | `getSnmpInBadVersions()` Deprecated. Returns the `snmpInBadVersions` value defined in MIB-II.
`Long` | `getSnmpInGetNexts()` Deprecated. Returns the `snmpInGetNexts` value defined in MIB-II.
`Long` | `getSnmpInGetRequests()` Deprecated. Returns the `snmpInGetRequests` value defined in MIB-II.
`Long` | `getSnmpInPkts()` Deprecated. Returns the `snmpInPkts` value defined in MIB-II.
`Long` | `getSnmpInSetRequests()` Deprecated. Returns the `snmpInSetRequests` value defined in MIB-II.
`Long` | `getSnmpInTotalReqVars()` Deprecated. Returns the `snmpInTotalReqVars` value defined in MIB-II.
`Long` | `getSnmpInTotalSetVars()` Deprecated. Returns the `snmpInTotalSetVars` value defined in MIB-II.
`Long` | `getSnmpOutBadValues()` Deprecated. Returns the `snmpOutBadValues` value defined in MIB-II.
`Long` | `getSnmpOutGenErrs()` Deprecated. Returns the `snmpOutGenErrs` value defined in MIB-II.
`Long` | `getSnmpOutGetResponses()` Deprecated. Returns the `snmpOutGetResponses` value defined in MIB-II.
`Long` | `getSnmpOutNoSuchNames()` Deprecated. Returns the `snmpOutNoSuchNames` value defined in MIB-II.
`Long` | `getSnmpOutPkts()` Deprecated. Returns the `snmpOutPkts` value defined in MIB-II.
`Long` | `getSnmpOutTooBigs()` Deprecated. Returns the `snmpOutTooBigs` value defined in MIB-II.
`Long` | `getSnmpOutTraps()` Deprecated. Returns the `snmpOutTraps` value defined in MIB-II.
`Long` | `getSnmpProxyDrops()` Deprecated. Returns the `snmpProxyDrops` value defined in RFC 1907 NMPv2-MIB .
`Long` | `getSnmpSilentDrops()` Deprecated. Returns the `snmpSilentDrops` value defined in RFC 1907 NMPv2-MIB .
`long` | `getSysUpTime()` Deprecated. Returns the time (in hundredths of second) elapsed since the SNMP protocol adaptor startup.
`int` | `getTimeout()` Deprecated. Gets the timeout to wait for an inform response from the manager.
`Integer` | `getTrapPort()` Deprecated. Returns the port used by this SNMP protocol adaptor for sending traps.
`SnmpUserDataFactory` | `getUserDataFactory()` Deprecated. Get the user-data factory associated with this SNMP protocol adaptor.
`static int` | `mapErrorStatus(int errorStatus, int protocolVersion, int reqPduType)` Deprecated. Method that maps an SNMP error status in the passed protocolVersion according to the provided pdu type.
`void` | `postDeregister()` Deprecated. Not used in this context.
`void` | `postRegister(Boolean registrationDone)` Deprecated. Not used in this context.
`void` | `preDeregister()` Deprecated. Not used in this context.
`ObjectName` | `preRegister(MBeanServer server, ObjectName name)` Deprecated. Allows the MBean to perform any operations it needs before being registered in the MBean server.
`boolean` | `removeMib(SnmpMibAgent mib)` Deprecated. Removes the specified MIB from the SNMP protocol adaptor.
`boolean` | `removeMib(SnmpMibAgent mib, SnmpOid[] oids)` Deprecated. Removes the specified MIB from the SNMP protocol adaptor.
`boolean` | `removeMib(SnmpMibAgent mib, String contextName)` Deprecated. Removes the specified MIB from the SNMP protocol adaptor.
`boolean` | `removeMib(SnmpMibAgent mib, String contextName, SnmpOid[] oids)` Deprecated. Removes the specified MIB from the SNMP protocol adaptor.
`void` | `setAuthRespEnabled(boolean enabled)` Deprecated. Sets the flag indicating if responses need to be sent in case of authentication failure.
`void` | `setAuthTrapEnabled(boolean enabled)` Deprecated. Sets the flag indicating if traps need to be sent in case of authentication failure.
`void` | `setBufferSize(Integer s)` Deprecated. Sets the buffer size of this SNMP protocol adaptor.
`void` | `setEnterpriseOid(String oid)` Deprecated. Sets the enterprise OID.
`void` | `setInformPort(int port)` Deprecated. Sets the port used by this SNMP protocol adaptor for sending inform requests.
`void` | `setMaxActiveClientCount(int c)` Deprecated. Sets the maximum number of managers this SNMP protocol adaptor can process concurrently.
`void` | `setMaxTries(int newMaxTries)` Deprecated. Changes the maximum number of times to try sending an inform request before giving up.
`void` | `setPduFactory(SnmpPduFactory factory)` Deprecated. Sets the message factory of this SNMP protocol adaptor.
`void` | `setPort(int port)` Deprecated. Sets the port number used by this `CommunicatorServer`.
`void` | `setTimeout(int newTimeout)` Deprecated. Changes the timeout to wait for an inform response from the manager.
`void` | `setTrapPort(Integer port)` Deprecated. Sets the port used by this SNMP protocol adaptor for sending traps.
`void` | `setUserDataFactory(SnmpUserDataFactory factory)` Deprecated. Set the user-data factory of this SNMP protocol adaptor.
`SnmpInformRequest` | `snmpInformRequest(InetAddress addr, String cs, SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList)` Deprecated. Sends an inform using SNMP V2 inform request format.
`Vector` | `snmpInformRequest(SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList)` Deprecated. Sends an inform using SNMP V2 inform request format.
`SnmpInformRequest` | `snmpInformRequest(SnmpPeer peer, SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList)` Deprecated. Sends an inform using SNMP V2 inform request format.
`void` | `snmpPduTrap(InetAddress address, SnmpPduPacket pdu)` Deprecated. Send the specified trap PDU to the passed `InetAddress`.
`void` | `snmpPduTrap(SnmpPeer peer, SnmpPduPacket pdu)` Deprecated. Send the specified trap PDU to the passed `SnmpPeer`.
`void` | `snmpV1Trap(InetAddress addr, SnmpIpAddress agentAddr, String cs, SnmpOid enterpOid, int generic, int specific, SnmpVarBindList varBindList, SnmpTimeticks time)` Deprecated. Sends a trap using SNMP V1 trap format.
`void` | `snmpV1Trap(InetAddress addr, String cs, int generic, int specific, SnmpVarBindList varBindList)` Deprecated. Sends a trap using SNMP V1 trap format.
`void` | `snmpV1Trap(int generic, int specific, SnmpVarBindList varBindList)` Deprecated. Sends a trap using SNMP V1 trap format.
`void` | `snmpV1Trap(SnmpPeer peer, SnmpIpAddress agentAddr, SnmpOid enterpOid, int generic, int specific, SnmpVarBindList varBindList, SnmpTimeticks time)` Deprecated. Sends a trap using SNMP V1 trap format.
`void` | `snmpV2Trap(InetAddress addr, String cs, SnmpOid trapOid, SnmpVarBindList varBindList)` Deprecated. Sends a trap using SNMP V2 trap format.
`void` | `snmpV2Trap(InetAddress addr, String cs, SnmpOid trapOid, SnmpVarBindList varBindList, SnmpTimeticks time)` Deprecated. Sends a trap using SNMP V2 trap format.
`void` | `snmpV2Trap(SnmpOid trapOid, SnmpVarBindList varBindList)` Deprecated. Sends a trap using SNMP V2 trap format.
`void` | `snmpV2Trap(SnmpPeer peer, SnmpOid trapOid, SnmpVarBindList varBindList, SnmpTimeticks time)` Deprecated. Sends a trap using SNMP V2 trap format.
`void` | `stop()` Deprecated. Stops this SNMP protocol adaptor.

Methods inherited from class com.sun.jdmk.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.jdmk.comm.CommunicatorServerMBean
`getState, getStateString, isActive, start, waitState`

Constructor Detail

### SnmpAdaptorServer

    public SnmpAdaptorServer()

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

### SnmpAdaptorServer

    public SnmpAdaptorServer(int port)

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

Parameters:
  `port` - The port number for sending SNMP responses.

### SnmpAdaptorServer

    public SnmpAdaptorServer(InetAddressAcl acl)

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

Parameters:
  `acl` - The `InetAddressAcl` implementation.
Since:
  Java DMK 5.0

### SnmpAdaptorServer

    public SnmpAdaptorServer(InetAddress addr)

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

Parameters:
  `addr` - The IP address to bind.

### SnmpAdaptorServer

    public SnmpAdaptorServer(InetAddressAcl acl,
                             int port)

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

Parameters:
  `acl` - The `InetAddressAcl` implementation.
  `port` - The port number for sending SNMP responses.
Since:
  Java DMK 5.0

### SnmpAdaptorServer

    public SnmpAdaptorServer(IPAcl acl,
                             int port)

  Deprecated. As of Java Dynamic Management Kit 5.0, use instead the constructor making use of `InetAddressAcl`.

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

Parameters:
  `acl` - The `IPAcl` implementation.
  `port` - The port number for sending SNMP responses.

### SnmpAdaptorServer

    public SnmpAdaptorServer(int port,
                             InetAddress addr)

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

Parameters:
  `port` - The port number for sending SNMP responses.
  `addr` - The IP address to bind.

### SnmpAdaptorServer

    public SnmpAdaptorServer(InetAddressAcl acl,
                             InetAddress addr)

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

Parameters:
  `acl` - The `InetAddressAcl` implementation.
  `addr` - The IP address to bind.
Since:
  Java DMK 5.0

### SnmpAdaptorServer

    public SnmpAdaptorServer(IPAcl acl,
                             InetAddress addr)

  Deprecated. As of Java Dynamic Management Kit 5.0, use instead the constructor making use of `InetAddressAcl`.

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

Parameters:
  `acl` - The `IPAcl` implementation.
  `addr` - The IP address to bind.

### SnmpAdaptorServer

    public SnmpAdaptorServer(IPAcl acl,
                             int port,
                             InetAddress addr)

  Deprecated. As of Java Dynamic Management Kit 5.0, use instead the constructor making use of `InetAddressAcl`.

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

Parameters:
  `acl` - The `IPAcl` implementation.
  `port` - The port number for sending SNMP responses.
  `addr` - The IP address to bind.

### SnmpAdaptorServer

    public SnmpAdaptorServer(InetAddressAcl acl,
                             int port,
                             InetAddress addr)

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

Parameters:
  `acl` - The `InetAddressAcl` implementation.
  `port` - The port number for sending SNMP responses.
  `addr` - The IP address to bind.
Since:
  Java DMK 5.0

### SnmpAdaptorServer

    public SnmpAdaptorServer(boolean useAcl,
                             int port,
                             InetAddress addr)

  Deprecated.
  Initializes this SNMP protocol adaptor using the specified port and the specified `InetAddress`. This constructor allows 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.

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 `SnmpAdaptorServer(int port, InetAddress addr)`.
  `port` - The port number for sending SNMP responses.
  `addr` - The IP address to bind.

Method Detail

### getServedClientCount

    public int getServedClientCount()

  Deprecated.
  Gets the number of managers that have been processed by this SNMP protocol adaptor since its creation.

  Specified by:
    `getServedClientCount` in interface `SnmpAdaptorServerMBean`
  Returns:
    The number of managers handled by this SNMP protocol adaptor since its creation. This counter is not reset by the `stop` method.

### getActiveClientCount

    public int getActiveClientCount()

  Deprecated.
  Gets the number of managers currently being processed by this SNMP protocol adaptor.

  Specified by:
    `getActiveClientCount` in interface `SnmpAdaptorServerMBean`
  Returns:
    The number of managers currently being processed by this SNMP protocol adaptor.

### getMaxActiveClientCount

    public int getMaxActiveClientCount()

  Deprecated.
  Gets the maximum number of managers that this SNMP protocol adaptor can process concurrently.

  Specified by:
    `getMaxActiveClientCount` in interface `SnmpAdaptorServerMBean`
  Returns:
    The maximum number of managers that this SNMP protocol adaptor can process concurrently.

### setMaxActiveClientCount

    public void setMaxActiveClientCount(int c)
                                 throws IllegalStateException

  Deprecated.
  Sets the maximum number of managers this SNMP protocol adaptor can process concurrently.

  Specified by:
    `setMaxActiveClientCount` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `c` - The number of managers.
  Throws:
    `IllegalStateException` - This method has been invoked while the communicator was `ONLINE` or `STARTING`.

### getInetAddressAcl

    public InetAddressAcl getInetAddressAcl()

  Deprecated.
  Returns the Ip address based ACL used by this SNMP protocol adaptor.

  Specified by:
    `getInetAddressAcl` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `InetAddressAcl` implementation.
  Since:
    Java DMK 5.0

### getIPAcl

    public IPAcl getIPAcl()

  Deprecated. As of Java Dynamic Management Kit 5.0, replaced by `getInetAddressAcl()`

  Returns the IP address based ACL used by this SNMP protocol adaptor.

  Specified by:
    `getIPAcl` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `IPAcl` implementation.
  Throws:
    `ClassCastException` - if the provided `InetAddressAcl` is not an IPAcl.

### getTrapPort

    public Integer getTrapPort()

  Deprecated.
  Returns the port used by this SNMP protocol adaptor for sending traps. By default, port 162 is used.

  Specified by:
    `getTrapPort` in interface `SnmpAdaptorServerMBean`
  Returns:
    The port number for sending SNMP traps.

### setTrapPort

    public void setTrapPort(Integer port)

  Deprecated.
  Sets the port used by this SNMP protocol adaptor for sending traps.

  Specified by:
    `setTrapPort` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `port` - The port number for sending SNMP traps.

### getInformPort

    public int getInformPort()

  Deprecated.
  Returns the port used by this SNMP protocol adaptor for sending inform requests. By default, port 162 is used.

  Specified by:
    `getInformPort` in interface `SnmpAdaptorServerMBean`
  Returns:
    The port number for sending SNMP inform requests.

### setInformPort

    public void setInformPort(int port)

  Deprecated.
  Sets the port used by this SNMP protocol adaptor for sending inform requests.

  Specified by:
    `setInformPort` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `port` - The port number for sending SNMP inform requests.

### getProtocol

    public String getProtocol()

  Deprecated.
  Returns the protocol of this SNMP protocol adaptor.

  Specified by:
    `getProtocol` in interface `SnmpAdaptorServerMBean`
  Returns:
    The string "snmp".

### getBufferSize

    public Integer getBufferSize()

  Deprecated.
  Returns the buffer size of this SNMP protocol adaptor. This buffer size is used for both incoming request and outgoing inform requests. By default, buffer size 1024 is used.

  Specified by:
    `getBufferSize` in interface `SnmpAdaptorServerMBean`
  Returns:
    The buffer size.

### setBufferSize

    public void setBufferSize(Integer s)
                       throws IllegalStateException

  Deprecated.
  Sets the buffer size of this SNMP protocol adaptor. This buffer size is used for both incoming request and outgoing inform requests.

  Specified by:
    `setBufferSize` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `s` - The buffer size.
  Throws:
    `IllegalStateException` - This method has been invoked while the communicator was `ONLINE` or `STARTING`.

### getMaxTries

    public final int getMaxTries()

  Deprecated.
  Gets the number of times to try sending an inform request before giving up. By default, a maximum of 3 tries is used.

  Specified by:
    `getMaxTries` in interface `SnmpAdaptorServerMBean`
  Returns:
    The maximum number of tries.

### setMaxTries

    public final void setMaxTries(int newMaxTries)

  Deprecated.
  Changes the maximum number of times to try sending an inform request before giving up.

  Specified by:
    `setMaxTries` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `newMaxTries` - The maximum number of tries.

### getTimeout

    public final int getTimeout()

  Deprecated.
  Gets the timeout to wait for an inform response from the manager. By default, a timeout of 3 seconds is used.

  Specified by:
    `getTimeout` in interface `SnmpAdaptorServerMBean`
  Returns:
    The value of the timeout property.

### setTimeout

    public final void setTimeout(int newTimeout)

  Deprecated.
  Changes the timeout to wait for an inform response from the manager.

  Specified by:
    `setTimeout` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `newTimeout` - The timeout (in milliseconds).

### getPduFactory

    public SnmpPduFactory getPduFactory()

  Deprecated.
  Returns the message factory of this SNMP protocol adaptor.

  Specified by:
    `getPduFactory` in interface `SnmpAdaptorServerMBean`
  Returns:
    The factory object.

### setPduFactory

    public void setPduFactory(SnmpPduFactory factory)

  Deprecated.
  Sets the message factory of this SNMP protocol adaptor.

  Specified by:
    `setPduFactory` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `factory` - The factory object (null means the default factory).

### setUserDataFactory

    public void setUserDataFactory(SnmpUserDataFactory factory)

  Deprecated.
  Set the user-data factory of this SNMP protocol adaptor.

  Specified by:
    `setUserDataFactory` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `factory` - The factory object (null means no factory).
  See Also:
    `SnmpUserDataFactory`

### getUserDataFactory

    public SnmpUserDataFactory getUserDataFactory()

  Deprecated.
  Get the user-data factory associated with this SNMP protocol adaptor.

  Specified by:
    `getUserDataFactory` in interface `SnmpAdaptorServerMBean`
  Returns:
    The factory object (null means no factory).
  See Also:
    `SnmpUserDataFactory`

### getAuthTrapEnabled

    public boolean getAuthTrapEnabled()

  Deprecated.
  Returns `true` if authentication traps are enabled.

  When this feature is enabled, the SNMP protocol adaptor sends an `authenticationFailure` trap each time an authentication fails.

  The default behavior is to send authentication traps.

  Specified by:
    `getAuthTrapEnabled` in interface `SnmpAdaptorServerMBean`
  Returns:
    `true` if authentication traps are enabled, `false` otherwise.

### setAuthTrapEnabled

    public void setAuthTrapEnabled(boolean enabled)

  Deprecated.
  Sets the flag indicating if traps need to be sent in case of authentication failure.

  Specified by:
    `setAuthTrapEnabled` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `enabled` - Flag indicating if traps need to be sent.

### getAuthRespEnabled

    public boolean getAuthRespEnabled()

  Deprecated.
  Returns `true` if this SNMP protocol adaptor sends a response in case of authentication failure.

  When this feature is enabled, the SNMP protocol adaptor sends a response with `noSuchName` or `readOnly` when the authentication failed. If the flag is disabled, the SNMP protocol adaptor trashes the PDU silently.

  The default behavior is to send responses.

  Specified by:
    `getAuthRespEnabled` in interface `SnmpAdaptorServerMBean`
  Returns:
    `true` if responses are sent.

### setAuthRespEnabled

    public void setAuthRespEnabled(boolean enabled)

  Deprecated.
  Sets the flag indicating if responses need to be sent in case of authentication failure.

  Specified by:
    `setAuthRespEnabled` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `enabled` - Flag indicating if responses need to be sent.

### getEnterpriseOid

    public String getEnterpriseOid()

  Deprecated.
  Returns the enterprise OID. It is used by `snmpV1Trap` to fill the 'enterprise' field of the trap request.

  Specified by:
    `getEnterpriseOid` in interface `SnmpAdaptorServerMBean`
  Returns:
    The OID in string format "x.x.x.x".

### setEnterpriseOid

    public void setEnterpriseOid(String oid)
                          throws IllegalArgumentException

  Deprecated.
  Sets the enterprise OID.

  Specified by:
    `setEnterpriseOid` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `oid` - The OID in string format "x.x.x.x".
  Throws:
    `IllegalArgumentException` - The string format is incorrect

### getMibs

    public String[] getMibs()

  Deprecated.
  Returns the names of the MIBs available in this SNMP protocol adaptor.

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

### getSnmpOutTraps

    public Long getSnmpOutTraps()

  Deprecated.
  Returns the `snmpOutTraps` value defined in MIB-II.

  Specified by:
    `getSnmpOutTraps` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `snmpOutTraps` value.

### getSnmpOutGetResponses

    public Long getSnmpOutGetResponses()

  Deprecated.
  Returns the `snmpOutGetResponses` value defined in MIB-II.

  Specified by:
    `getSnmpOutGetResponses` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `snmpOutGetResponses` value.

### getSnmpOutGenErrs

    public Long getSnmpOutGenErrs()

  Deprecated.
  Returns the `snmpOutGenErrs` value defined in MIB-II.

  Specified by:
    `getSnmpOutGenErrs` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `snmpOutGenErrs` value.

### getSnmpOutBadValues

    public Long getSnmpOutBadValues()

  Deprecated.
  Returns the `snmpOutBadValues` value defined in MIB-II.

  Specified by:
    `getSnmpOutBadValues` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `snmpOutBadValues` value.

### getSnmpOutNoSuchNames

    public Long getSnmpOutNoSuchNames()

  Deprecated.
  Returns the `snmpOutNoSuchNames` value defined in MIB-II.

  Specified by:
    `getSnmpOutNoSuchNames` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `snmpOutNoSuchNames` value.

### getSnmpOutTooBigs

    public Long getSnmpOutTooBigs()

  Deprecated.
  Returns the `snmpOutTooBigs` value defined in MIB-II.

  Specified by:
    `getSnmpOutTooBigs` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `snmpOutTooBigs` value.

### getSnmpInASNParseErrs

    public Long getSnmpInASNParseErrs()

  Deprecated.
  Returns the `snmpInASNParseErrs` value defined in MIB-II.

  Specified by:
    `getSnmpInASNParseErrs` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `snmpInASNParseErrs` value.

### getSnmpInBadCommunityUses

    public Long getSnmpInBadCommunityUses()

  Deprecated.
  Returns the `snmpInBadCommunityUses` value defined in MIB-II.

  Specified by:
    `getSnmpInBadCommunityUses` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `snmpInBadCommunityUses` value.

### getSnmpInBadCommunityNames

    public Long getSnmpInBadCommunityNames()

  Deprecated.
  Returns the `snmpInBadCommunityNames` value defined in MIB-II.

  Specified by:
    `getSnmpInBadCommunityNames` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `snmpInBadCommunityNames` value.

### getSnmpInBadVersions

    public Long getSnmpInBadVersions()

  Deprecated.
  Returns the `snmpInBadVersions` value defined in MIB-II.

  Specified by:
    `getSnmpInBadVersions` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `snmpInBadVersions` value.

### getSnmpOutPkts

    public Long getSnmpOutPkts()

  Deprecated.
  Returns the `snmpOutPkts` value defined in MIB-II.

  Specified by:
    `getSnmpOutPkts` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `snmpOutPkts` value.

### getSnmpInPkts

    public Long getSnmpInPkts()

  Deprecated.
  Returns the `snmpInPkts` value defined in MIB-II.

  Specified by:
    `getSnmpInPkts` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `snmpInPkts` value.

### getSnmpInGetRequests

    public Long getSnmpInGetRequests()

  Deprecated.
  Returns the `snmpInGetRequests` value defined in MIB-II.

  Specified by:
    `getSnmpInGetRequests` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `snmpInGetRequests` value.

### getSnmpInGetNexts

    public Long getSnmpInGetNexts()

  Deprecated.
  Returns the `snmpInGetNexts` value defined in MIB-II.

  Specified by:
    `getSnmpInGetNexts` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `snmpInGetNexts` value.

### getSnmpInSetRequests

    public Long getSnmpInSetRequests()

  Deprecated.
  Returns the `snmpInSetRequests` value defined in MIB-II.

  Specified by:
    `getSnmpInSetRequests` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `snmpInSetRequests` value.

### getSnmpInTotalSetVars

    public Long getSnmpInTotalSetVars()

  Deprecated.
  Returns the `snmpInTotalSetVars` value defined in MIB-II.

  Specified by:
    `getSnmpInTotalSetVars` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `snmpInTotalSetVars` value.

### getSnmpInTotalReqVars

    public Long getSnmpInTotalReqVars()

  Deprecated.
  Returns the `snmpInTotalReqVars` value defined in MIB-II.

  Specified by:
    `getSnmpInTotalReqVars` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `snmpInTotalReqVars` value.

### getSnmpSilentDrops

    public Long getSnmpSilentDrops()

  Deprecated.
  Returns the `snmpSilentDrops` value defined in RFC 1907 NMPv2-MIB .

  Specified by:
    `getSnmpSilentDrops` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `snmpSilentDrops` value.
  Since:
    Java DMK 5.0

### getSnmpProxyDrops

    public Long getSnmpProxyDrops()

  Deprecated.
  Returns the `snmpProxyDrops` value defined in RFC 1907 NMPv2-MIB .

  Specified by:
    `getSnmpProxyDrops` in interface `SnmpAdaptorServerMBean`
  Returns:
    The `snmpProxyDrops` value.
  Since:
    Java DMK 5.0

### preRegister

    public ObjectName preRegister(MBeanServer server,
                                  ObjectName name)
                           throws Exception

  Deprecated.
  Allows the MBean to perform any operations it needs before being registered in the MBean server. If the name of the SNMP protocol adaptor MBean is not specified, it is initialized with the default value: `com.sun.jdmk.ServiceName.DOMAIN`: `com.sun.jdmk.ServiceName.SNMP_ADAPTOR_SERVER`. If any exception is raised, the SNMP protocol adaptor MBean will not be registered in the MBean server.

  Specified by:
    `preRegister` in interface `MBeanRegistration`
  Parameters:
    `server` - The MBean server to register the service with.
    `name` - The object name.
  Returns:
    The name of the SNMP protocol adaptor registered.
  Throws:
    `Exception`

### postRegister

    public void postRegister(Boolean registrationDone)

  Deprecated.
  Not used in this context.

  Specified by:
    `postRegister` in interface `MBeanRegistration`

### preDeregister

    public void preDeregister()
                       throws Exception

  Deprecated.
  Not used in this context.

  Specified by:
    `preDeregister` in interface `MBeanRegistration`
  Throws:
    `Exception`

### postDeregister

    public void postDeregister()

  Deprecated.
  Not used in this context.

  Specified by:
    `postDeregister` in interface `MBeanRegistration`

### addMib

    public SnmpMibHandler addMib(SnmpMibAgent mib)
                          throws IllegalArgumentException

  Deprecated.
  Adds a new MIB in the SNMP MIB handler.

  Specified by:
    `addMib` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `mib` - The MIB to add.
  Returns:
    A reference to the SNMP MIB handler.
  Throws:
    `IllegalArgumentException` - If the parameter is null.

### addMib

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

  Deprecated.
  Adds a new MIB in the SNMP MIB handler. This method is to be called to set a specific agent to a specific OID. This can be useful when dealing with MIB overlapping. Some OID can be implemented in more than one MIB. In this case, the OID nearer agent will be used on SNMP operations.

  Specified by:
    `addMib` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `mib` - The MIB to add.
    `oids` - The set of OIDs this agent implements. If null or oids.length == 0, this is equivalent to calling `addMib(SnmpMibAgent mib)`
  Returns:
    A reference to the SNMP MIB handler.
  Throws:
    `IllegalArgumentException` - If the parameter is null.
  Since:
    Java DMK 5.0

### addMib

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

  Deprecated.
  Adds a new MIB in the SNMP MIB handler. When the underlying implementation does not support MIB scoping, calling this method is equivalent to calling `addMib(SnmpMibAgent mib)`.

  Note that MIB scoping is only supported by the `SnmpV3AdaptorServer`. This class does not support it.

  Specified by:
    `addMib` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `mib` - The MIB to add.
    `contextName` - The MIB context name. The SnmpAdaptorServer base class always ignores this parameter.
  Returns:
    A reference on the SNMP MIB handler.
  Throws:
    `IllegalArgumentException` - If the parameter is null.
  Since:
    Java DMK 5.0

### addMib

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

  Deprecated.
  Adds a new MIB in the SNMP MIB handler. When the underlying implementation does not support MIB scoping, calling this method is equivalent to calling `addMib(SnmpMibAgent mib, SnmpOid[] oids)`.

  Note that MIB scoping is only supported by the `SnmpV3AdaptorServer`. This class does not support it.

  Specified by:
    `addMib` in interface `SnmpMibHandler`
  Parameters:
    `mib` - The MIB to add.
    `contextName` - The MIB context. The SnmpAdaptorServer base class always ignores this parameter.
    `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.
  Since:
    Java DMK 5.0

### removeMib

    public boolean removeMib(SnmpMibAgent mib,
                             String contextName)

  Deprecated.
  Removes the specified MIB from the SNMP protocol adaptor. When the underlying implementation does not support MIB scoping, calling this method is equivalent to calling `removeMib(SnmpMibAgent mib)`.

  Note that MIB scoping is only supported by the `SnmpV3AdaptorServer`. This class does not support it.

  Specified by:
    `removeMib` in interface `SnmpMibHandler`
  Parameters:
    `mib` - The MIB to be removed.
    `contextName` - The context name used at registration time. The SnmpAdaptorServer base class always ignores this parameter.
  Returns:
    `true` if the specified `mib` was a MIB included in the SNMP MIB handler, `false` otherwise.
  Since:
    Java DMK 5.0

### removeMib

    public boolean removeMib(SnmpMibAgent mib)

  Deprecated.
  Removes the specified MIB from the SNMP protocol adaptor.

  Specified by:
    `removeMib` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `mib` - The MIB to be removed.
  Returns:
    `true` if the specified `mib` was a MIB included in the SNMP MIB handler, `false` otherwise.

### removeMib

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

  Deprecated.
  Removes the specified MIB from the SNMP protocol adaptor.

  Specified by:
    `removeMib` in interface `SnmpMibHandler`
  Parameters:
    `mib` - The MIB to be removed.
    `oids` - The oid the MIB was previously registered for. If null or oids.length == 0, this is equivalent to calling `removeMib(SnmpMibAgent mib)`
  Returns:
    `true` if the specified `mib` was a MIB included in the SNMP MIB handler, `false` otherwise.
  Since:
    Java DMK 5.0

### removeMib

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

  Deprecated.
  Removes the specified MIB from the SNMP protocol adaptor. When the underlying implementation does not support MIB scoping, calling this method is equivalent to calling `removeMib(SnmpMibAgent mib, SnmpOid[] oids)`.

  Note that MIB scoping is only supported by the `SnmpV3AdaptorServer`. This class does not support it.

  Specified by:
    `removeMib` in interface `SnmpMibHandler`
  Parameters:
    `mib` - The MIB to be removed.
    `contextName` - The context name used at registration time. The SnmpAdaptorServer base class always ignores this parameter.
    `oids` - The oid the MIB was previously registered for.
  Returns:
    `true` if the specified `mib` was a MIB included in the SNMP MIB handler, `false` otherwise.
  Since:
    Java DMK 5.0

### setPort

    public void setPort(int port)
                 throws IllegalStateException

  Deprecated.
  Sets the port number used by this `CommunicatorServer`.

  Specified by:
    `setPort` in interface `CommunicatorServerMBean`
  Parameters:
    `port` - The port number used by this `CommunicatorServer`.
  Throws:
    `IllegalStateException` - This method has been invoked while the communicator was ONLINE or STARTING.

### doBind

    protected void doBind()
                   throws CommunicationException,
                          InterruptedException

  Deprecated.
  Creates the datagram socket.

  Throws:
    `CommunicationException`
    `InterruptedException`

### doUnbind

    protected void doUnbind()
                     throws CommunicationException,
                            InterruptedException

  Deprecated.
  Closes the datagram socket.

  Throws:
    `CommunicationException`
    `InterruptedException`

### doReceive

    protected void doReceive()
                      throws CommunicationException,
                             InterruptedException

  Deprecated.
  Reads a packet from the datagram socket and creates a request handler which decodes and processes the request.

  Throws:
    `CommunicationException`
    `InterruptedException`

### doError

    protected void doError(Exception e)
                    throws CommunicationException

  Deprecated.
  Throws:
    `CommunicationException`

### doProcess

    protected void doProcess()
                      throws CommunicationException,
                             InterruptedException

  Deprecated.
  Not used in this context.

  Throws:
    `CommunicationException`
    `InterruptedException`

### stop

    public void stop()

  Deprecated.
  Stops this SNMP protocol adaptor. Closes the datagram socket.

  Has no effect if this SNMP protocol adaptor is `OFFLINE` or `STOPPING`.

  Specified by:
    `stop` in interface `CommunicatorServerMBean`

### snmpV1Trap

    public void snmpV1Trap(int generic,
                           int specific,
                           SnmpVarBindList varBindList)
                    throws IOException,
                           SnmpStatusException

  Deprecated.
  Sends a trap using SNMP V1 trap format.
  The trap is sent to each destination defined in the ACL file (if available). If no ACL file or no destinations are available, the trap is sent to the local host.

  Specified by:
    `snmpV1Trap` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `generic` - The generic number of the trap.
    `specific` - The specific number of the trap.
    `varBindList` - 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`.

### snmpV1Trap

    public void snmpV1Trap(InetAddress addr,
                           String cs,
                           int generic,
                           int specific,
                           SnmpVarBindList varBindList)
                    throws IOException,
                           SnmpStatusException

  Deprecated.
  Sends a trap using SNMP V1 trap format.
  The trap is sent to the specified `InetAddress` destination using the specified community string (and the ACL file is not used).

  Specified by:
    `snmpV1Trap` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `addr` - The `InetAddress` destination of the trap.
    `cs` - The community string to be used for the trap.
    `generic` - The generic number of the trap.
    `specific` - The specific number of the trap.
    `varBindList` - 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`.

### snmpV1Trap

    public void snmpV1Trap(InetAddress addr,
                           SnmpIpAddress agentAddr,
                           String cs,
                           SnmpOid enterpOid,
                           int generic,
                           int specific,
                           SnmpVarBindList varBindList,
                           SnmpTimeticks time)
                    throws IOException,
                           SnmpStatusException

  Deprecated.
  Sends a trap using SNMP V1 trap format.
  The trap is sent to the specified `InetAddress` destination using the specified parameters (and the ACL file is not used). Note that if the specified `InetAddress` destination is null, then the ACL file mechanism is used.

  Parameters:
    `addr` - The `InetAddress` destination of the trap.
    `agentAddr` - The agent address to be used for the trap.
    `cs` - The community string to be used for the trap.
    `enterpOid` - The enterprise OID to be used for the trap.
    `generic` - The generic number of the trap.
    `specific` - The specific number of the trap.
    `varBindList` - 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`.
  Since:
    Java DMK 5.0

### snmpV1Trap

    public void snmpV1Trap(SnmpPeer peer,
                           SnmpIpAddress agentAddr,
                           SnmpOid enterpOid,
                           int generic,
                           int specific,
                           SnmpVarBindList varBindList,
                           SnmpTimeticks time)
                    throws IOException,
                           SnmpStatusException

  Deprecated.
  Sends a trap using SNMP V1 trap format.
  The trap is sent to the specified `SnmpPeer` destination. The community string used is the one located in the `SnmpPeer` parameters (`SnmpParameters.getRdCommunity()` ).

  Specified by:
    `snmpV1Trap` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `peer` - The `SnmpPeer` destination of the trap.
    `agentAddr` - The agent address to be used for the trap.
    `enterpOid` - The enterprise OID to be used for the trap.
    `generic` - The generic number of the trap.
    `specific` - The specific number of the trap.
    `varBindList` - 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`.
  Since:
    Java DMK 5.0

### snmpV2Trap

    public void snmpV2Trap(SnmpPeer peer,
                           SnmpOid trapOid,
                           SnmpVarBindList varBindList,
                           SnmpTimeticks time)
                    throws IOException,
                           SnmpStatusException

  Deprecated.
  Sends a trap using SNMP V2 trap format.
  The trap is sent to the specified `SnmpPeer` destination.
  The community string used is the one located in the `SnmpPeer` parameters (`SnmpParameters.getRdCommunity()` ).
  The variable list included in the outgoing trap is composed of the following items:
  - `sysUpTime.0` with the value specified by `time`
  - `snmpTrapOid.0` with the value specified by `trapOid`
  - `all the (oid,values)` from the specified `varBindList`

  Specified by:
    `snmpV2Trap` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `peer` - The `SnmpPeer` destination of the trap.
    `trapOid` - The OID identifying the trap.
    `varBindList` - 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`.
  Since:
    Java DMK 5.0

### snmpV2Trap

    public void snmpV2Trap(SnmpOid trapOid,
                           SnmpVarBindList varBindList)
                    throws IOException,
                           SnmpStatusException

  Deprecated.
  Sends a trap using SNMP V2 trap format.
  The trap is sent to each destination defined in the ACL file (if available). If no ACL file or no destinations are available, the trap is sent to the local host.
  The variable list included in the outgoing trap 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`

  Specified by:
    `snmpV2Trap` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `trapOid` - The OID identifying the trap.
    `varBindList` - 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`.

### snmpV2Trap

    public void snmpV2Trap(InetAddress addr,
                           String cs,
                           SnmpOid trapOid,
                           SnmpVarBindList varBindList)
                    throws IOException,
                           SnmpStatusException

  Deprecated.
  Sends a trap using SNMP V2 trap format.
  The trap is sent to the specified `InetAddress` destination using the specified community string (and the ACL file is not used).
  The variable list included in the outgoing trap 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`

  Specified by:
    `snmpV2Trap` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `addr` - The `InetAddress` destination of the trap.
    `cs` - The community string to be used for the trap.
    `trapOid` - The OID identifying the trap.
    `varBindList` - 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`.

### snmpV2Trap

    public void snmpV2Trap(InetAddress addr,
                           String cs,
                           SnmpOid trapOid,
                           SnmpVarBindList varBindList,
                           SnmpTimeticks time)
                    throws IOException,
                           SnmpStatusException

  Deprecated.
  Sends a trap using SNMP V2 trap format.
  The trap is sent to the specified `InetAddress` destination using the specified parameters (and the ACL file is not used). Note that if the specified `InetAddress` destination is null, then the ACL file mechanism is used.
  The variable list included in the outgoing trap is composed of the following items:
  - `sysUpTime.0` with the value specified by `time`
  - `snmpTrapOid.0` with the value specified by `trapOid`
  - `all the (oid,values)` from the specified `varBindList`

  Parameters:
    `addr` - The `InetAddress` destination of the trap.
    `cs` - The community string to be used for the trap.
    `trapOid` - The OID identifying the trap.
    `varBindList` - 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`.
  Since:
    Java DMK 5.0

### snmpPduTrap

    public void snmpPduTrap(InetAddress address,
                            SnmpPduPacket pdu)
                     throws IOException,
                            SnmpStatusException

  Deprecated.
  Send the specified trap PDU to the passed `InetAddress`.

  Specified by:
    `snmpPduTrap` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `address` - The destination address.
    `pdu` - The pdu to send.
  Throws:
    `IOException` - An I/O error occurred while sending the trap.
    `SnmpStatusException` - If the trap exceeds the limit defined by `bufferSize`.
  Since:
    Java DMK 5.0

### snmpPduTrap

    public void snmpPduTrap(SnmpPeer peer,
                            SnmpPduPacket pdu)
                     throws IOException,
                            SnmpStatusException

  Deprecated.
  Send the specified trap PDU to the passed `SnmpPeer`.

  Specified by:
    `snmpPduTrap` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `peer` - The destination peer. The Read community string is used of `SnmpParameters` is used as the trap community string.
    `pdu` - The pdu to send.
  Throws:
    `IOException` - An I/O error occurred while sending the trap.
    `SnmpStatusException` - If the trap exceeds the limit defined by `bufferSize`.
  Since:
    Java DMK 5.0

### snmpInformRequest

    public Vector snmpInformRequest(SnmpInformHandler cb,
                                    SnmpOid trapOid,
                                    SnmpVarBindList varBindList)
                             throws IllegalStateException,
                                    IOException,
                                    SnmpStatusException

  Deprecated.
  Sends an inform using SNMP V2 inform request format.
  The inform request is sent to each destination defined in the ACL file (if available). If no ACL file or no destinations are available, the inform request is sent to the local host.
  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:
    `snmpInformRequest` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `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:
    A vector of `SnmpInformRequest` objects.

    If there is no destination host for this inform request, the returned vector will be empty.

  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`.

### snmpInformRequest

    public SnmpInformRequest snmpInformRequest(InetAddress addr,
                                               String cs,
                                               SnmpInformHandler cb,
                                               SnmpOid trapOid,
                                               SnmpVarBindList varBindList)
                                        throws IllegalStateException,
                                               IOException,
                                               SnmpStatusException

  Deprecated.
  Sends an inform using SNMP V2 inform request format.
  The inform is sent to the specified `InetAddress` destination using the specified community string.
  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:
    `snmpInformRequest` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `addr` - The `InetAddress` destination for this inform request.
    `cs` - The community string to be used for the inform request.
    `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`.

### snmpInformRequest

    public SnmpInformRequest snmpInformRequest(SnmpPeer peer,
                                               SnmpInformHandler cb,
                                               SnmpOid trapOid,
                                               SnmpVarBindList varBindList)
                                        throws IllegalStateException,
                                               IOException,
                                               SnmpStatusException

  Deprecated.
  Sends an inform using SNMP V2 inform request format.
  The inform is sent to the specified `SnmpPeer` destination.
  The community string used is the one located in the `SnmpPeer` parameters (`SnmpParameters.getInformCommunity()` ).
  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:
    `snmpInformRequest` in interface `SnmpAdaptorServerMBean`
  Parameters:
    `peer` - The `SnmpPeer` destination for this inform request.
    `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`.
  Since:
    Java DMK 5.0

### mapErrorStatus

    public static final int mapErrorStatus(int errorStatus,
                                           int protocolVersion,
                                           int reqPduType)

  Deprecated.
  Method that maps an SNMP error status in the passed protocolVersion according to the provided pdu type.

  Parameters:
    `errorStatus` - The error status to convert.
    `protocolVersion` - The protocol version.
    `reqPduType` - The pdu type.

### getHost

    public String getHost()

  Deprecated.
  Specified by:
    `getHost` in interface `CommunicatorServerMBean`

### getPort

    public int getPort()

  Deprecated.
  Specified by:
    `getPort` in interface `CommunicatorServerMBean`

### finalize

    protected void finalize()

  Deprecated.
  Finalizer of the SNMP protocol adaptor objects. This method is called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

  Closes the datagram socket associated to this SNMP protocol adaptor.

### getSysUpTime

    public long getSysUpTime()

  Deprecated.
  Returns the time (in hundredths of second) elapsed since the SNMP protocol adaptor startup.

  Since:
    Java DMK 5.1

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.