|
SNMP Stack 5_1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.co.westhawk.snmp.stack.SnmpContextPool | +--uk.co.westhawk.snmp.stack.SnmpContextv2cPool
This class contains the pool of SNMP v2c contexts. It extends the SnmpContextPool and is similar in every way, except it uses a pool of SnmpContextv2c.
Thanks to Seon Lee (slee@virtc.com) for reporting thread safety problems.
SnmpContextv2c
,
SnmpContextPool
,
SnmpContextv3Pool
Field Summary |
Fields inherited from class uk.co.westhawk.snmp.stack.SnmpContextPool |
bindAddr, community, context, contextPool, hostname, hostPort, socketType |
Fields inherited from interface uk.co.westhawk.snmp.stack.SnmpContextv2cFace |
version_id |
Fields inherited from interface uk.co.westhawk.snmp.stack.SnmpContextFace |
DEFAULT_COMMUNITY |
Fields inherited from interface uk.co.westhawk.snmp.stack.SnmpContextBasisFace |
DEFAULT_PORT, KVM_SOCKET, MAXPDU, MSS, NETSCAPE_SOCKET, STANDARD_SOCKET, TCP_SOCKET |
Constructor Summary | |
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. |
Method Summary | |
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. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface uk.co.westhawk.snmp.stack.SnmpContextFace |
getCommunity, setCommunity |
Methods inherited from interface uk.co.westhawk.snmp.stack.SnmpContextBasisFace |
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 |
Constructor Detail |
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 beSnmpContextv2c.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.SnmpContextv2c.SnmpContextv2c(String, int, String)
,
SnmpContextBasisFace.STANDARD_SOCKET
,
SnmpContextBasisFace.TCP_SOCKET
,
SnmpContextBasisFace.NETSCAPE_SOCKET
,
SnmpContextBasisFace.KVM_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.SnmpContextBasisFace.STANDARD_SOCKET
,
SnmpContextBasisFace.TCP_SOCKET
,
SnmpContextBasisFace.NETSCAPE_SOCKET
,
SnmpContextBasisFace.KVM_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.SnmpContextBasisFace.STANDARD_SOCKET
,
SnmpContextBasisFace.TCP_SOCKET
,
SnmpContextBasisFace.NETSCAPE_SOCKET
,
SnmpContextBasisFace.KVM_SOCKET
Method Detail |
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.
|
SNMP Stack 5_1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |