java.lang.Object | ||
↳ | com.sun.jmx.snmp.daemon.CommunicatorServer | |
↳ | com.sun.jmx.snmp.daemon.SnmpAdaptorServer |
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:
setPort
method before starting the adaptorcom.sun.jmx.snmp.ServiceName.DOMAIN
and com.sun.jmx.snmp.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
which 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 which size exceed this limit will be rejected, no matter what
the value of bufferSize
actually is.
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.
This API is a Sun Microsystems internal API and is subject to change without notice.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Initializes this SNMP protocol adaptor using the default port (161).
| |||||||||||
Initializes this SNMP protocol adaptor using the specified port.
| |||||||||||
Initializes this SNMP protocol adaptor using the default port (161)
and the specified IP address based ACL implementation.
| |||||||||||
Initializes this SNMP protocol adaptor using the default port (161)
and the
specified
InetAddress . | |||||||||||
Initializes this SNMP protocol adaptor using the specified port and the
specified IP address based ACL implementation.
| |||||||||||
Initializes this SNMP protocol adaptor using the specified port and the
specified
InetAddress . | |||||||||||
Initializes this SNMP protocol adaptor using the specified IP
address based ACL implementation and the specified
InetAddress . | |||||||||||
Initializes this SNMP protocol adaptor using the specified port, the
specified address based ACL implementation and the specified
InetAddress . | |||||||||||
Initializes this SNMP protocol adaptor using the specified port and the
specified
InetAddress . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a new MIB in the SNMP MIB handler.
| |||||||||||
Adds a new MIB in the SNMP MIB handler.
| |||||||||||
Adds a new MIB in the SNMP MIB handler.
| |||||||||||
Adds a new MIB in the SNMP MIB handler.
| |||||||||||
Gets the number of managers currently being processed by this
SNMP protocol adaptor.
| |||||||||||
Returns
true if this SNMP protocol adaptor sends a
response in case of authentication failure. | |||||||||||
Returns
true if authentication traps are enabled. | |||||||||||
Returns the buffer size of this SNMP protocol adaptor.
| |||||||||||
Returns the enterprise OID.
| |||||||||||
Returns the Ip address based ACL used by this SNMP protocol adaptor.
| |||||||||||
Returns the port used by this SNMP protocol adaptor for sending
inform requests.
| |||||||||||
Gets the maximum number of managers that this SNMP protocol adaptor can
process concurrently.
| |||||||||||
Gets the number of times to try sending an inform request before
giving up.
| |||||||||||
Returns the names of the MIBs available in this SNMP protocol adaptor.
| |||||||||||
Returns the message factory of this SNMP protocol adaptor.
| |||||||||||
Return the actual port to which the adaptor is bound.
| |||||||||||
Returns the protocol of this SNMP protocol adaptor.
| |||||||||||
Gets the number of managers that have been processed by this
SNMP protocol adaptor since its creation.
| |||||||||||
Returns the
snmpInASNParseErrs value defined in MIB-II. | |||||||||||
Returns the
snmpInBadCommunityNames value defined in
MIB-II. | |||||||||||
Returns the
snmpInBadCommunityUses value defined in MIB-II. | |||||||||||
Returns the
snmpInBadVersions value defined in MIB-II. | |||||||||||
Returns the
snmpInGetNexts value defined in MIB-II. | |||||||||||
Returns the
snmpInGetRequests value defined in MIB-II. | |||||||||||
Returns the
snmpInPkts value defined in MIB-II. | |||||||||||
Returns the
snmpInSetRequests value defined in MIB-II. | |||||||||||
Returns the
snmpInTotalReqVars value defined in MIB-II. | |||||||||||
Returns the
snmpInTotalSetVars value defined in MIB-II. | |||||||||||
Returns the
snmpOutBadValues value defined in MIB-II. | |||||||||||
Returns the
snmpOutGenErrs value defined in MIB-II. | |||||||||||
Returns the
snmpOutGetResponses value defined in MIB-II. | |||||||||||
Returns the
snmpOutNoSuchNames value defined in MIB-II. | |||||||||||
Returns the
snmpOutPkts value defined in MIB-II. | |||||||||||
Returns the
snmpOutTooBigs value defined in MIB-II. | |||||||||||
Returns the
snmpOutTraps value defined in MIB-II. | |||||||||||
Returns the
snmpProxyDrops value defined in RFC
1907 NMPv2-MIB . | |||||||||||
Returns the
snmpSilentDrops value defined in RFC
1907 NMPv2-MIB . | |||||||||||
Gets the timeout to wait for an inform response from the manager.
| |||||||||||
Returns the port used by this SNMP protocol adaptor for sending traps.
| |||||||||||
Get the user-data factory associated with this SNMP protocol adaptor.
| |||||||||||
Method that maps an SNMP error status in the passed protocolVersion
according to the provided pdu type.
| |||||||||||
Not used in this context.
| |||||||||||
Not used in this context.
| |||||||||||
Not used in this context.
| |||||||||||
Allows the MBean to perform any operations it needs before being
registered in the MBean server.
| |||||||||||
Removes the specified MIB from the SNMP protocol adaptor.
| |||||||||||
Removes the specified MIB from the SNMP protocol adaptor.
| |||||||||||
Removes the specified MIB from the SNMP protocol adaptor.
| |||||||||||
Removes the specified MIB from the SNMP protocol adaptor.
| |||||||||||
Sets the flag indicating if responses need to be sent in case of
authentication failure.
| |||||||||||
Sets the flag indicating if traps need to be sent in case of
authentication failure.
| |||||||||||
Sets the buffer size of this SNMP protocol adaptor.
| |||||||||||
Sets the enterprise OID.
| |||||||||||
Sets the port used by this SNMP protocol adaptor for sending
inform requests.
| |||||||||||
Sets the maximum number of managers this SNMP protocol adaptor can
process concurrently.
| |||||||||||
Changes the maximun number of times to try sending an inform
request before giving up.
| |||||||||||
Sets the message factory of this SNMP protocol adaptor.
| |||||||||||
Changes the timeout to wait for an inform response from the manager.
| |||||||||||
Sets the port used by this SNMP protocol adaptor for sending traps.
| |||||||||||
Sets the port used by this SNMP protocol adaptor for sending traps.
| |||||||||||
Set the user-data factory of this SNMP protocol adaptor.
| |||||||||||
Sends an inform using SNMP V2 inform request format.
| |||||||||||
Sends an inform using SNMP V2 inform request format.
| |||||||||||
Sends an inform using SNMP V2 inform request format.
| |||||||||||
Send the specified trap PDU to the passed
InetAddress . | |||||||||||
Send the specified trap PDU to the passed
SnmpPeer . | |||||||||||
Sends a trap using SNMP V1 trap format.
| |||||||||||
Sends a trap using SNMP V1 trap format.
| |||||||||||
Sends a trap using SNMP V1 trap format.
| |||||||||||
Sends a trap using SNMP V1 trap format.
| |||||||||||
Sends a trap using SNMP V2 trap format.
| |||||||||||
Sends a trap using SNMP V2 trap format.
| |||||||||||
Sends a trap using SNMP V2 trap format.
| |||||||||||
Sends a trap using SNMP V2 trap format.
| |||||||||||
Stops this SNMP protocol adaptor.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates the datagram socket.
| |||||||||||
Not used in this context.
| |||||||||||
Reads a packet from the datagram socket and creates a request
handler which decodes and processes the request.
| |||||||||||
Closes the datagram socket.
| |||||||||||
Finalizer of the SNMP protocol adaptor objects.
| |||||||||||
The number of times the communicator server will attempt
to bind before giving up.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Initializes this SNMP protocol adaptor using the default port (161).
Use the SnmpAcl
default
implementation of the InetAddressAcl
interface.
Initializes this SNMP protocol adaptor using the specified port.
Use the SnmpAcl
default
implementation of the InetAddressAcl
interface.
port | The port number for sending SNMP responses. |
---|
Initializes this SNMP protocol adaptor using the default port (161) and the specified IP address based ACL implementation.
acl | The InetAddressAcl implementation.
null means no ACL - everybody is authorized. |
---|
Initializes this SNMP protocol adaptor using the default port (161)
and the
specified InetAddress
.
Use the SnmpAcl
default
implementation of the InetAddressAcl
interface.
addr | The IP address to bind. |
---|
Initializes this SNMP protocol adaptor using the specified port and the specified IP address based ACL implementation.
acl | The InetAddressAcl implementation.
null means no ACL - everybody is authorized. |
---|---|
port | The port number for sending SNMP responses. |
Initializes this SNMP protocol adaptor using the specified port and the
specified InetAddress
.
Use the SnmpAcl
default
implementation of the InetAddressAcl
interface.
port | The port number for sending SNMP responses. |
---|---|
addr | The IP address to bind. |
Initializes this SNMP protocol adaptor using the specified IP
address based ACL implementation and the specified
InetAddress
.
acl | The InetAddressAcl implementation. |
---|---|
addr | The IP address to bind. |
Initializes this SNMP protocol adaptor using the specified port, the
specified address based ACL implementation and the specified
InetAddress
.
acl | The InetAddressAcl implementation. |
---|---|
port | The port number for sending SNMP responses. |
addr | The IP address to bind. |
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.
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. |
Adds a new MIB in the SNMP MIB handler. In SNMP V1 and V2 the
contextName
is useless and this method
is equivalent to addMib(SnmpMibAgent mib)
.
mib | The MIB to add. |
---|---|
contextName | The MIB context name. |
IllegalArgumentException | If the parameter is null. |
---|
Adds a new MIB in the SNMP MIB handler. In SNMP V1 and V2 the
contextName
is useless and this method
is equivalent to addMib(SnmpMibAgent mib, SnmpOid[] oids)
.
mib | The MIB to add. |
---|---|
contextName | The MIB context. If null is passed, will be registered in the default context. |
oids | The set of OIDs this agent implements. |
IllegalArgumentException | If the parameter is null. |
---|
Adds a new MIB in the SNMP MIB handler.
mib | The MIB to add. |
---|
IllegalArgumentException | If the parameter is null. |
---|
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.
mib | The MIB to add. |
---|---|
oids | The set of OIDs this agent implements. |
IllegalArgumentException | If the parameter is null. |
---|
Gets the number of managers currently being processed by this SNMP protocol adaptor.
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.
true
if responses are sent.
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.
true
if authentication traps are enabled,
false
otherwise.
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.
Returns the enterprise OID. It is used by
snmpV1Trap
to fill the 'enterprise' field of the
trap request.
Returns the Ip address based ACL used by this SNMP protocol adaptor.
InetAddressAcl
implementation.Returns the port used by this SNMP protocol adaptor for sending inform requests. By default, port 162 is used.
Gets the maximum number of managers that this SNMP protocol adaptor can process concurrently.
Gets the number of times to try sending an inform request before giving up. By default, a maximum of 3 tries is used.
Returns the names of the MIBs available in this SNMP protocol adaptor.
Returns the message factory of this SNMP protocol adaptor.
Return the actual port to which the adaptor is bound. Can be different from the port given at construction time if that port number was 0.
Returns the protocol of this SNMP protocol adaptor.
Gets the number of managers that have been processed by this SNMP protocol adaptor since its creation.
stop
method.
Returns the snmpInASNParseErrs
value defined in MIB-II.
snmpInASNParseErrs
value.
Returns the snmpInBadCommunityNames
value defined in
MIB-II.
snmpInBadCommunityNames
value.
Returns the snmpInBadCommunityUses
value defined in MIB-II.
snmpInBadCommunityUses
value.
Returns the snmpInBadVersions
value defined in MIB-II.
snmpInBadVersions
value.
Returns the snmpInGetNexts
value defined in MIB-II.
snmpInGetNexts
value.
Returns the snmpInGetRequests
value defined in MIB-II.
snmpInGetRequests
value.
Returns the snmpInPkts
value defined in MIB-II.
snmpInPkts
value.
Returns the snmpInSetRequests
value defined in MIB-II.
snmpInSetRequests
value.
Returns the snmpInTotalReqVars
value defined in MIB-II.
snmpInTotalReqVars
value.
Returns the snmpInTotalSetVars
value defined in MIB-II.
snmpInTotalSetVars
value.
Returns the snmpOutBadValues
value defined in MIB-II.
snmpOutBadValues
value.
Returns the snmpOutGenErrs
value defined in MIB-II.
snmpOutGenErrs
value.
Returns the snmpOutGetResponses
value defined in MIB-II.
snmpOutGetResponses
value.
Returns the snmpOutNoSuchNames
value defined in MIB-II.
snmpOutNoSuchNames
value.
Returns the snmpOutPkts
value defined in MIB-II.
snmpOutPkts
value.
Returns the snmpOutTooBigs
value defined in MIB-II.
snmpOutTooBigs
value.
Returns the snmpOutTraps
value defined in MIB-II.
snmpOutTraps
value.
Returns the snmpProxyDrops
value defined in RFC
1907 NMPv2-MIB .
snmpProxyDrops
value.Returns the snmpSilentDrops
value defined in RFC
1907 NMPv2-MIB .
snmpSilentDrops
value.Gets the timeout to wait for an inform response from the manager. By default, a timeout of 3 seconds is used.
Returns the port used by this SNMP protocol adaptor for sending traps. By default, port 162 is used.
Get the user-data factory associated with this SNMP protocol adaptor.
Method that maps an SNMP error status in the passed protocolVersion according to the provided pdu type.
errorStatus | The error status to convert. |
---|---|
protocolVersion | The protocol version. |
reqPduType | The pdu type. |
Not used in this context.
Not used in this context.
registrationDone | Indicates whether or not the MBean has been
successfully registered in the MBeanServer .
The value false means that the registration phase has failed.
|
---|
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.jmx.snmp.ServiceName.DOMAIN
:com.sun.jmx.snmp.ServiceName.SNMP_ADAPTOR_SERVER
.
If any exception is raised, the SNMP protocol adaptor MBean will
not be registered in the MBean server.
server | The MBean server to register the service with. |
---|---|
name | The object name. |
Exception |
---|
Removes the specified MIB from the SNMP protocol adaptor.
mib | The MIB to be removed. |
---|
true
if the specified mib
was a MIB
included in the SNMP MIB handler, false
otherwise.
Removes the specified MIB from the SNMP protocol adaptor.
mib | The MIB to be removed. |
---|---|
contextName | The context name used at registration time. |
oids | The oid the MIB was previously registered for. |
true
if the specified mib
was
a MIB included in the SNMP MIB handler, false
otherwise.Removes the specified MIB from the SNMP protocol adaptor.
In SNMP V1 and V2 the contextName
is useless and this
method is equivalent to removeMib(SnmpMibAgent mib)
.
mib | The MIB to be removed. |
---|---|
contextName | The context name used at registration time. |
true
if the specified mib
was
a MIB included in the SNMP MIB handler, false
otherwise.Removes the specified MIB from the SNMP protocol adaptor.
mib | The MIB to be removed. |
---|---|
oids | The oid the MIB was previously registered for. |
true
if the specified mib
was
a MIB included in the SNMP MIB handler, false
otherwise.Sets the flag indicating if responses need to be sent in case of authentication failure.
enabled | Flag indicating if responses need to be sent. |
---|
Sets the flag indicating if traps need to be sent in case of authentication failure.
enabled | Flag indicating if traps need to be sent. |
---|
Sets the buffer size of this SNMP protocol adaptor. This buffer size is used for both incoming request and outgoing inform requests.
s | The buffer size. |
---|
IllegalStateException | This method has been invoked
while the communicator was ONLINE or STARTING .
|
---|
Sets the enterprise OID.
oid | The OID in string format "x.x.x.x". |
---|
IllegalArgumentException | The string format is incorrect |
---|
Sets the port used by this SNMP protocol adaptor for sending inform requests.
port | The port number for sending SNMP inform requests. |
---|
Sets the maximum number of managers this SNMP protocol adaptor can process concurrently.
c | The number of managers. |
---|
IllegalStateException | This method has been invoked
while the communicator was ONLINE or STARTING .
|
---|
Changes the maximun number of times to try sending an inform request before giving up.
newMaxTries | The maximun number of tries. |
---|
Sets the message factory of this SNMP protocol adaptor.
factory | The factory object (null means the default factory). |
---|
Changes the timeout to wait for an inform response from the manager.
newTimeout | The timeout (in milliseconds). |
---|
Sets the port used by this SNMP protocol adaptor for sending traps.
port | The port number for sending SNMP traps. |
---|
Sets the port used by this SNMP protocol adaptor for sending traps.
port | The port number for sending SNMP traps. |
---|
Set the user-data factory of this SNMP protocol adaptor.
factory | The factory object (null means no factory). |
---|
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 valuesnmpTrapOid.0
with the value specified by
trapOid
all the (oid,values)
from the specified
varBindList
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. |
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 .
|
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 valuesnmpTrapOid.0
with the value specified by
trapOid
all the (oid,values)
from the specified
varBindList
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. |
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 . |
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 valuesnmpTrapOid.0
with the value specified by
trapOid
all the (oid,values)
from the specified
varBindList
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. |
If there is no destination host for this inform request, the returned vector will be empty.
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 .
|
Send the specified trap PDU to the passed InetAddress
.
address | The destination address. |
---|---|
pdu | The pdu to send. |
IOException | An I/O error occurred while sending the trap. |
---|---|
SnmpStatusException | If the trap exceeds the limit
defined by bufferSize . |
Send the specified trap PDU to the passed SnmpPeer
.
peer | The destination peer. The Read community string is used of
SnmpParameters is used as the trap community string. |
---|---|
pdu | The pdu to send. |
IOException | An I/O error occurred while sending the trap. |
---|---|
SnmpStatusException | If the trap exceeds the limit defined
by bufferSize . |
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.
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). |
IOException | An I/O error occurred while sending the trap. |
---|---|
SnmpStatusException | If the trap exceeds the limit defined
by bufferSize . |
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()
).
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). |
IOException | An I/O error occurred while sending the trap. |
---|---|
SnmpStatusException | If the trap exceeds the limit
defined by bufferSize . |
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).
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. |
IOException | An I/O error occurred while sending the trap. |
---|---|
SnmpStatusException | If the trap exceeds the limit defined
by bufferSize .
|
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.
generic | The generic number of the trap. |
---|---|
specific | The specific number of the trap. |
varBindList | A list of SnmpVarBind instances or null. |
IOException | An I/O error occurred while sending the trap. |
---|---|
SnmpStatusException | If the trap exceeds the limit defined
by bufferSize .
|
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
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). |
IOException | An I/O error occurred while sending the trap. |
---|---|
SnmpStatusException | If the trap exceeds the limit
defined by bufferSize . |
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 valuesnmpTrapOid.0
with the value specified by
trapOid
all the (oid,values)
from the specified
varBindList
trapOid | The OID identifying the trap. |
---|---|
varBindList | A list of SnmpVarBind instances or null. |
IOException | An I/O error occurred while sending the trap. |
---|---|
SnmpStatusException | If the trap exceeds the limit defined
by bufferSize .
|
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 valuesnmpTrapOid.0
with the value specified by
trapOid
all the (oid,values)
from the specified
varBindList
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. |
IOException | An I/O error occurred while sending the trap. |
---|---|
SnmpStatusException | If the trap exceeds the limit
defined by bufferSize .
|
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
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). |
IOException | An I/O error occurred while sending the trap. |
---|---|
SnmpStatusException | If the trap exceeds the limit
defined by bufferSize . |
Stops this SNMP protocol adaptor. Closes the datagram socket.
Has no effect if this SNMP protocol adaptor is OFFLINE
or
STOPPING
.
Creates the datagram socket.
Not used in this context.
Reads a packet from the datagram socket and creates a request handler which decodes and processes the request.
Closes the datagram socket.
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.
The number of times the communicator server will attempt to bind before giving up. We attempt only once...