public class SnmpContextv2cPool extends SnmpContextPool implements SnmpContextv2cFace
Thanks to Seon Lee (slee@virtc.com) for reporting thread safety problems.
SnmpContextv2c,
SnmpContextPool,
SnmpContextv3PoolbindAddr, community, context, contextPool, hostname, hostPort, socketTypeDEFAULT_COMMUNITYDEFAULT_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, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCommunity, setCommunityaddPdu, addRequestPduListener, addRequestPduListener, addRequestPduListener, addTrapListener, addTrapListener, addTrapListener, destroy, encodePacket, getBindAddress, getHashKey, getHost, getPort, getReceivedFromHostAddress, getSendToHostAddress, getTypeSocket, isDestroyed, processIncomingPdu, removePdu, removeRequestPduListener, removeRequestPduListener, removeRequestPduListener, removeTrapListener, removeTrapListener, removeTrapListener, sendPacketpublic 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.IOExceptionSnmpContextv2c.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.IOExceptionSnmpContextv2c.SnmpContextv2c(String, int, String),
SnmpContextBasisFace.STANDARD_SOCKET,
SnmpContextBasisFace.TCP_SOCKETpublic 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.IOExceptionSnmpContextBasisFace.STANDARD_SOCKET,
SnmpContextBasisFace.TCP_SOCKETpublic 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.IOExceptionSnmpContextBasisFace.STANDARD_SOCKET,
SnmpContextBasisFace.TCP_SOCKETpublic int getVersion()
SnmpContextBasisFacegetVersion in interface SnmpContextBasisFacegetVersion in class SnmpContextPoolSnmpConstants.SNMP_VERSION_1,
SnmpConstants.SNMP_VERSION_2c,
SnmpConstants.SNMP_VERSION_3protected SnmpContext getMatchingContext() throws java.io.IOException
getMatchingContext in class SnmpContextPooljava.io.IOExceptionSnmpContextPool.getHashKey(),
SnmpContext,
SnmpContextv2cpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface SnmpContextBasisFaceclone in class SnmpContextPooljava.lang.CloneNotSupportedException - Thrown when the constructor
generates an IOException or when in one of the Pool classes.