MessageDispatcher
, TransportListener
public class SnmpCommand.SnmpCommandMessageDispatcher extends MessageDispatcherImpl
Constructor | Description |
---|---|
SnmpCommandMessageDispatcher() |
Modifier and Type | Method | Description |
---|---|---|
void |
processMessage(TransportMapping sourceTransport,
Address incomingAddress,
java.nio.ByteBuffer wholeMessage,
TransportStateReference tmStateReference) |
Process an incoming SNMP message.
|
protected void |
sendMessage(TransportMapping transport,
Address destAddress,
byte[] message,
TransportStateReference tmStateReference,
long timeoutMillis,
int maxRetries) |
Sends a message using the
TransportMapping that has been
assigned for the supplied address type. |
addAuthenticationFailureListener, addCommandResponder, addCounterListener, addMessageProcessingModel, addTransportMapping, checkOutgoingMsg, configureAuthoritativeEngineID, createPduHandle, dispatchMessage, fireAuthenticationFailure, fireIncrementCounter, fireProcessPdu, getMessageProcessingModel, getNextRequestID, getTransport, getTransportMappings, isCheckOutgoingMsg, processMessage, releaseStateReference, removeAuthenticationFailureListener, removeCommandResponder, removeCounterListener, removeMessageProcessingModel, removeTransportMapping, returnResponsePdu, sendPdu, sendPdu, sendPdu, setCheckOutgoingMsg
public void processMessage(TransportMapping sourceTransport, Address incomingAddress, java.nio.ByteBuffer wholeMessage, TransportStateReference tmStateReference)
MessageDispatcher
processMessage
in interface MessageDispatcher
processMessage
in interface TransportListener
processMessage
in class MessageDispatcherImpl
sourceTransport
- a TransportMapping
instance denoting the transport that
received the message and that will be used to send any responses to
this message. The sourceTransport
has to support the
incomingAddress
's implementation class.incomingAddress
- the Address
from which the message has been received.wholeMessage
- an ByteBuffer
containing the received SNMP message.tmStateReference
- the transport model state reference as defined by RFC 5590.protected void sendMessage(TransportMapping transport, Address destAddress, byte[] message, TransportStateReference tmStateReference, long timeoutMillis, int maxRetries) throws java.io.IOException
MessageDispatcherImpl
TransportMapping
that has been
assigned for the supplied address type.sendMessage
in class MessageDispatcherImpl
transport
- the transport mapping to be used to send the message.destAddress
- the transport address where to send the message. The
destAddress
must be compatible with the supplied
transport
.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.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.Copyright © 2018 SNMP4J.org. All rights reserved.