public ColocOutFaultObserver(Bus bus) { super(bus); list = new TreeSet<>(bus.getExtension(PhaseManager.class).getOutPhases()); ColocUtil.setPhases(list, Phase.SETUP, Phase.USER_LOGICAL); }
public ColocOutFaultObserver(Bus bus) { super(bus); list = new TreeSet<>(bus.getExtension(PhaseManager.class).getOutPhases()); ColocUtil.setPhases(list, Phase.SETUP, Phase.USER_LOGICAL); }
@Override protected SortedSet<Phase> getPhases() { return getBus().getExtension(PhaseManager.class).getOutPhases(); }
protected SortedSet<Phase> getPhases() { return getBus().getExtension(PhaseManager.class).getOutPhases(); }
@Override protected SortedSet<Phase> getPhases() { return getBus().getExtension(PhaseManager.class).getOutPhases(); }
@Override protected SortedSet<Phase> getPhases() { return getBus().getExtension(PhaseManager.class).getOutPhases(); }
protected SortedSet<Phase> getPhases() { return getBus().getExtension(PhaseManager.class).getOutPhases(); }
@Override protected SortedSet<Phase> getPhases() { return getBus().getExtension(PhaseManager.class).getOutPhases(); }
protected SortedSet<Phase> getPhases() { return getBus().getExtension(PhaseManager.class).getOutPhases(); }
protected SortedSet<Phase> getPhases() { return getBus().getExtension(PhaseManager.class).getOutPhases(); }
/** * @param endpoint * @param cache * @return */ protected PhaseInterceptorChain buildRetransmitChain(final Endpoint endpoint, PhaseChainCache cache) { PhaseInterceptorChain retransmitChain; Bus bus = getManager().getBus(); List<Interceptor<? extends Message>> i1 = bus.getOutInterceptors(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Interceptors contributed by bus: " + i1); } List<Interceptor<? extends Message>> i2 = endpoint.getOutInterceptors(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Interceptors contributed by endpoint: " + i2); } List<Interceptor<? extends Message>> i3 = endpoint.getBinding().getOutInterceptors(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Interceptors contributed by binding: " + i3); } PhaseManager pm = bus.getExtension(PhaseManager.class); retransmitChain = cache.get(pm.getOutPhases(), i1, i2, i3); return retransmitChain; }
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); }
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); }
/** * This method will add a DemoInterceptor into every in and every out phase * of the interceptor chains. * * @param provider */ public static void addInterceptors(InterceptorProvider provider) { PhaseManager phases = BusFactory.getDefaultBus().getExtension(PhaseManager.class); for (Phase p : phases.getInPhases()) { provider.getInInterceptors().add(new DemoInterceptor(p.getName())); provider.getInFaultInterceptors().add(new DemoInterceptor(p.getName())); } for (Phase p : phases.getOutPhases()) { provider.getOutInterceptors().add(new DemoInterceptor(p.getName())); provider.getOutFaultInterceptors().add(new DemoInterceptor(p.getName())); } }
public void handleMessage(Message msg) throws Fault { Exchange ex = msg.getExchange(); if (ex.isOneWay()) { return; } Bus bus = ex.getBus(); SortedSet<Phase> phases = new TreeSet<>(bus.getExtension(PhaseManager.class).getOutPhases()); //TODO Set Coloc FaultObserver chain ColocUtil.setPhases(phases, Phase.SETUP, Phase.USER_LOGICAL); InterceptorChain chain = ColocUtil.getOutInterceptorChain(ex, phases); if (LOG.isLoggable(Level.FINER)) { LOG.finer("Processing Message at collocated endpoint. Response message: " + msg); } //Initiate OutBound Processing BindingOperationInfo boi = ex.getBindingOperationInfo(); Message outBound = ex.getOutMessage(); if (boi != null) { outBound.put(MessageInfo.class, boi.getOperationInfo().getOutput()); } outBound.put(Message.INBOUND_MESSAGE, Boolean.FALSE); outBound.setInterceptorChain(chain); chain.doIntercept(outBound); } }
public void handleMessage(Message msg) throws Fault { Exchange ex = msg.getExchange(); if (ex.isOneWay()) { return; } Bus bus = ex.getBus(); SortedSet<Phase> phases = new TreeSet<>(bus.getExtension(PhaseManager.class).getOutPhases()); //TODO Set Coloc FaultObserver chain ColocUtil.setPhases(phases, Phase.SETUP, Phase.USER_LOGICAL); InterceptorChain chain = ColocUtil.getOutInterceptorChain(ex, phases); if (LOG.isLoggable(Level.FINER)) { LOG.finer("Processing Message at collocated endpoint. Response message: " + msg); } //Initiate OutBound Processing BindingOperationInfo boi = ex.getBindingOperationInfo(); Message outBound = ex.getOutMessage(); if (boi != null) { outBound.put(MessageInfo.class, boi.getOperationInfo().getOutput()); } outBound.put(Message.INBOUND_MESSAGE, Boolean.FALSE); outBound.setInterceptorChain(chain); chain.doIntercept(outBound); } }
protected InterceptorChain setupInterceptorChain(Exchange exchange) { if (outgoingInterceptorChain != null) { return outgoingInterceptorChain; } Endpoint endpoint = getEndpoint(exchange); PhaseManager pm = bus.getExtension(PhaseManager.class); @SuppressWarnings("unchecked") List<Interceptor<? extends org.apache.cxf.message.Message>> i1 = bus.getOutInterceptors(); @SuppressWarnings("unchecked") List<Interceptor<? extends org.apache.cxf.message.Message>> i2 = endpoint.getOutInterceptors(); @SuppressWarnings("unchecked") List<Interceptor<? extends org.apache.cxf.message.Message>> i3 = getOutInterceptors(); @SuppressWarnings("unchecked") List<Interceptor<? extends org.apache.cxf.message.Message>> i4 = endpoint.getBinding().getOutInterceptors(); PhaseInterceptorChain phaseInterceptorChain = outboundChainCache.get(pm .getOutPhases(), i1, i2, i3, i4); return phaseInterceptorChain; }
protected static PhaseInterceptorChain setupOutInterceptorChain(ClientConfiguration cfg) { PhaseManager pm = cfg.getBus().getExtension(PhaseManager.class); List<Interceptor<? extends Message>> i1 = cfg.getBus().getOutInterceptors(); List<Interceptor<? extends Message>> i2 = cfg.getOutInterceptors(); List<Interceptor<? extends Message>> i3 = cfg.getConduitSelector().getEndpoint().getOutInterceptors(); PhaseInterceptorChain chain = new PhaseChainCache().get(pm.getOutPhases(), i1, i2, i3); chain.add(new ClientRequestFilterInterceptor()); return chain; }
protected static PhaseInterceptorChain setupOutInterceptorChain(ClientConfiguration cfg) { PhaseManager pm = cfg.getBus().getExtension(PhaseManager.class); List<Interceptor<? extends Message>> i1 = cfg.getBus().getOutInterceptors(); List<Interceptor<? extends Message>> i2 = cfg.getOutInterceptors(); List<Interceptor<? extends Message>> i3 = cfg.getConduitSelector().getEndpoint().getOutInterceptors(); PhaseInterceptorChain chain = new PhaseChainCache().get(pm.getOutPhases(), i1, i2, i3); chain.add(new ClientRequestFilterInterceptor()); return chain; }
protected static PhaseInterceptorChain setupOutInterceptorChain(ClientConfiguration cfg) { PhaseManager pm = cfg.getBus().getExtension(PhaseManager.class); List<Interceptor<? extends Message>> i1 = cfg.getBus().getOutInterceptors(); List<Interceptor<? extends Message>> i2 = cfg.getOutInterceptors(); List<Interceptor<? extends Message>> i3 = cfg.getConduitSelector().getEndpoint().getOutInterceptors(); PhaseInterceptorChain chain = new PhaseChainCache().get(pm.getOutPhases(), i1, i2, i3); chain.add(new ClientRequestFilterInterceptor()); return chain; }