public class SnmpContextv3Pool extends Object implements SnmpContextv3Face
| Modifier and Type | Field and Description |
|---|---|
protected int |
authenticationProtocol |
protected String |
bindAddr |
protected SnmpContextv3 |
context |
protected byte[] |
contextEngineId |
protected String |
contextName |
protected static Hashtable |
contextPool |
protected boolean |
hasChanged |
protected String |
hostname |
protected int |
hostPort |
protected int |
privacyProtocol |
protected String |
socketType |
protected boolean |
useAuthentication |
protected boolean |
usePrivacy |
protected String |
userAuthenticationPassword |
protected String |
userName |
protected String |
userPrivacyPassword |
protected UsmAgent |
usmAgent |
AES_ENCRYPT, Default_ContextName, Default_UserName, DES_ENCRYPT, MD5_PROTOCOL, ProtocolNames, SHA1_PROTOCOL, SNMPv1_Security_Model, SNMPv2c_Security_Model, USM_Security_ModelDEFAULT_PORT, MAXPDU, MSS, STANDARD_SOCKET, TCP_SOCKET| Constructor and Description |
|---|
SnmpContextv3Pool(String host,
int port) |
SnmpContextv3Pool(String host,
int port,
String typeSocket) |
SnmpContextv3Pool(String host,
int port,
String bindAddress,
String typeSocket) |
protected static Hashtable contextPool
protected String hostname
protected String socketType
protected String bindAddr
protected int hostPort
protected SnmpContextv3 context
protected String userName
protected boolean useAuthentication
protected String userAuthenticationPassword
protected boolean usePrivacy
protected String userPrivacyPassword
protected int authenticationProtocol
protected byte[] contextEngineId
protected String contextName
protected UsmAgent usmAgent
protected boolean hasChanged
protected int privacyProtocol
public SnmpContextv3Pool(String host, int port) throws IOException
IOExceptionpublic SnmpContextv3Pool(String host, int port, String typeSocket) throws IOException
IOExceptionpublic SnmpContextv3Pool(String host, int port, String bindAddress, String typeSocket) throws IOException
IOExceptionpublic int getVersion()
getVersion in interface SnmpContextBasisFacepublic String getHost()
getHost in interface SnmpContextBasisFacepublic int getPort()
getPort in interface SnmpContextBasisFacepublic String getBindAddress()
getBindAddress in interface SnmpContextBasisFacepublic String getTypeSocket()
getTypeSocket in interface SnmpContextBasisFacepublic String getSendToHostAddress()
getSendToHostAddress in interface SnmpContextBasisFacepublic String getReceivedFromHostAddress()
getReceivedFromHostAddress in interface SnmpContextBasisFacepublic String getUserName()
getUserName in interface SnmpContextv3Facepublic void setUserName(String newUserName)
setUserName in interface SnmpContextv3Facepublic boolean isUseAuthentication()
isUseAuthentication in interface SnmpContextv3Facepublic void setUseAuthentication(boolean newUseAuthentication)
setUseAuthentication in interface SnmpContextv3Facepublic String getUserAuthenticationPassword()
getUserAuthenticationPassword in interface SnmpContextv3Facepublic void setUserAuthenticationPassword(String newUserAuthenticationPd)
setUserAuthenticationPassword in interface SnmpContextv3Facepublic void setPrivacyProtocol(int protocol)
throws IllegalArgumentException
setPrivacyProtocol in interface SnmpContextv3FaceIllegalArgumentExceptionpublic void setAuthenticationProtocol(int protocol)
throws IllegalArgumentException
setAuthenticationProtocol in interface SnmpContextv3FaceIllegalArgumentExceptionpublic int getPrivacyProtocol()
getPrivacyProtocol in interface SnmpContextv3Facepublic int getAuthenticationProtocol()
getAuthenticationProtocol in interface SnmpContextv3Facepublic boolean isUsePrivacy()
isUsePrivacy in interface SnmpContextv3Facepublic void setUsePrivacy(boolean newUsePrivacy)
setUsePrivacy in interface SnmpContextv3Facepublic String getUserPrivacyPassword()
getUserPrivacyPassword in interface SnmpContextv3Facepublic void setUserPrivacyPassword(String newUserPrivacyPd)
setUserPrivacyPassword in interface SnmpContextv3Facepublic void setContextEngineId(byte[] newContextEngineId)
throws IllegalArgumentException
setContextEngineId in interface SnmpContextv3FaceIllegalArgumentExceptionpublic byte[] getContextEngineId()
getContextEngineId in interface SnmpContextv3Facepublic void setContextName(String newContextName)
setContextName in interface SnmpContextv3Facepublic String getContextName()
getContextName in interface SnmpContextv3Facepublic void setUsmAgent(UsmAgent newAgent)
setUsmAgent in interface SnmpContextv3Facepublic UsmAgent getUsmAgent()
getUsmAgent in interface SnmpContextv3Facepublic boolean addDiscoveryPdu(DiscoveryPdu pdu) throws IOException, PduException, IllegalArgumentException
addDiscoveryPdu in interface SnmpContextv3FaceIOExceptionPduExceptionIllegalArgumentExceptionpublic boolean addPdu(Pdu pdu) throws IOException, PduException, IllegalArgumentException
addPdu in interface SnmpContextBasisFaceIOExceptionPduExceptionIllegalArgumentExceptionpublic boolean removePdu(int requestId)
removePdu in interface SnmpContextBasisFacepublic byte[] encodeDiscoveryPacket(byte msg_type,
int rId,
int errstat,
int errind,
Enumeration ve,
Object obj)
throws IOException,
EncodingException
encodeDiscoveryPacket in interface SnmpContextv3FaceIOExceptionEncodingExceptionpublic byte[] encodePacket(byte msg_type,
int rId,
int errstat,
int errind,
Enumeration ve,
Object obj)
throws IOException,
EncodingException
encodePacket in interface SnmpContextBasisFaceIOExceptionEncodingExceptionpublic void sendPacket(byte[] packet)
sendPacket in interface SnmpContextBasisFacepublic void destroy()
destroy in interface SnmpContextBasisFacepublic void destroyPool()
public boolean isDestroyed()
isDestroyed in interface SnmpContextBasisFaceprotected SnmpContextv3 getMatchingContext() throws IOException, IllegalArgumentException
IOExceptionIllegalArgumentExceptionpublic void dumpContexts(String title)
public String getHashKey()
getHashKey in interface SnmpContextBasisFacepublic void addTrapListener(TrapListener l) throws IOException
addTrapListener in interface SnmpContextBasisFaceIOExceptionpublic void removeTrapListener(TrapListener l) throws IOException
removeTrapListener in interface SnmpContextBasisFaceIOExceptionpublic void addTrapListener(TrapListener l, int port) throws IOException
addTrapListener in interface SnmpContextBasisFaceIOExceptionpublic void removeTrapListener(TrapListener l, int port) throws IOException
removeTrapListener in interface SnmpContextBasisFaceIOExceptionpublic void addTrapListener(TrapListener l, ListeningContextPool lcontext) throws IOException
addTrapListener in interface SnmpContextBasisFaceIOExceptionpublic void removeTrapListener(TrapListener l, ListeningContextPool lcontext) throws IOException
removeTrapListener in interface SnmpContextBasisFaceIOExceptionpublic void addRequestPduListener(RequestPduListener l) throws IOException
addRequestPduListener in interface SnmpContextBasisFaceIOExceptionpublic void removeRequestPduListener(RequestPduListener l) throws IOException
removeRequestPduListener in interface SnmpContextBasisFaceIOExceptionpublic void addRequestPduListener(RequestPduListener l, int port) throws IOException
addRequestPduListener in interface SnmpContextBasisFaceIOExceptionpublic void removeRequestPduListener(RequestPduListener l, int port) throws IOException
removeRequestPduListener in interface SnmpContextBasisFaceIOExceptionpublic void addRequestPduListener(RequestPduListener l, ListeningContextPool lcontext) throws IOException
addRequestPduListener in interface SnmpContextBasisFaceIOExceptionpublic void removeRequestPduListener(RequestPduListener l, ListeningContextPool lcontext) throws IOException
removeRequestPduListener in interface SnmpContextBasisFaceIOExceptionpublic Pdu processIncomingPdu(byte[] message) throws DecodingException, IOException
processIncomingPdu in interface SnmpContextBasisFaceDecodingExceptionIOExceptionpublic Object clone() throws CloneNotSupportedException
clone in interface SnmpContextBasisFaceclone in class ObjectCloneNotSupportedExceptionCopyright © 2019. All rights reserved.