public class PassiveSnmpContextv2c extends SnmpContextv2c
This extends SnmpContextv2c 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.
PassiveTrapPduv2anyPduExpectingResponse, bindAddr, hostname, hostPort, isDestroyed, maxRecvSize, pduSupport, trapSupport, typeSocketDEFAULT_COMMUNITYDEFAULT_PORT, MAXPDU, MSS, STANDARD_SOCKET, TCP_SOCKET| Modifier | Constructor and Description |
|---|---|
|
PassiveSnmpContextv2c(java.lang.String host,
int port)
Constructor.
|
|
PassiveSnmpContextv2c(java.lang.String host,
int port,
java.lang.String typeSocketA)
Constructor.
|
protected |
PassiveSnmpContextv2c(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.
|
clone, encodePacket, getHashKey, getVersion, processIncomingPdu, processIncomingResponse, toStringencodePacket, getCommunity, setCommunityaddPdu, addRequestPduListener, addRequestPduListener, addRequestPduListener, addTrapListener, addTrapListener, addTrapListener, destroy, freeTransmitters, getBindAddress, getDebugString, getHost, getHostAddress, getMaxRecvSize, getPort, getReceivedFromHostAddress, getSendToHostAddress, getTypeSocket, isDestroyed, rawPduReceived, removePdu, removeRequestPduListener, removeRequestPduListener, removeRequestPduListener, removeTrapListener, removeTrapListener, removeTrapListener, run, sendPacket, setMaxRecvSize, stopequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCommunity, setCommunityaddPdu, addRequestPduListener, addRequestPduListener, addRequestPduListener, addTrapListener, addTrapListener, addTrapListener, destroy, getBindAddress, getHost, getPort, getReceivedFromHostAddress, getSendToHostAddress, getTypeSocket, isDestroyed, removePdu, removeRequestPduListener, removeRequestPduListener, removeRequestPduListener, removeTrapListener, removeTrapListener, removeTrapListener, sendPacketpublic PassiveSnmpContextv2c(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.IOExceptionSnmpContextv2c.SnmpContextv2c(String, int)public PassiveSnmpContextv2c(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.IOExceptionSnmpContextv2c.SnmpContextv2c(String, int, String),
SnmpContextBasisFace.STANDARD_SOCKET,
SnmpContextBasisFace.TCP_SOCKETprotected PassiveSnmpContextv2c(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_SOCKETprotected void activate()
activate in class AbstractSnmpContextAbstractSnmpContext.activate()