camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (CAMEL-5264) SNMP-Component doesn't response to INFORM-Traps
Date Fri, 18 May 2012 03:16:20 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-5264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Willem Jiang reassigned CAMEL-5264:
-----------------------------------

    Assignee: Willem Jiang
    
> SNMP-Component doesn't response to INFORM-Traps
> -----------------------------------------------
>
>                 Key: CAMEL-5264
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5264
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-snmp
>    Affects Versions: 2.9.2
>            Reporter: Gregor Kopij
>            Assignee: Willem Jiang
>            Priority: Minor
>         Attachments: snmp-inform.patch
>
>
> When using INFORMs instead of TRAPs the component must response to the Message. Otherwise
the sender tries to send the same INFROM x-times and it will be processed x-times in the SNMP-Component.
> The code below is taken from an example:
> {code:lang=java}
> 			if ((pdu.getType() != PDU.TRAP) &&
> 					(pdu.getType() != PDU.V1TRAP) &&
> 					(pdu.getType() != PDU.REPORT) &&
> 					(pdu.getType() != PDU.RESPONSE)) {
> 					pdu.setErrorIndex(0);
> 					pdu.setErrorStatus(0);
> 					pdu.setType(PDU.RESPONSE);
> 					StatusInformation statusInformation = new StatusInformation();
> 					StateReference ref = e.getStateReference();
> 					try {
> 						e.getMessageDispatcher().returnResponsePdu(e.
> 							getMessageProcessingModel(),
> 							e.getSecurityModel(),
> 							e.getSecurityName(),
> 							e.getSecurityLevel(),
> 							pdu,
> 							e.getMaxSizeResponsePDU(),
> 							ref,
> 							statusInformation);
> 						System.err.println("Response sent");
> 					}catch (MessageException ex) {
> 						System.err.println("Error while sending response: "+ex.getMessage());
> 					}
> 				}
>             processPDU(pdu);
> {code}
> In this case the component sends a response to the sender before processing the message.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message