- Type Parameters:
A
-
public interface ResponseEventFactory
The
ResponseFactory
can be implemented to create ResponseEvent
s 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 anResponseEvent
instance 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 anResponseEvent
instance with an exception object indicating a message processing error. The default implementation callsinvalid reference
ResponseEvent#ResponseEvent(Object, Address, PDU, PDU, Object, Exception)
ResponseEvent
new 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 ornull
if the request timed out.userObject
- an optional user object.error
- anException
ornull
if no error occurred.
-