return conduit;
}
public static InterceptorChain getOutInterceptorChain(Exchange ex) {
Bus bus = ex.get(Bus.class);
Binding binding = ex.get(Binding.class);
PhaseManager pm = bus.getExtension(PhaseManager.class);
PhaseInterceptorChain chain = new PhaseInterceptorChain(pm.getOutPhases());
Endpoint ep = ex.get(Endpoint.class);
List<Interceptor<? extends Message>> il = ep.getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Interceptors contributed by endpoint: " + il);
}
chain.add(il);
il = ep.getService().getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Interceptors contributed by service: " + il);
}
chain.add(il);
il = bus.getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Interceptors contributed by bus: " + il);
}
chain.add(il);
if (binding != null) {
il = binding.getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Interceptors contributed by binding: " + il);
}
chain.add(il);
}