Package uk.co.westhawk.snmp.stack
Class PassiveSnmpContext
java.lang.Object
uk.co.westhawk.snmp.stack.AbstractSnmpContext
uk.co.westhawk.snmp.stack.SnmpContext
uk.co.westhawk.snmp.stack.PassiveSnmpContext
- All Implemented Interfaces:
Cloneable
,Runnable
,EventListener
,RawPduListener
,SnmpContextBasisFace
,SnmpContextFace
This class contains the SNMP v1 context that is needed by a Pdu to
send a SNMP v1 request in environments where thread creation is
unwanted.
This extends SnmpContext so that it does not create any threads to send PDUs. It must be used with the PDU class PassiveTrapPduv1. 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:
- Birgit Arkesteijn
- 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
ConstructorsConstructorDescriptionPassiveSnmpContext
(String host, int port) Constructor.PassiveSnmpContext
(String host, int port, String typeSocketA) Constructor. -
Method Summary
Methods inherited from class uk.co.westhawk.snmp.stack.SnmpContext
clone, encodePacket, encodePacket, getCommunity, getHashKey, getVersion, processIncomingPdu, setCommunity, toString
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
-
Constructor Details
-
PassiveSnmpContext
Constructor.- Parameters:
host
- The host to which the Pdu will be sentport
- The port where the SNMP server will be- Throws:
IOException
- See Also:
-
PassiveSnmpContext
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:
-