protected void prepare(MessageExchange exchange) throws MessagingException {
Endpoint ep = this.endpoint.get();
if (ep != null && exchange.getStatus() == ExchangeStatus.ACTIVE && exchange.getRole() == Role.CONSUMER) {
ServiceMixComponent comp = ep.getServiceUnit().getComponent();
comp.prepareConsumerExchange(exchange, ep);
}
}
public static void setEndpoint(Endpoint ep) {
endpoint.set(ep);