use of org.apache.cxf.phase.PhaseManager in project cxf by apache.
the class OutgoingChainInterceptor method getOutInterceptorChain.
public static InterceptorChain getOutInterceptorChain(Exchange ex) {
Bus bus = ex.getBus();
Binding binding = ex.getBinding();
PhaseManager pm = bus.getExtension(PhaseManager.class);
PhaseInterceptorChain chain = new PhaseInterceptorChain(pm.getOutPhases());
Endpoint ep = ex.getEndpoint();
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);
}
modifyChain(chain, ex);
chain.setFaultObserver(ep.getOutFaultObserver());
return chain;
}
use of org.apache.cxf.phase.PhaseManager in project cxf by apache.
the class ClientImpl method setupInterceptorChain.
protected PhaseInterceptorChain setupInterceptorChain(Endpoint endpoint) {
PhaseManager pm = bus.getExtension(PhaseManager.class);
List<Interceptor<? extends Message>> i1 = bus.getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Interceptors contributed by bus: " + i1);
}
List<Interceptor<? extends Message>> i2 = getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Interceptors contributed by client: " + i2);
}
List<Interceptor<? extends Message>> i3 = endpoint.getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Interceptors contributed by endpoint: " + i3);
}
List<Interceptor<? extends Message>> i4 = endpoint.getBinding().getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Interceptors contributed by binding: " + i4);
}
List<Interceptor<? extends Message>> i5 = null;
if (endpoint.getService().getDataBinding() instanceof InterceptorProvider) {
i5 = ((InterceptorProvider) endpoint.getService().getDataBinding()).getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Interceptors contributed by databinding: " + i5);
}
}
if (i5 != null) {
return outboundChainCache.get(pm.getOutPhases(), i1, i2, i3, i4, i5);
}
return outboundChainCache.get(pm.getOutPhases(), i1, i2, i3, i4);
}
Aggregations