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
,
UsmBeingDiscoveredBean
authenticationProtocol, contextEngineId, contextName, privacyProtocol, useAuthentication, usePrivacy, userAuthenticationPassword, userAuthKeyMD5, userAuthKeySHA1, userName, userPrivacyPassword, userPrivKeyMD5, userPrivKeySHA1, usmAgent
anyPduExpectingResponse, bindAddr, hostname, hostPort, isDestroyed, maxRecvSize, pduSupport, trapSupport, typeSocket
AES_ENCRYPT, Default_ContextName, Default_UserName, DES_ENCRYPT, MD5_PROTOCOL, ProtocolNames, SHA1_PROTOCOL, SNMPv1_Security_Model, SNMPv2c_Security_Model, USM_Security_Model
DEFAULT_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, toString
activate, 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, stop
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addRequestPduListener, addRequestPduListener, addTrapListener, addTrapListener, addTrapListener, destroy, getBindAddress, getHost, getPort, getReceivedFromHostAddress, getSendToHostAddress, getTypeSocket, isDestroyed, removeRequestPduListener, removeRequestPduListener, removeRequestPduListener, removeTrapListener, removeTrapListener, removeTrapListener, sendPacket
public 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.IOException
AbstractSnmpContext.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.IOException
AbstractSnmpContext.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.IOException
AbstractSnmpContext.AbstractSnmpContext(String, int, String, String)
,
SnmpContextBasisFace.STANDARD_SOCKET
,
SnmpContextBasisFace.TCP_SOCKET
public Pdu processIncomingPdu(byte[] message) throws DecodingException, java.io.IOException
processIncomingPdu
in interface SnmpContextBasisFace
processIncomingPdu
in class AbstractSnmpContext
DecodingException
java.io.IOException
AbstractSnmpContext.rawPduReceived(uk.co.westhawk.snmp.event.RawPduEvent)
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface SnmpContextBasisFace
clone
in class AbstractSnmpContext
java.lang.CloneNotSupportedException
- Thrown when the constructor
generates an IOException