[SNMP4J] Handling REPORT PDU in ResponseListener.onResponse()

Frank Fock fock at agentpp.com
Fri Nov 13 01:32:49 CET 2009


Hi Gary,

I would recommend using the user object to provide
the Snmp instance for the async request callback.
That's better than to depend on the source object.
But you are right, the source object in case of a
report should be the Snmp instance, and not the
inner class. I will change that for the next
version (if that change is possible without
disrupting existing code).

Regards,
Frank


Smith, Gary wrote:
> Hi Frank
> 
>  
> 
> With regard to the "first line" in an onResponse(-) implementation,
> which cancels the originating async request:
> 
>  
> 
> ((Snmp)event.getSource()).cancel(event.getRequest(), this);
> 
>  
> 
> When I receive a REPORT PDU, getSource() yields an Snmp$ReportProcessor
> from which it is not possible to get back to the enclosing Snmp object.
> What are your thoughts on this?
> 
>  
> 
> Of course, as I have single Snmp instance, I can quite easily assume
> that is the source and call cancel via that singleton.
> 
>  
> 
>  
> 
> Regards
> 
>  
> 
> Gary
> 
>  
> 
>  
> 
>  
> 
> 
> 
> Please be advised that this email may contain confidential information.
>  If you are not the intended recipient, please do not read, copy or
> re-transmit this email.  If you have received this email in error,
> please notify us by email by replying to the sender and by telephone
> (call us collect at +1 202-828-0850) and delete this message and any
> attachments.  Thank you in advance for your cooperation and assistance.
> 
> In addition, Danaher and its subsidiaries disclaim that the content of
> this email constitutes an offer to enter into, or the acceptance of, 
> any
> contract or agreement or any amendment thereto; provided that the
> foregoing disclaimer does not invalidate the binding effect of any
> digital or other electronic reproduction of a manual signature that is
> included in any attachment to this email.
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.snmp4j.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list