public class SnmpContextv2cPool extends SnmpContextPool implements SnmpContextv2cFace
Thanks to Seon Lee (slee@virtc.com) for reporting thread safety problems.
SnmpContextv2c
,
SnmpContextPool
,
SnmpContextv3Pool
bindAddr, community, context, contextPool, hostname, hostPort, socketType
DEFAULT_COMMUNITY
DEFAULT_PORT, MAXPDU, MSS, STANDARD_SOCKET, TCP_SOCKET
Constructor and Description |
---|
SnmpContextv2cPool(java.lang.String host,
int port)
Constructor.
|
SnmpContextv2cPool(java.lang.String host,
int port,
java.lang.String typeSocket)
Constructor.
|
SnmpContextv2cPool(java.lang.String host,
int port,
java.lang.String comm,
java.lang.String typeSocket)
Constructor.
|
SnmpContextv2cPool(java.lang.String host,
int port,
java.lang.String comm,
java.lang.String bindAddress,
java.lang.String typeSocket)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
This method is not supported.
|
protected SnmpContext |
getMatchingContext()
Returns a v2c context from the pool.
|
int |
getVersion()
Returns the SNMP version of the context.
|
addPdu, addRequestPduListener, addRequestPduListener, addRequestPduListener, addTrapListener, addTrapListener, addTrapListener, destroy, destroyPool, dumpContexts, encodePacket, getBindAddress, getCommunity, getHashKey, getHost, getPort, getReceivedFromHostAddress, getSendToHostAddress, getTypeSocket, isDestroyed, processIncomingPdu, removePdu, removeRequestPduListener, removeRequestPduListener, removeRequestPduListener, removeTrapListener, removeTrapListener, removeTrapListener, sendPacket, setCommunity, toString
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCommunity, setCommunity
addPdu, addRequestPduListener, addRequestPduListener, addRequestPduListener, addTrapListener, addTrapListener, addTrapListener, destroy, encodePacket, getBindAddress, getHashKey, getHost, getPort, getReceivedFromHostAddress, getSendToHostAddress, getTypeSocket, isDestroyed, processIncomingPdu, removePdu, removeRequestPduListener, removeRequestPduListener, removeRequestPduListener, removeTrapListener, removeTrapListener, removeTrapListener, sendPacket
public SnmpContextv2cPool(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
SnmpContextv2c.SnmpContextv2c(String, int)
public SnmpContextv2cPool(java.lang.String host, int port, java.lang.String typeSocket) throws java.io.IOException
host
- The host to which the PDU will be sentport
- The port where the SNMP server will betypeSocket
- The type of socket to use.java.io.IOException
SnmpContextv2c.SnmpContextv2c(String, int, String)
,
SnmpContextBasisFace.STANDARD_SOCKET
,
SnmpContextBasisFace.TCP_SOCKET
public SnmpContextv2cPool(java.lang.String host, int port, java.lang.String comm, java.lang.String typeSocket) throws java.io.IOException
host
- The host to which the PDU will be sentport
- The port where the SNMP server will becomm
- The community name.typeSocket
- The type of socket to use.java.io.IOException
SnmpContextBasisFace.STANDARD_SOCKET
,
SnmpContextBasisFace.TCP_SOCKET
public SnmpContextv2cPool(java.lang.String host, int port, java.lang.String comm, java.lang.String bindAddress, java.lang.String typeSocket) throws java.io.IOException
host
- The host to which the PDU will be sentport
- The port where the SNMP server will becomm
- The community name.bindAddress
- The local address the server will bind totypeSocket
- The type of socket to use.java.io.IOException
SnmpContextBasisFace.STANDARD_SOCKET
,
SnmpContextBasisFace.TCP_SOCKET
public int getVersion()
SnmpContextBasisFace
getVersion
in interface SnmpContextBasisFace
getVersion
in class SnmpContextPool
SnmpConstants.SNMP_VERSION_1
,
SnmpConstants.SNMP_VERSION_2c
,
SnmpConstants.SNMP_VERSION_3
protected SnmpContext getMatchingContext() throws java.io.IOException
getMatchingContext
in class SnmpContextPool
java.io.IOException
SnmpContextPool.getHashKey()
,
SnmpContext
,
SnmpContextv2c
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface SnmpContextBasisFace
clone
in class SnmpContextPool
java.lang.CloneNotSupportedException
- Thrown when the constructor
generates an IOException or when in one of the Pool classes.