Package uk.co.westhawk.snmp.stack
Class PassiveSnmpContextv2c
java.lang.Object
uk.co.westhawk.snmp.stack.AbstractSnmpContext
uk.co.westhawk.snmp.stack.SnmpContext
uk.co.westhawk.snmp.stack.SnmpContextv2c
uk.co.westhawk.snmp.stack.PassiveSnmpContextv2c
- All Implemented Interfaces:
Cloneable
,Runnable
,EventListener
,RawPduListener
,SnmpContextBasisFace
,SnmpContextFace
,SnmpContextv2cFace
This class contains the SNMP v2c context that is needed by every Pdu to
send a SNMP v2c request in environments where thread creation is
unwanted.
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.
- Since:
- 4_12
- Version:
- $Revision: 3.10 $ $Date: 2009/03/05 13:12:50 $
- Author:
- Mike Waters, ERG Group
- See Also:
-
Field Summary
Fields inherited from interface uk.co.westhawk.snmp.stack.SnmpContextBasisFace
DEFAULT_PORT, MAXPDU, MSS, STANDARD_SOCKET, TCP_SOCKET
Fields inherited from interface uk.co.westhawk.snmp.stack.SnmpContextFace
DEFAULT_COMMUNITY
-
Constructor Summary
ConstructorsConstructorDescriptionPassiveSnmpContextv2c
(String host, int port) Constructor.PassiveSnmpContextv2c
(String host, int port, String typeSocketA) Constructor. -
Method Summary
Methods inherited from class uk.co.westhawk.snmp.stack.SnmpContextv2c
clone, encodePacket, getHashKey, getVersion, processIncomingPdu, toString
Methods inherited from class uk.co.westhawk.snmp.stack.SnmpContext
encodePacket, getCommunity, setCommunity
Methods inherited from class uk.co.westhawk.snmp.stack.AbstractSnmpContext
addPdu, addRequestPduListener, addRequestPduListener, addRequestPduListener, addTrapListener, addTrapListener, addTrapListener, destroy, getBindAddress, getDebugString, getHost, getHostAddress, getMaxRecvSize, getPort, getReceivedFromHostAddress, getSendToHostAddress, getTypeSocket, isDestroyed, rawPduReceived, removePdu, removeRequestPduListener, removeRequestPduListener, removeRequestPduListener, removeTrapListener, removeTrapListener, removeTrapListener, run, sendPacket, setMaxRecvSize, stop
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface uk.co.westhawk.snmp.stack.SnmpContextBasisFace
addPdu, addRequestPduListener, addRequestPduListener, addRequestPduListener, addTrapListener, addTrapListener, addTrapListener, destroy, getBindAddress, getHost, getPort, getReceivedFromHostAddress, getSendToHostAddress, getTypeSocket, isDestroyed, removePdu, removeRequestPduListener, removeRequestPduListener, removeRequestPduListener, removeTrapListener, removeTrapListener, removeTrapListener, sendPacket
Methods inherited from interface uk.co.westhawk.snmp.stack.SnmpContextFace
getCommunity, setCommunity
-
Constructor Details
-
PassiveSnmpContextv2c
Constructor.- Parameters:
host
- The host to which the Pdu will be sentport
- The port where the SNMP server will be- Throws:
IOException
- See Also:
-
PassiveSnmpContextv2c
Constructor. Parameter typeSocketA should be either STANDARD_SOCKET, TCP_SOCKET or a fully qualified classname.- Parameters:
host
- The host to which the Pdu will be sentport
- The port where the SNMP server will betypeSocketA
- The type of socket to use.- Throws:
IOException
- See Also:
-