@Override protected void initializeProvider(InterceptorProvider provider, Bus bus) { provider.getInInterceptors().add(in); provider.getInFaultInterceptors().add(in); provider.getOutInterceptors().add(out); provider.getOutFaultInterceptors().add(out); } }
@Override protected void initializeProvider(InterceptorProvider provider, Bus bus) { if (contraints == null) { return; } provider.getInInterceptors().add(CertConstraintsInterceptor.INSTANCE); provider.getInFaultInterceptors().add(CertConstraintsInterceptor.INSTANCE); }
@Override protected void initializeProvider(InterceptorProvider provider, Bus bus) { provider.getInInterceptors().add(in); provider.getOutInterceptors().add(out); } }
throw new IllegalStateException("Message received on a Client that has been closed or destroyed."); Endpoint endpoint = message.getExchange().getEndpoint(); if (endpoint == null) { message.getExchange().put(Endpoint.class, endpoint); message = endpoint.getBinding().createMessage(message); message.getExchange().setInMessage(message); PhaseManager pm = bus.getExtension(PhaseManager.class); List<Interceptor<? extends Message>> i1 = bus.getInInterceptors(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Interceptors contributed by bus: " + i1); LOG.fine("Interceptors contributed by client: " + i2); if (endpoint.getService().getDataBinding() instanceof InterceptorProvider) { InterceptorProvider p = (InterceptorProvider)endpoint.getService().getDataBinding(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Interceptors contributed by databinging: " + p.getInInterceptors()); p.getInInterceptors()); } else { chain = inboundChainCache.get(pm.getInPhases(), i1, i2, i3, i4); chain.setFaultObserver(outFaultObserver);
if (m.getInterceptorChain() != null) { phaseChain = m.getInterceptorChain(); Exchange exchange = message.getExchange(); if (exchange == null) { exchange = new ExchangeImpl(); m.setExchange(exchange); exchange.setInMessage(message); setExchangeProperties(exchange, message); if (endpoint.getService().getDataBinding() instanceof InterceptorProvider) { dbp = (InterceptorProvider)endpoint.getService().getDataBinding(); phaseChain = chainCache.get(bus.getExtension(PhaseManager.class).getInPhases(), bus.getInInterceptors(), endpoint.getService().getInInterceptors(), endpoint.getInInterceptors(), getBinding().getInInterceptors()); } else { bus.getInInterceptors(), endpoint.getService().getInInterceptors(), endpoint.getInInterceptors(), getBinding().getInInterceptors(), dbp.getInInterceptors());
protected void initializeInterceptors(Exchange ex, PhaseInterceptorChain chain) { Endpoint e = ex.getEndpoint(); Client c = ex.get(Client.class); chain.add(getBus().getOutFaultInterceptors()); if (c != null) { chain.add(c.getOutFaultInterceptors()); } chain.add(e.getService().getOutFaultInterceptors()); chain.add(e.getOutFaultInterceptors()); chain.add(e.getBinding().getOutFaultInterceptors()); if (e.getService().getDataBinding() instanceof InterceptorProvider) { chain.add(((InterceptorProvider)e.getService().getDataBinding()).getOutFaultInterceptors()); } addToChain(chain, ex.getInMessage()); addToChain(chain, ex.getOutFaultMessage()); } private void addToChain(PhaseInterceptorChain chain, Message m) {
private static InterceptorChain getRedeliveryInterceptorChain(Message m, String phase) { Exchange exchange = m.getExchange(); Endpoint ep = exchange.getEndpoint(); Bus bus = exchange.getBus(); PhaseManager pm = bus.getExtension(PhaseManager.class); SortedSet<Phase> phases = new TreeSet<>(pm.getInPhases()); for (Iterator<Phase> it = phases.iterator(); it.hasNext();) { Phase p = it.next(); if (phase.equals(p.getName())) { break; } it.remove(); } PhaseInterceptorChain chain = new PhaseInterceptorChain(phases); List<Interceptor<? extends Message>> il = ep.getInInterceptors(); addInterceptors(chain, il); il = ep.getService().getInInterceptors(); addInterceptors(chain, il); il = ep.getBinding().getInInterceptors(); addInterceptors(chain, il); il = bus.getInInterceptors(); addInterceptors(chain, il); if (ep.getService().getDataBinding() instanceof InterceptorProvider) { il = ((InterceptorProvider)ep.getService().getDataBinding()).getInInterceptors(); addInterceptors(chain, il); } return chain; }
protected void initializeInterceptors(Exchange ex, PhaseInterceptorChain chain) { Endpoint e = ex.getEndpoint(); Client c = ex.get(Client.class); InterceptorProvider ip = ex.get(InterceptorProvider.class); chain.add(getBus().getInFaultInterceptors()); if (c != null) { chain.add(c.getInFaultInterceptors()); } else if (ip != null) { chain.add(ip.getInFaultInterceptors()); } chain.add(e.getService().getInFaultInterceptors()); chain.add(e.getInFaultInterceptors()); chain.add(e.getBinding().getInFaultInterceptors()); if (e.getService().getDataBinding() instanceof InterceptorProvider) { chain.add(((InterceptorProvider)e.getService().getDataBinding()).getInFaultInterceptors()); } addToChain(chain, ex.getInFaultMessage()); addToChain(chain, ex.getOutMessage()); } private void addToChain(PhaseInterceptorChain chain, Message m) {
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); }
private static PhaseInterceptorChain getChain(Exchange ex, PhaseChainCache chainCache) { Bus bus = ex.get(Bus.class); Binding binding = ex.get(Binding.class); Endpoint ep = ex.get(Endpoint.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 = ep.getService().getOutInterceptors(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Interceptors contributed by service: " + i2); List<Interceptor<? extends Message>> i3 = ep.getOutInterceptors(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Interceptors contributed by endpoint: " + i3); if (ep.getService().getDataBinding() instanceof InterceptorProvider) { i5 = ((InterceptorProvider)ep.getService().getDataBinding()).getOutInterceptors(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Interceptors contributed by databinding: " + i5); chain.setFaultObserver(ep.getOutFaultObserver()); return chain;
private static PhaseInterceptorChain getChain(Exchange ex, PhaseChainCache chainCache) { Bus bus = ex.getBus(); Binding binding = ex.getBinding(); Endpoint ep = ex.getEndpoint(); List<Interceptor<? extends Message>> i1 = bus.getOutInterceptors(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Interceptors contributed by bus: " + i1); List<Interceptor<? extends Message>> i2 = ep.getService().getOutInterceptors(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Interceptors contributed by service: " + i2); List<Interceptor<? extends Message>> i3 = ep.getOutInterceptors(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Interceptors contributed by endpoint: " + i3); if (ep.getService().getDataBinding() instanceof InterceptorProvider) { i5 = ((InterceptorProvider)ep.getService().getDataBinding()).getOutInterceptors(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Interceptors contributed by databinding: " + i5); chain.setFaultObserver(ep.getOutFaultObserver()); return chain;
protected void modifyChain(InterceptorChain chain, Message ctx, boolean in) { if (ctx == null) { return; } Collection<InterceptorProvider> providers = CastUtils.cast((Collection<?>)ctx.get(Message.INTERCEPTOR_PROVIDERS)); if (providers != null) { for (InterceptorProvider p : providers) { if (in) { chain.add(p.getInInterceptors()); } else { chain.add(p.getOutInterceptors()); } } } String key = in ? Message.IN_INTERCEPTORS : Message.OUT_INTERCEPTORS; Collection<Interceptor<? extends Message>> is = CastUtils.cast((Collection<?>)ctx.get(key)); if (is != null) { chain.add(is); } }
public static InterceptorChain getInInterceptorChain(Exchange ex, SortedSet<Phase> phases) { Bus bus = ex.getBus(); PhaseInterceptorChain chain = new PhaseInterceptorChain(phases); Endpoint ep = ex.getEndpoint(); List<Interceptor<? extends Message>> il = ep.getInInterceptors(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Interceptors contributed by endpoint: " + il); chain.add(il); il = ep.getService().getInInterceptors(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Interceptors contributed by service: " + il); chain.add(il); il = bus.getInInterceptors(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Interceptors contributed by bus: " + il); chain.add(il); if (ep.getService().getDataBinding() instanceof InterceptorProvider) { il = ((InterceptorProvider)ep.getService().getDataBinding()).getInInterceptors(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Interceptors contributed by databinding: " + il);
private static void modifyChain(PhaseInterceptorChain chain, Message m) { if (m == null) { return; } Collection<InterceptorProvider> providers = CastUtils.cast((Collection<?>)m.get(Message.INTERCEPTOR_PROVIDERS)); if (providers != null) { for (InterceptorProvider p : providers) { chain.add(p.getOutInterceptors()); } } Collection<Interceptor<? extends Message>> is = CastUtils.cast((Collection<?>)m.get(Message.OUT_INTERCEPTORS)); if (is != null) { chain.add(is); } if (m.getDestination() instanceof InterceptorProvider) { chain.add(((InterceptorProvider)m.getDestination()).getOutInterceptors()); } }
public static InterceptorChain getOutInterceptorChain(Exchange ex, SortedSet<Phase> phases) { Bus bus = ex.getBus(); PhaseInterceptorChain chain = new PhaseInterceptorChain(phases); 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 (ep.getService().getDataBinding() instanceof InterceptorProvider) { il = ((InterceptorProvider)ep.getService().getDataBinding()).getOutInterceptors(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Interceptors contributed by databinding: " + il); } chain.add(il); } modifyChain(chain, ex, false); return chain; }
private void addToChain(InterceptorChain chain, Message m) { Collection<InterceptorProvider> providers = CastUtils.cast((Collection<?>)m.get(Message.INTERCEPTOR_PROVIDERS)); if (providers != null) { for (InterceptorProvider p : providers) { chain.add(p.getInInterceptors()); } } Collection<Interceptor<? extends Message>> is = CastUtils.cast((Collection<?>)m.get(Message.IN_INTERCEPTORS)); if (is != null) { chain.add(is); } if (m.getDestination() instanceof InterceptorProvider) { chain.add(((InterceptorProvider)m.getDestination()).getInInterceptors()); } }
private void addToChain(PhaseInterceptorChain chain, Message m) { Collection<InterceptorProvider> providers = CastUtils.cast((Collection<?>)m.get(Message.INTERCEPTOR_PROVIDERS)); if (providers != null) { for (InterceptorProvider p : providers) { chain.add(p.getOutFaultInterceptors()); } } Collection<Interceptor<? extends Message>> is = CastUtils.cast((Collection<?>)m.get(Message.FAULT_OUT_INTERCEPTORS)); if (is != null) { chain.add(is); } if (m.getDestination() instanceof InterceptorProvider) { chain.add(((InterceptorProvider)m.getDestination()).getOutFaultInterceptors()); } }
@Override protected void initializeProvider(InterceptorProvider provider, Bus bus) { provider.getInInterceptors().add(in); provider.getOutInterceptors().add(out); provider.getOutFaultInterceptors().add(out); }
private void addToChain(PhaseInterceptorChain chain, Message m) { Collection<InterceptorProvider> providers = CastUtils.cast((Collection<?>)m.get(Message.INTERCEPTOR_PROVIDERS)); if (providers != null) { for (InterceptorProvider p : providers) { chain.add(p.getInFaultInterceptors()); } } Collection<Interceptor<? extends Message>> is = CastUtils.cast((Collection<?>)m.get(Message.FAULT_IN_INTERCEPTORS)); if (is != null) { chain.add(is); } }
private static void modifyChain(PhaseInterceptorChain chain, Message m, boolean in) { if (m == null) { return; } Collection<InterceptorProvider> providers = CastUtils.cast((Collection<?>)m.get(Message.INTERCEPTOR_PROVIDERS)); if (providers != null) { for (InterceptorProvider p : providers) { if (in) { chain.add(p.getInInterceptors()); } else { chain.add(p.getOutInterceptors()); } } } String key = in ? Message.IN_INTERCEPTORS : Message.OUT_INTERCEPTORS; Collection<Interceptor<? extends Message>> is = CastUtils.cast((Collection<?>)m.get(key)); if (is != null) { chain.add(is); } }