public interface

SnmpAdaptorServerMBean

implements CommunicatorServerMBean
com.sun.jmx.snmp.daemon.SnmpAdaptorServerMBean
Known Indirect Subclasses

Class Overview

Exposes the remote management interface of the SnmpAdaptorServer MBean.

This API is a Sun Microsystems internal API and is subject to change without notice.

Summary

Public Methods
abstract SnmpMibHandler addMib(SnmpMibAgent mib)
Adds a new MIB in the SNMP MIB handler.
abstract SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids)
Adds a new MIB in the SNMP MIB handler.
abstract int getActiveClientCount()
Gets the number of managers currently being processed by this SNMP protocol adaptor.
abstract boolean getAuthRespEnabled()
Returns true if this SNMP protocol adaptor sends a response in case of authentication failure.
abstract boolean getAuthTrapEnabled()
Returns true if authentication traps are enabled.
abstract Integer getBufferSize()
Returns the buffer size of this SNMP protocol adaptor.
abstract String getEnterpriseOid()
Returns the enterprise OID.
abstract InetAddressAcl getInetAddressAcl()
Returns the Ip address based ACL used by this SNMP protocol adaptor.
abstract int getInformPort()
Returns the port used by this SNMP protocol adaptor for sending inform requests.
abstract int getMaxActiveClientCount()
Gets the maximum number of managers that this SNMP protocol adaptor can process concurrently.
abstract int getMaxTries()
Gets the number of times to try sending an inform request before giving up.
abstract String[] getMibs()
Returns the names of the MIBs available in this SNMP protocol adaptor.
abstract SnmpPduFactory getPduFactory()
Returns the message factory of this SNMP protocol adaptor.
abstract String getProtocol()
Returns the protocol of this SNMP protocol adaptor.
abstract int getServedClientCount()
Gets the number of managers that have been processed by this SNMP protocol adaptor since its creation.
abstract Long getSnmpInASNParseErrs()
Returns the snmpInASNParseErrs value defined in MIB-II.
abstract Long getSnmpInBadCommunityNames()
Returns the snmpInBadCommunityNames value defined in MIB-II.
abstract Long getSnmpInBadCommunityUses()
Returns the snmpInBadCommunityUses value defined in MIB-II.
abstract Long getSnmpInBadVersions()
Returns the snmpInBadVersions value defined in MIB-II.
abstract Long getSnmpInGetNexts()
Returns the snmpInGetNexts value defined in MIB-II.
abstract Long getSnmpInGetRequests()
Returns the snmpInGetRequests value defined in MIB-II.
abstract Long getSnmpInPkts()
Returns the snmpInPkts value defined in MIB-II.
abstract Long getSnmpInSetRequests()
Returns the snmpInSetRequests value defined in MIB-II.
abstract Long getSnmpInTotalReqVars()
Returns the snmpInTotalReqVars value defined in MIB-II.
abstract Long getSnmpInTotalSetVars()
Returns the snmpInTotalSetVars value defined in MIB-II.
abstract Long getSnmpOutBadValues()
Returns the snmpOutBadValues value defined in MIB-II.
abstract Long getSnmpOutGenErrs()
Returns the snmpOutGenErrs value defined in MIB-II.
abstract Long getSnmpOutGetResponses()
Returns the snmpOutGetResponses value defined in MIB-II.
abstract Long getSnmpOutNoSuchNames()
Returns the snmpOutNoSuchNames value defined in MIB-II.
abstract Long getSnmpOutPkts()
Returns the snmpOutPkts value defined in MIB-II.
abstract Long getSnmpOutTooBigs()
Returns the snmpOutTooBigs value defined in MIB-II.
abstract Long getSnmpOutTraps()
Returns the snmpOutTraps value defined in MIB-II.
abstract Long getSnmpProxyDrops()
Returns the snmpProxyDrops value defined in rfc 1907 NMPv2-MIB .
abstract Long getSnmpSilentDrops()
Returns the snmpSilentDrops value defined in rfc 1907 NMPv2-MIB .
abstract int getTimeout()
Gets the timeout to wait for an inform response from the manager.
abstract Integer getTrapPort()
Returns the port used by this SNMP protocol adaptor for sending traps.
abstract SnmpUserDataFactory getUserDataFactory()
Get the user-data factory associated with this SNMP protocol adaptor.
abstract boolean removeMib(SnmpMibAgent mib)
Removes the specified MIB from the SNMP protocol adaptor.
abstract void setAuthRespEnabled(boolean enabled)
Sets the flag indicating if responses need to be sent in case of authentication failure.
abstract void setAuthTrapEnabled(boolean enabled)
Sets the flag indicating if traps need to be sent in case of authentication failure.
abstract void setBufferSize(Integer s)
Sets the buffer size of this SNMP protocol adaptor.
abstract void setEnterpriseOid(String oid)
Sets the enterprise OID.
abstract void setInformPort(int port)
Sets the port used by this SNMP protocol adaptor for sending inform requests.
abstract void setMaxActiveClientCount(int c)
Sets the maximum number of managers this SNMP protocol adaptor can process concurrently.
abstract void setMaxTries(int newMaxTries)
Changes the maximun number of times to try sending an inform request before giving up.
abstract void setPduFactory(SnmpPduFactory factory)
Sets the message factory of this SNMP protocol adaptor.
abstract void setTimeout(int newTimeout)
Changes the timeout to wait for an inform response from the manager.
abstract void setTrapPort(Integer port)
Sets the port used by this SNMP protocol adaptor for sending traps.
abstract void setUserDataFactory(SnmpUserDataFactory factory)
Set the user-data factory of this SNMP protocol adaptor.
abstract SnmpInformRequest snmpInformRequest(InetAddress address, String cs, SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList)
Sends an inform using SNMP V2 inform request format.
abstract SnmpInformRequest snmpInformRequest(SnmpPeer peer, SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList)
Sends an inform using SNMP V2 inform request format.
abstract Vector snmpInformRequest(SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList)
Sends an inform using SNMP V2 inform request format.
abstract void snmpPduTrap(InetAddress address, SnmpPduPacket pdu)
Send the specified trap PDU to the passed InetAddress.
abstract void snmpPduTrap(SnmpPeer peer, SnmpPduPacket pdu)
Send the specified trap PDU to the passed SnmpPeer.
abstract void snmpV1Trap(SnmpPeer peer, SnmpIpAddress agentAddr, SnmpOid enterpOid, int generic, int specific, SnmpVarBindList varBindList, SnmpTimeticks time)
Sends a trap using SNMP V1 trap format.
abstract void snmpV1Trap(InetAddress address, String cs, int generic, int specific, SnmpVarBindList varBindList)
Sends a trap using SNMP V1 trap format.
abstract void snmpV1Trap(int generic, int specific, SnmpVarBindList varBindList)
Sends a trap using SNMP V1 trap format.
abstract void snmpV2Trap(SnmpPeer peer, SnmpOid trapOid, SnmpVarBindList varBindList, SnmpTimeticks time)
Sends a trap using SNMP V2 trap format.
abstract void snmpV2Trap(SnmpOid trapOid, SnmpVarBindList varBindList)
Sends a trap using SNMP V2 trap format.
abstract void snmpV2Trap(InetAddress address, String cs, SnmpOid trapOid, SnmpVarBindList varBindList)
Sends a trap using SNMP V2 trap format.
[Expand]
Inherited Methods
From interface com.sun.jmx.snmp.daemon.CommunicatorServerMBean

Public Methods

public abstract SnmpMibHandler addMib (SnmpMibAgent mib)

Adds a new MIB in the SNMP MIB handler. This method is called automatically by setSnmpAdaptor(SnmpMibHandler) and setSnmpAdaptorName(ObjectName) and should not be called directly.

Parameters
mib The MIB to add.
Returns
  • A reference to the SNMP MIB handler.
Throws
IllegalArgumentException If the parameter is null.

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

Adds a new MIB in the SNMP MIB handler.

Parameters
mib The MIB to add.
oids The set of OIDs this agent implements.
Returns
  • A reference to the SNMP MIB handler.
Throws
IllegalArgumentException If the parameter is null.

public abstract int getActiveClientCount ()

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

Returns
  • The number of managers currently being processed by this SNMP protocol adaptor.

public abstract boolean getAuthRespEnabled ()

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.

Returns
  • true if responses are sent.

public abstract boolean getAuthTrapEnabled ()

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 behaviour is to send authentication traps.

Returns
  • true if authentication traps are enabled, false otherwise.

public abstract Integer getBufferSize ()

Returns the buffer size of this SNMP protocol adaptor. By default, buffer size 1024 is used.

Returns
  • The buffer size.

public abstract String getEnterpriseOid ()

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

Returns
  • The OID in string format "x.x.x.x".

public abstract InetAddressAcl getInetAddressAcl ()

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

Returns
  • The InetAddressAcl implementation.

public abstract int getInformPort ()

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

Returns
  • The port number for sending SNMP inform requests.

public abstract int getMaxActiveClientCount ()

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

Returns
  • The maximum number of managers that this SNMP protocol adaptor can process concurrently.

public abstract int getMaxTries ()

Gets the number of times to try sending an inform request before giving up.

Returns
  • The maximun number of tries.

public abstract String[] getMibs ()

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

Returns
  • An array of MIB names.

public abstract SnmpPduFactory getPduFactory ()

Returns the message factory of this SNMP protocol adaptor.

Returns
  • The factory object.

public abstract String getProtocol ()

Returns the protocol of this SNMP protocol adaptor.

Returns
  • The string "snmp".

public abstract int getServedClientCount ()

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

Returns
  • The number of managers handled by this SNMP protocol adaptor since its creation. This counter is not reset by the stop method.

public abstract Long getSnmpInASNParseErrs ()

Returns the snmpInASNParseErrs value defined in MIB-II.

Returns
  • The snmpInASNParseErrs value.

public abstract Long getSnmpInBadCommunityNames ()

Returns the snmpInBadCommunityNames value defined in MIB-II.

Returns
  • The snmpInBadCommunityNames value.

public abstract Long getSnmpInBadCommunityUses ()

Returns the snmpInBadCommunityUses value defined in MIB-II.

Returns
  • The snmpInBadCommunityUses value.

public abstract Long getSnmpInBadVersions ()

Returns the snmpInBadVersions value defined in MIB-II.

Returns
  • The snmpInBadVersions value.

public abstract Long getSnmpInGetNexts ()

Returns the snmpInGetNexts value defined in MIB-II.

Returns
  • The snmpInGetNexts value.

public abstract Long getSnmpInGetRequests ()

Returns the snmpInGetRequests value defined in MIB-II.

Returns
  • The snmpInGetRequests value.

public abstract Long getSnmpInPkts ()

Returns the snmpInPkts value defined in MIB-II.

Returns
  • The snmpInPkts value.

public abstract Long getSnmpInSetRequests ()

Returns the snmpInSetRequests value defined in MIB-II.

Returns
  • The snmpInSetRequests value.

public abstract Long getSnmpInTotalReqVars ()

Returns the snmpInTotalReqVars value defined in MIB-II.

Returns
  • The snmpInTotalReqVars value.

public abstract Long getSnmpInTotalSetVars ()

Returns the snmpInTotalSetVars value defined in MIB-II.

Returns
  • The snmpInTotalSetVars value.

public abstract Long getSnmpOutBadValues ()

Returns the snmpOutBadValues value defined in MIB-II.

Returns
  • The snmpOutBadValues value.

public abstract Long getSnmpOutGenErrs ()

Returns the snmpOutGenErrs value defined in MIB-II.

Returns
  • The snmpOutGenErrs value.

public abstract Long getSnmpOutGetResponses ()

Returns the snmpOutGetResponses value defined in MIB-II.

Returns
  • The snmpOutGetResponses value.

public abstract Long getSnmpOutNoSuchNames ()

Returns the snmpOutNoSuchNames value defined in MIB-II.

Returns
  • The snmpOutNoSuchNames value.

public abstract Long getSnmpOutPkts ()

Returns the snmpOutPkts value defined in MIB-II.

Returns
  • The snmpOutPkts value.

public abstract Long getSnmpOutTooBigs ()

Returns the snmpOutTooBigs value defined in MIB-II.

Returns
  • The snmpOutTooBigs value.

public abstract Long getSnmpOutTraps ()

Returns the snmpOutTraps value defined in MIB-II.

Returns
  • The snmpOutTraps value.

public abstract Long getSnmpProxyDrops ()

Returns the snmpProxyDrops value defined in rfc 1907 NMPv2-MIB .

Returns
  • The snmpProxyDrops value.

public abstract Long getSnmpSilentDrops ()

Returns the snmpSilentDrops value defined in rfc 1907 NMPv2-MIB .

Returns
  • The snmpSilentDrops value.

public abstract int getTimeout ()

Gets the timeout to wait for an inform response from the manager.

Returns
  • The value of the timeout property.

public abstract Integer getTrapPort ()

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

Returns
  • The port number for sending SNMP traps.

public abstract SnmpUserDataFactory getUserDataFactory ()

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

Returns
  • The factory object (null means no factory).

public abstract boolean removeMib (SnmpMibAgent mib)

Removes the specified MIB from the SNMP protocol adaptor. This method is called automatically by setSnmpAdaptor(SnmpMibHandler) and setSnmpAdaptorName(ObjectName) and should not be called directly.

Parameters
mib The MIB to be removed.
Returns
  • true if the specified mib was a MIB included in the SNMP MIB handler, false otherwise.

public abstract void setAuthRespEnabled (boolean enabled)

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

Parameters
enabled Flag indicating if responses need to be sent.

public abstract void setAuthTrapEnabled (boolean enabled)

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

Parameters
enabled Flag indicating if traps need to be sent.

public abstract void setBufferSize (Integer s)

Sets the buffer size of this SNMP protocol adaptor.

Parameters
s The buffer size.
Throws
IllegalStateException This method has been invoked while the communicator was ONLINE or STARTING.

public abstract void setEnterpriseOid (String oid)

Sets the enterprise OID.

Parameters
oid The OID in string format "x.x.x.x".
Throws
IllegalArgumentException The string format is incorrect

public abstract void setInformPort (int port)

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

Parameters
port The port number for sending SNMP inform requests.

public abstract void setMaxActiveClientCount (int c)

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

Parameters
c The number of managers.
Throws
IllegalStateException This method has been invoked while the communicator was ONLINE or STARTING.

public abstract void setMaxTries (int newMaxTries)

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

Parameters
newMaxTries The maximun number of tries.

public abstract void setPduFactory (SnmpPduFactory factory)

Sets the message factory of this SNMP protocol adaptor.

Parameters
factory The factory object (null means the default factory).

public abstract void setTimeout (int newTimeout)

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

Parameters
newTimeout The timeout (in milliseconds).

public abstract void setTrapPort (Integer port)

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

Parameters
port The port number for sending SNMP traps.

public abstract void setUserDataFactory (SnmpUserDataFactory factory)

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

Parameters
factory The factory object (null means no factory).

public abstract SnmpInformRequest snmpInformRequest (InetAddress address, String cs, SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList)

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 request 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
address 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.

public abstract SnmpInformRequest snmpInformRequest (SnmpPeer peer, SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList)

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.

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.

public abstract Vector snmpInformRequest (SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList)

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 request 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
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 com.sun.jmx.snmp.daemon.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.

public abstract void snmpPduTrap (InetAddress address, SnmpPduPacket pdu)

Send the specified trap PDU to the passed InetAddress.

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.

public abstract void snmpPduTrap (SnmpPeer peer, SnmpPduPacket pdu)

Send the specified trap PDU to the passed SnmpPeer.

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.

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

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() ).

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.

public abstract void snmpV1Trap (InetAddress address, String cs, int generic, int specific, SnmpVarBindList varBindList)

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

Parameters
address 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.

public abstract void snmpV1Trap (int generic, int specific, SnmpVarBindList varBindList)

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.

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 occured while sending the trap.
SnmpStatusException If the trap exceeds the limit defined by bufferSize.

public abstract void snmpV2Trap (SnmpPeer peer, SnmpOid trapOid, SnmpVarBindList varBindList, SnmpTimeticks time)

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

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.

public abstract void snmpV2Trap (SnmpOid trapOid, SnmpVarBindList varBindList)

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

Parameters
trapOid The OID identifying the trap.
varBindList A list of SnmpVarBind instances or null.
Throws
IOException An I/O error occured while sending the trap.
SnmpStatusException If the trap exceeds the limit defined by bufferSize.

public abstract void snmpV2Trap (InetAddress address, String cs, SnmpOid trapOid, SnmpVarBindList varBindList)

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

Parameters
address 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.