public class PassiveSnmpContextv3 extends SnmpContextv3
This extends SnmpContextv3 so that it does not create any threads to send PDUs. It must be used with the PDU class PassiveTrapPduv2. The original purpose of the Passive classes is to allow the stack to be used in environments where thread creation is unwanted, eg database JVMs such as Oracle JServer. See SNMPv2-PDU.
See notes on how to send traps in an Oracle JServer environment.
PassiveTrapPduv2
authenticationProtocol, contextEngineId, contextName, privacyProtocol, useAuthentication, usePrivacy, userAuthenticationPassword, userAuthKeyMD5, userAuthKeySHA1, userName, userPrivacyPassword, userPrivKeyMD5, userPrivKeySHA1, usmAgent
anyPduExpectingResponse, bindAddr, hostname, hostPort, isDestroyed, maxRecvSize, pduSupport, trapSupport, typeSocket
AES_ENCRYPT, Default_ContextName, Default_UserName, DES_ENCRYPT, MD5_PROTOCOL, ProtocolNames, SHA1_PROTOCOL, SNMPv1_Security_Model, SNMPv2c_Security_Model, USM_Security_Model
DEFAULT_PORT, MAXPDU, MSS, STANDARD_SOCKET, TCP_SOCKET
Modifier | Constructor and Description |
---|---|
|
PassiveSnmpContextv3(java.lang.String host,
int port)
Constructor.
|
|
PassiveSnmpContextv3(java.lang.String host,
int port,
java.lang.String typeSocketA)
Constructor.
|
protected |
PassiveSnmpContextv3(java.lang.String host,
int port,
java.lang.String bindAddress,
java.lang.String typeSocketA)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
activate()
Overrides the AbstractSnmpContext.activate() to do nothing.
|
addRequestPduListener, clone, processIncomingPdu, processPotentialRequest, processPotentialTrap, removeRequestPduListener
actualEncodePacket, addDiscoveryPdu, addPdu, addPdu, checkContextSanity, cloneParameters, createUsmAgent, encodeDiscoveryPacket, encodePacket, getAuthenticationProtocol, getContextEngineId, getContextName, getHashKey, getPrivacyProtocol, getUserAuthenticationPassword, getUserName, getUserPrivacyPassword, getUsmAgent, getVersion, isAuthoritative, isUseAuthentication, isUsePrivacy, processIncomingResponse, removePdu, setAuthenticationProtocol, setContextEngineId, setContextName, setPrivacyProtocol, setUseAuthentication, setUsePrivacy, setUserAuthenticationPassword, setUserName, setUserPrivacyPassword, setUsmAgent, toString
addRequestPduListener, addRequestPduListener, addTrapListener, addTrapListener, addTrapListener, destroy, freeTransmitters, getBindAddress, getDebugString, getHost, getHostAddress, getMaxRecvSize, getPort, getReceivedFromHostAddress, getSendToHostAddress, getTypeSocket, isDestroyed, rawPduReceived, removeRequestPduListener, removeRequestPduListener, removeTrapListener, removeTrapListener, removeTrapListener, run, sendPacket, setMaxRecvSize, stop
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addRequestPduListener, addRequestPduListener, addTrapListener, addTrapListener, addTrapListener, destroy, getBindAddress, getHost, getPort, getReceivedFromHostAddress, getSendToHostAddress, getTypeSocket, isDestroyed, removeRequestPduListener, removeRequestPduListener, removeTrapListener, removeTrapListener, removeTrapListener, sendPacket
public PassiveSnmpContextv3(java.lang.String host, int port) throws java.io.IOException
host
- The host to which the Pdu will be sentport
- The port where the SNMP server will bejava.io.IOException
SnmpContextv3.SnmpContextv3(String, int)
public PassiveSnmpContextv3(java.lang.String host, int port, java.lang.String typeSocketA) throws java.io.IOException
host
- The host to which the Pdu will be sentport
- The port where the SNMP server will betypeSocketA
- The type of socket to use.java.io.IOException
SnmpContextv3.SnmpContextv3(String, int, String)
,
SnmpContextBasisFace.STANDARD_SOCKET
,
SnmpContextBasisFace.TCP_SOCKET
protected PassiveSnmpContextv3(java.lang.String host, int port, java.lang.String bindAddress, java.lang.String typeSocketA) throws java.io.IOException
host
- The host to which the Pdu will be sentport
- The port where the SNMP server will bebindAddress
- The local address the server will bind totypeSocketA
- The type of socket to use.java.io.IOException
- Thrown when the socket cannot be
created.SnmpContextBasisFace.STANDARD_SOCKET
,
SnmpContextBasisFace.TCP_SOCKET
protected void activate()
activate
in class AbstractSnmpContext
AbstractSnmpContext.activate()