public interface ResponseEventFactory
The
ResponseFactory can be implemented to create ResponseEvents on behalf of an Snmp
instance. Although there is a default implementation, a custom one could add some special logging or response
time monitoring.- Since:
- 3.7.5
-
Method Summary
Modifier and TypeMethodDescriptiondefault <A extends Address>
ResponseEvent<A> createResponseEvent(Object source, A peerAddress, PDU request, PDU response, Object userObject, long durationNanos, Exception error) Creates anResponseEventinstance with an exception object indicating a message processing error.
-
Method Details
-
createResponseEvent
default <A extends Address> ResponseEvent<A> createResponseEvent(Object source, A peerAddress, PDU request, PDU response, Object userObject, long durationNanos, Exception error) Creates anResponseEventinstance with an exception object indicating a message processing error. The default implementation callsResponseEvent(Object, Address, PDU, PDU, Object, Exception, long)to create aResponseEventnew instance with the provided parameters.- Parameters:
source- the event source.peerAddress- the transport address of the entity that send the response.request- the request PDU (must not benull).response- the response PDU ornullif the request timed out.userObject- an optional user object.error- anExceptionornullif no error occurred.
-