- java.lang.Object
-
- org.snmp4j.MessageDispatcherImpl
-
- org.snmp4j.tools.console.SnmpCommand.SnmpCommandMessageDispatcher
-
- All Implemented Interfaces:
MessageDispatcher,TransportListener
- Enclosing class:
- SnmpCommand
public class SnmpCommand.SnmpCommandMessageDispatcher extends MessageDispatcherImpl
-
-
Constructor Summary
Constructors Constructor Description SnmpCommandMessageDispatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <A extends Address>
voidprocessMessage(TransportMapping<? super A> sourceTransport, A incomingAddress, java.nio.ByteBuffer wholeMessage, TransportStateReference tmStateReference)Process an incoming SNMP message.protected <A extends Address>
voidsendMessage(TransportMapping<? super A> transport, A destAddress, byte[] message, TransportStateReference tmStateReference, long timeoutMillis, int maxRetries)Sends a message using theTransportMappingthat has been assigned for the supplied address type.-
Methods inherited from class org.snmp4j.MessageDispatcherImpl
addAuthenticationFailureListener, addCommandResponder, addCounterListener, addMessageProcessingModel, addTransportMapping, checkOutgoingMsg, configureAuthoritativeEngineID, createPduHandle, dispatchMessage, fireAuthenticationFailure, fireIncrementCounter, fireProcessPdu, getMessageProcessingModel, getNextRequestID, getTransport, getTransport, getTransportMappings, isCheckOutgoingMsg, processMessage, releaseStateReference, removeAuthenticationFailureListener, removeCommandResponder, removeCounterListener, removeMessageProcessingModel, removeTransportMapping, returnResponsePdu, sendPdu, sendPdu, sendPdu, setCheckOutgoingMsg
-
-
-
-
Method Detail
-
processMessage
public <A extends Address> void processMessage(TransportMapping<? super A> sourceTransport, A incomingAddress, java.nio.ByteBuffer wholeMessage, TransportStateReference tmStateReference)
Description copied from interface:MessageDispatcherProcess an incoming SNMP message. The message is processed and dispatched according to the message's content, the message processing models, and the command responder available to the dispatcher.- Specified by:
processMessagein interfaceMessageDispatcher- Specified by:
processMessagein interfaceTransportListener- Overrides:
processMessagein classMessageDispatcherImpl- Type Parameters:
A- theAddresstype.- Parameters:
sourceTransport- aTransportMappinginstance denoting the transport that received the message and that will be used to send any responses to this message. ThesourceTransporthas to support theincomingAddress's implementation class.incomingAddress- theAddressfrom which the message has been received.wholeMessage- anByteBuffercontaining the received SNMP message.tmStateReference- the transport model state reference as defined by RFC 5590.
-
sendMessage
protected <A extends Address> void sendMessage(TransportMapping<? super A> transport, A destAddress, byte[] message, TransportStateReference tmStateReference, long timeoutMillis, int maxRetries) throws java.io.IOException
Description copied from class:MessageDispatcherImplSends a message using theTransportMappingthat has been assigned for the supplied address type.- Overrides:
sendMessagein classMessageDispatcherImpl- Type Parameters:
A- anAddressclass that is the super class for the addresses supported by this transport mapping.- Parameters:
transport- the transport mapping to be used to send the message.destAddress- the transport address where to send the message. ThedestAddressmust be compatible with the suppliedtransport.message- the SNMP message to send.tmStateReference- the transport state reference that holds transport state information for this message.timeoutMillis- maximum number of milli seconds the connection creation might take (if connection based).maxRetries- maximum retries during connection creation.- Throws:
java.io.IOException- if an I/O error occurred while sending the message or if there is no transport mapping defined for the supplied address type.
-
-