void initializeInterceptors(PolicyInterceptorProviderRegistry reg, Set<Interceptor<? extends Message>> out, Assertion a, boolean fault, Message msg) { QName qn = a.getName(); List<Interceptor<? extends org.apache.cxf.message.Message>> i = fault ? reg.getInFaultInterceptorsForAssertion(qn) : reg.getInInterceptorsForAssertion(qn); out.addAll(i); if (a instanceof PolicyContainingAssertion) { Policy p = ((PolicyContainingAssertion)a).getPolicy(); if (p != null) { for (Assertion a2 : getSupportedAlternatives(p, msg)) { initializeInterceptors(reg, out, a2, fault, msg); } } } }
void initializeInterceptors(PolicyInterceptorProviderRegistry reg, Set<Interceptor<? extends Message>> out, Assertion a, boolean fault, Message msg) { QName qn = a.getName(); List<Interceptor<? extends org.apache.cxf.message.Message>> i = fault ? reg.getInFaultInterceptorsForAssertion(qn) : reg.getInInterceptorsForAssertion(qn); out.addAll(i); if (a instanceof PolicyContainingAssertion) { Policy p = ((PolicyContainingAssertion)a).getPolicy(); if (p != null) { for (Assertion a2 : getSupportedAlternatives(p, msg)) { initializeInterceptors(reg, out, a2, fault, msg); } } } }
void chooseAlternative(Message m) { Collection<Assertion> alternative = null; if (requestor) { if (engine.isEnabled()) { alternative = engine.getAlternativeSelector().selectAlternative(policy, engine, assertor, null, m); } else { // use an empty list to avoid getting NPE alternative = Collections.emptyList(); } } else { alternative = getSupportedAlternatives(m); } if (null == alternative) { throw new PolicyException(new org.apache.cxf.common.i18n.Message("NO_ALTERNATIVE_EXC", BUNDLE)); } setChosenAlternative(alternative); }
void chooseAlternative(Message m) { Collection<Assertion> alternative = null; if (requestor) { if (engine.isEnabled()) { alternative = engine.getAlternativeSelector().selectAlternative(policy, engine, assertor, null, m); } else { // use an empty list to avoid getting NPE alternative = Collections.emptyList(); } } else { alternative = getSupportedAlternatives(m); } if (null == alternative) { throw new PolicyException(new org.apache.cxf.common.i18n.Message("NO_ALTERNATIVE_EXC", BUNDLE)); } setChosenAlternative(alternative); }