public class SnmpContextv3Discovery extends SnmpContextv3Basis
Now that the stack can send traps and receive requests, it needs to be able to act as an authoritative SNMP engine. This is done via the interface UsmAgent. The DefaultUsmAgent is not guaranteed to work; agents (or rather authoritative engines) should provide a better implementation.
DefaultUsmAgent,
UsmBeingDiscoveredBeanauthenticationProtocol, contextEngineId, contextName, privacyProtocol, useAuthentication, usePrivacy, userAuthenticationPassword, userAuthKeyMD5, userAuthKeySHA1, userName, userPrivacyPassword, userPrivKeyMD5, userPrivKeySHA1, usmAgentanyPduExpectingResponse, bindAddr, hostname, hostPort, isDestroyed, maxRecvSize, pduSupport, trapSupport, typeSocketAES_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 |
|---|
SnmpContextv3Discovery(java.lang.String host,
int port)
Constructor.
|
SnmpContextv3Discovery(java.lang.String host,
int port,
java.lang.String typeSocketA)
Constructor.
|
SnmpContextv3Discovery(java.lang.String host,
int port,
java.lang.String bindAddress,
java.lang.String typeSocketA)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Returns a clone of this SnmpContextv3.
|
Pdu |
processIncomingPdu(byte[] message)
Processes an incoming Discovery (and only Discovery) PDU.
|
actualEncodePacket, addDiscoveryPdu, addPdu, addPdu, addRequestPduListener, checkContextSanity, cloneParameters, createUsmAgent, encodeDiscoveryPacket, encodePacket, getAuthenticationProtocol, getContextEngineId, getContextName, getHashKey, getPrivacyProtocol, getUserAuthenticationPassword, getUserName, getUserPrivacyPassword, getUsmAgent, getVersion, isAuthoritative, isUseAuthentication, isUsePrivacy, processIncomingResponse, removePdu, setAuthenticationProtocol, setContextEngineId, setContextName, setPrivacyProtocol, setUseAuthentication, setUsePrivacy, setUserAuthenticationPassword, setUserName, setUserPrivacyPassword, setUsmAgent, toStringactivate, addRequestPduListener, addRequestPduListener, addTrapListener, addTrapListener, addTrapListener, destroy, freeTransmitters, getBindAddress, getDebugString, getHost, getHostAddress, getMaxRecvSize, getPort, getReceivedFromHostAddress, getSendToHostAddress, getTypeSocket, isDestroyed, rawPduReceived, removeRequestPduListener, removeRequestPduListener, removeRequestPduListener, removeTrapListener, removeTrapListener, removeTrapListener, run, sendPacket, setMaxRecvSize, stopequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddRequestPduListener, addRequestPduListener, addTrapListener, addTrapListener, addTrapListener, destroy, getBindAddress, getHost, getPort, getReceivedFromHostAddress, getSendToHostAddress, getTypeSocket, isDestroyed, removeRequestPduListener, removeRequestPduListener, removeRequestPduListener, removeTrapListener, removeTrapListener, removeTrapListener, sendPacketpublic SnmpContextv3Discovery(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.IOExceptionAbstractSnmpContext.AbstractSnmpContext(String, int)public SnmpContextv3Discovery(java.lang.String host,
int port,
java.lang.String typeSocketA)
throws java.io.IOException
host - The host to which the Pdu will be sentport - The port where the SNMP server will betypeSocketA - The local address the server will bind tojava.io.IOExceptionAbstractSnmpContext.AbstractSnmpContext(String, int, String)public SnmpContextv3Discovery(java.lang.String host,
int port,
java.lang.String bindAddress,
java.lang.String typeSocketA)
throws java.io.IOException
host - The host to which the PDU will be sentport - The port where the SNMP server will bebindAddress - The local address the server will bind totypeSocketA - The type of socket to use.java.io.IOExceptionAbstractSnmpContext.AbstractSnmpContext(String, int, String, String),
SnmpContextBasisFace.STANDARD_SOCKET,
SnmpContextBasisFace.TCP_SOCKETpublic Pdu processIncomingPdu(byte[] message) throws DecodingException, java.io.IOException
processIncomingPdu in interface SnmpContextBasisFaceprocessIncomingPdu in class AbstractSnmpContextDecodingExceptionjava.io.IOExceptionAbstractSnmpContext.rawPduReceived(uk.co.westhawk.snmp.event.RawPduEvent)public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface SnmpContextBasisFaceclone in class AbstractSnmpContextjava.lang.CloneNotSupportedException - Thrown when the constructor
generates an IOException