use of org.talend.esb.sam.agent.eventproducer.EventProducerInterceptor in project tesb-rt-se by Talend.
the class EventFeatureImpl method setQueue.
/**
* Sets the queue.
*
* @param queue the new queue
*/
@Inject
public void setQueue(EventQueue queue) {
if (epi == null) {
MessageToEventMapper mapper = new MessageToEventMapper();
mapper.setMaxContentLength(maxContentLength);
epi = new EventProducerInterceptor(mapper, queue);
}
}
use of org.talend.esb.sam.agent.eventproducer.EventProducerInterceptor in project tesb-rt-se by Talend.
the class FlowIdProducerOut method handleINEvent.
/**
* Calling EventProducerInterceptor in case of logging faults.
*
* @param exchange
* the message exchange
* @param reqFid
* the FlowId
*
* @throws Fault
* the fault
*/
protected void handleINEvent(Exchange exchange, String reqFid) throws Fault {
Message inMsg = exchange.getInMessage();
EventProducerInterceptor epi = null;
FlowIdHelper.setFlowId(inMsg, reqFid);
ListIterator<Interceptor<? extends Message>> interceptors = inMsg.getInterceptorChain().getIterator();
while (interceptors.hasNext() && epi == null) {
Interceptor<? extends Message> interceptor = interceptors.next();
if (interceptor instanceof EventProducerInterceptor) {
epi = (EventProducerInterceptor) interceptor;
epi.handleMessage(inMsg);
}
}
}
Aggregations