|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SnmpAdaptorServerMBean
Exposes the remote management interface of the SnmpAdaptorServer
MBean.
Method Summary | |
---|---|
SnmpMibHandler |
addMib(SnmpMibAgent mib)
Adds a new MIB in the SNMP MIB handler. |
SnmpMibHandler |
addMib(SnmpMibAgent mib,
SnmpOid[] oids)
Adds a new MIB in the SNMP MIB handler. |
SnmpMibHandler |
addMib(SnmpMibAgent mib,
String contextName)
Adds a new contextualized MIB in the SNMP MIB handler. |
int |
getActiveClientCount()
Gets the number of managers currently being processed by this SNMP protocol adaptor. |
boolean |
getAuthRespEnabled()
Returns true if this SNMP protocol adaptor sends a response in case
of authentication failure. |
boolean |
getAuthTrapEnabled()
Returns true if authentication traps are enabled. |
Integer |
getBufferSize()
Returns the buffer size of this SNMP protocol adaptor. |
String |
getEnterpriseOid()
Returns the enterprise OID. |
InetAddressAcl |
getInetAddressAcl()
Returns the Ip address based ACL used by this SNMP protocol adaptor. |
int |
getInformPort()
Returns the port used by this SNMP protocol adaptor for sending inform requests. |
int |
getMaxActiveClientCount()
Gets the maximum number of managers that this SNMP protocol adaptor can process concurrently. |
int |
getMaxTries()
Gets the number of times to try sending an inform request before giving up. |
String[] |
getMibs()
Returns the names of the MIBs available in this SNMP protocol adaptor. |
SnmpPduFactory |
getPduFactory()
Returns the message factory of this SNMP protocol adaptor. |
String |
getProtocol()
Returns the protocol of this SNMP protocol adaptor. |
int |
getServedClientCount()
Gets the number of managers that have been processed by this SNMP protocol adaptor since its creation. |
Long |
getSnmpInASNParseErrs()
Returns the snmpInASNParseErrs value defined in MIB-II. |
Long |
getSnmpInBadCommunityNames()
Returns the snmpInBadCommunityNames value defined in MIB-II. |
Long |
getSnmpInBadCommunityUses()
Returns the snmpInBadCommunityUses value defined in MIB-II. |
Long |
getSnmpInBadVersions()
Returns the snmpInBadVersions value defined in MIB-II. |
Long |
getSnmpInGetNexts()
Returns the snmpInGetNexts value defined in MIB-II. |
Long |
getSnmpInGetRequests()
Returns the snmpInGetRequests value defined in MIB-II. |
Long |
getSnmpInPkts()
Returns the snmpInPkts value defined in MIB-II. |
Long |
getSnmpInSetRequests()
Returns the snmpInSetRequests value defined in MIB-II. |
Long |
getSnmpInTotalReqVars()
Returns the snmpInTotalReqVars value defined in MIB-II. |
Long |
getSnmpInTotalSetVars()
Returns the snmpInTotalSetVars value defined in MIB-II. |
Long |
getSnmpOutBadValues()
Returns the snmpOutBadValues value defined in MIB-II. |
Long |
getSnmpOutGenErrs()
Returns the snmpOutGenErrs value defined in MIB-II. |
Long |
getSnmpOutGetResponses()
Returns the snmpOutGetResponses value defined in MIB-II. |
Long |
getSnmpOutNoSuchNames()
Returns the snmpOutNoSuchNames value defined in MIB-II. |
Long |
getSnmpOutPkts()
Returns the snmpOutPkts value defined in MIB-II. |
Long |
getSnmpOutTooBigs()
Returns the snmpOutTooBigs value defined in MIB-II. |
Long |
getSnmpOutTraps()
Returns the snmpOutTraps value defined in MIB-II. |
Long |
getSnmpProxyDrops()
Returns the snmpProxyDrops value defined in rfc 1907 NMPv2-MIB . |
Long |
getSnmpSilentDrops()
Returns the snmpSilentDrops value defined in rfc 1907 NMPv2-MIB . |
int |
getTimeout()
Gets the timeout to wait for an inform response from the manager. |
Integer |
getTrapPort()
Returns the port used by this SNMP protocol adaptor for sending traps. |
SnmpUserDataFactory |
getUserDataFactory()
Get the user-data factory associated with this SNMP protocol adaptor. |
boolean |
removeMib(SnmpMibAgent mib)
Removes the specified MIB from the SNMP protocol adaptor. |
void |
setAuthRespEnabled(boolean enabled)
Sets the flag indicating if responses need to be sent in case of authentication failure. |
void |
setAuthTrapEnabled(boolean enabled)
Sets the flag indicating if traps need to be sent in case of authentication failure. |
void |
setBufferSize(Integer s)
Sets the buffer size of this SNMP protocol adaptor. |
void |
setEnterpriseOid(String oid)
Sets the enterprise OID. |
void |
setInformPort(int port)
Sets the port used by this SNMP protocol adaptor for sending inform requests. |
void |
setMaxActiveClientCount(int c)
Sets the maximum number of managers this SNMP protocol adaptor can process concurrently. |
void |
setMaxTries(int newMaxTries)
Changes the maximum number of times to try sending an inform request before giving up. |
void |
setPduFactory(SnmpPduFactory factory)
Sets the message factory of this SNMP protocol adaptor. |
void |
setTimeout(int newTimeout)
Changes the timeout to wait for an inform response from the manager. |
void |
setTrapPort(Integer port)
Sets the port used by this SNMP protocol adaptor for sending traps. |
void |
setUserDataFactory(SnmpUserDataFactory factory)
Set the user-data factory of this SNMP protocol adaptor. |
SnmpInformRequest |
snmpInformRequest(InetAddress address,
String cs,
SnmpInformHandler cb,
SnmpOid trapOid,
SnmpVarBindList varBindList)
Sends an inform using SNMP V2 inform request format. |
Vector |
snmpInformRequest(SnmpInformHandler cb,
SnmpOid trapOid,
SnmpVarBindList varBindList)
Sends an inform using SNMP V2 inform request format. |
SnmpInformRequest |
snmpInformRequest(SnmpPeer peer,
SnmpInformHandler cb,
SnmpOid trapOid,
SnmpVarBindList varBindList)
Sends an inform using SNMP V2 inform request format. |
void |
snmpPduTrap(InetAddress address,
SnmpPduPacket pdu)
Send the specified trap PDU to the passed InetAddress . |
void |
snmpPduTrap(SnmpPeer peer,
SnmpPduPacket pdu)
Send the specified trap PDU to the passed SnmpPeer . |
void |
snmpV1Trap(InetAddress address,
String cs,
int generic,
int specific,
SnmpVarBindList varBindList)
Sends a trap using SNMP V1 trap format. |
void |
snmpV1Trap(int generic,
int specific,
SnmpVarBindList varBindList)
Sends a trap using SNMP V1 trap format. |
void |
snmpV1Trap(SnmpPeer peer,
SnmpIpAddress agentAddr,
SnmpOid enterpOid,
int generic,
int specific,
SnmpVarBindList varBindList,
SnmpTimeticks time)
Sends a trap using SNMP V1 trap format. |
void |
snmpV2Trap(InetAddress address,
String cs,
SnmpOid trapOid,
SnmpVarBindList varBindList)
Sends a trap using SNMP V2 trap format. |
void |
snmpV2Trap(SnmpOid trapOid,
SnmpVarBindList varBindList)
Sends a trap using SNMP V2 trap format. |
void |
snmpV2Trap(SnmpPeer peer,
SnmpOid trapOid,
SnmpVarBindList varBindList,
SnmpTimeticks time)
Sends a trap using SNMP V2 trap format. |
Methods inherited from interface com.sun.jdmk.comm.CommunicatorServerMBean |
---|
getHost, getPort, getState, getStateString, isActive, setPort, start, stop, waitState |
Method Detail |
---|
InetAddressAcl getInetAddressAcl()
InetAddressAcl
implementation.Integer getTrapPort()
void setTrapPort(Integer port)
port
- The port number for sending SNMP traps.int getInformPort()
void setInformPort(int port)
port
- The port number for sending SNMP inform requests.int getServedClientCount()
stop
method.int getActiveClientCount()
int getMaxActiveClientCount()
void setMaxActiveClientCount(int c) throws IllegalStateException
c
- The number of managers.
IllegalStateException
- This method has been invoked
while the communicator was ONLINE
or STARTING
.String getProtocol()
getProtocol
in interface CommunicatorServerMBean
Integer getBufferSize()
void setBufferSize(Integer s) throws IllegalStateException
s
- The buffer size.
IllegalStateException
- This method has been invoked
while the communicator was ONLINE
or STARTING
.int getMaxTries()
void setMaxTries(int newMaxTries)
newMaxTries
- The maximum number of tries.int getTimeout()
void setTimeout(int newTimeout)
newTimeout
- The timeout (in milliseconds).SnmpPduFactory getPduFactory()
void setPduFactory(SnmpPduFactory factory)
factory
- The factory object (null means the default factory).void setUserDataFactory(SnmpUserDataFactory factory)
factory
- The factory object (null means no factory).SnmpUserDataFactory
SnmpUserDataFactory getUserDataFactory()
SnmpUserDataFactory
boolean getAuthTrapEnabled()
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.
true
if authentication traps are enabled, false
otherwise.void setAuthTrapEnabled(boolean enabled)
enabled
- Flag indicating if traps need to be sent.boolean getAuthRespEnabled()
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.void setAuthRespEnabled(boolean enabled)
enabled
- Flag indicating if responses need to be sent.String getEnterpriseOid()
snmpV1Trap
to fill
the 'enterprise' field of the trap request.
void setEnterpriseOid(String oid) throws IllegalArgumentException
oid
- The OID in string format "x.x.x.x".
IllegalArgumentException
- The string format is incorrectString[] getMibs()
Long getSnmpOutTraps()
snmpOutTraps
value defined in MIB-II.
snmpOutTraps
value.Long getSnmpOutGetResponses()
snmpOutGetResponses
value defined in MIB-II.
snmpOutGetResponses
value.Long getSnmpOutGenErrs()
snmpOutGenErrs
value defined in MIB-II.
snmpOutGenErrs
value.Long getSnmpOutBadValues()
snmpOutBadValues
value defined in MIB-II.
snmpOutBadValues
value.Long getSnmpOutNoSuchNames()
snmpOutNoSuchNames
value defined in MIB-II.
snmpOutNoSuchNames
value.Long getSnmpOutTooBigs()
snmpOutTooBigs
value defined in MIB-II.
snmpOutTooBigs
value.Long getSnmpInASNParseErrs()
snmpInASNParseErrs
value defined in MIB-II.
snmpInASNParseErrs
value.Long getSnmpInBadCommunityUses()
snmpInBadCommunityUses
value defined in MIB-II.
snmpInBadCommunityUses
value.Long getSnmpInBadCommunityNames()
snmpInBadCommunityNames
value defined in MIB-II.
snmpInBadCommunityNames
value.Long getSnmpInBadVersions()
snmpInBadVersions
value defined in MIB-II.
snmpInBadVersions
value.Long getSnmpOutPkts()
snmpOutPkts
value defined in MIB-II.
snmpOutPkts
value.Long getSnmpInPkts()
snmpInPkts
value defined in MIB-II.
snmpInPkts
value.Long getSnmpInGetRequests()
snmpInGetRequests
value defined in MIB-II.
snmpInGetRequests
value.Long getSnmpInGetNexts()
snmpInGetNexts
value defined in MIB-II.
snmpInGetNexts
value.Long getSnmpInSetRequests()
snmpInSetRequests
value defined in MIB-II.
snmpInSetRequests
value.Long getSnmpInTotalSetVars()
snmpInTotalSetVars
value defined in MIB-II.
snmpInTotalSetVars
value.Long getSnmpInTotalReqVars()
snmpInTotalReqVars
value defined in MIB-II.
snmpInTotalReqVars
value.Long getSnmpSilentDrops()
snmpSilentDrops
value defined in rfc 1907 NMPv2-MIB .
snmpSilentDrops
value.Long getSnmpProxyDrops()
snmpProxyDrops
value defined in rfc 1907 NMPv2-MIB .
snmpProxyDrops
value.SnmpMibHandler addMib(SnmpMibAgent mib) throws IllegalArgumentException
SnmpMibAgent.setSnmpAdaptor(SnmpMibHandler)
and SnmpMibAgent.setSnmpAdaptorName(ObjectName)
and should not be called directly from remote.
mib
- The MIB to add.
IllegalArgumentException
- If the parameter is null.SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids) throws IllegalArgumentException
SnmpMibAgent.setSnmpAdaptor(SnmpMibHandler, SnmpOid[])
and SnmpMibAgent.setSnmpAdaptorName(ObjectName, SnmpOid[])
and should not be called directly from remote.
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)
IllegalArgumentException
- If the parameter is null.SnmpMibHandler addMib(SnmpMibAgent mib, String contextName) throws IllegalArgumentException
SnmpMibAgent.setSnmpAdaptor(SnmpMibHandler, String)
and SnmpMibAgent.setSnmpAdaptorName(ObjectName, String)
and should not be called directly from remote.
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
.
mib
- The MIB to add.contextName
- The MIB context name. If null or
contextName.length == 0, will be registered in the default context.
IllegalArgumentException
- If the parameter is null.boolean removeMib(SnmpMibAgent mib)
SnmpMibAgent.setSnmpAdaptor(SnmpMibHandler)
and SnmpMibAgent.setSnmpAdaptorName(ObjectName)
and should not be called directly from remote.
mib
- The MIB to be removed.
true
if the specified mib
was a MIB included in the SNMP MIB handler,
false
otherwise.void snmpV1Trap(int generic, int specific, SnmpVarBindList varBindList) throws IOException, SnmpStatusException
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
.void snmpV1Trap(InetAddress address, String cs, int generic, int specific, SnmpVarBindList varBindList) throws IOException, SnmpStatusException
InetAddress
destination
using the specified community string (and the ACL file is not used).
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.
IOException
- An I/O error occurred while sending the trap.
SnmpStatusException
- If the trap exceeds the limit defined by bufferSize
.void snmpV1Trap(SnmpPeer peer, SnmpIpAddress agentAddr, SnmpOid enterpOid, int generic, int specific, SnmpVarBindList varBindList, SnmpTimeticks time) throws IOException, SnmpStatusException
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
.void snmpV2Trap(SnmpPeer peer, SnmpOid trapOid, SnmpVarBindList varBindList, SnmpTimeticks time) throws IOException, SnmpStatusException
SnmpPeer
destination.
SnmpPeer
parameters (SnmpParameters.getRdCommunity()
).
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
.void snmpV2Trap(SnmpOid trapOid, SnmpVarBindList varBindList) throws IOException, SnmpStatusException
sysUpTime.0
with its current value
snmpTrapOid.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
.void snmpV2Trap(InetAddress address, String cs, SnmpOid trapOid, SnmpVarBindList varBindList) throws IOException, SnmpStatusException
InetAddress
destination
using the specified community string (and the ACL file is not used).
sysUpTime.0
with its current value
snmpTrapOid.0
with the value specified by trapOid
all the (oid,values)
from the specified varBindList
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.
IOException
- An I/O error occurred while sending the trap.
SnmpStatusException
- If the trap exceeds the limit defined by bufferSize
.void snmpPduTrap(InetAddress address, SnmpPduPacket pdu) throws IOException, SnmpStatusException
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
.void snmpPduTrap(SnmpPeer peer, SnmpPduPacket pdu) throws IOException, SnmpStatusException
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
.Vector snmpInformRequest(SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList) throws IllegalStateException, IOException, SnmpStatusException
sysUpTime.0
with its current value
snmpTrapOid.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.
SnmpInformRequest
objects.
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
.SnmpInformRequest snmpInformRequest(InetAddress address, String cs, SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList) throws IllegalStateException, IOException, SnmpStatusException
InetAddress
destination
using the specified community string.
sysUpTime.0
with its current value
snmpTrapOid.0
with the value specified by trapOid
all the (oid,values)
from the specified varBindList
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.
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 snmpInformRequest(SnmpPeer peer, SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList) throws IllegalStateException, IOException, SnmpStatusException
SnmpPeer
destination.
SnmpPeer
parameters (SnmpParameters.getInformCommunity()
).
sysUpTime.0
with its current value
snmpTrapOid.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
.
|
Open Source build 02 opendmk-1.0-b02 2007.10.01_19:17:46_MEST |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |