@SuppressWarnings("unchecked") public void unwind(Message message) { while (iterator.hasPrevious()) { Interceptor<Message> currentInterceptor = (Interceptor<Message>)iterator.previous(); if (isFineLogging) { LOG.fine("Invoking handleFault on interceptor " + currentInterceptor); } try { currentInterceptor.handleFault(message); } catch (RuntimeException e) { LOG.log(Level.WARNING, "Exception in handleFault on interceptor " + currentInterceptor, e); throw e; } catch (Exception e) { LOG.log(Level.WARNING, "Exception in handleFault on interceptor " + currentInterceptor, e); throw new RuntimeException(e); } } }
@SuppressWarnings("unchecked") public void unwind(Message message) { while (iterator.hasPrevious()) { Interceptor<Message> currentInterceptor = (Interceptor<Message>)iterator.previous(); if (isFineLogging) { LOG.fine("Invoking handleFault on interceptor " + currentInterceptor); } try { currentInterceptor.handleFault(message); } catch (RuntimeException e) { LOG.log(Level.WARNING, "Exception in handleFault on interceptor " + currentInterceptor, e); throw e; } catch (Exception e) { LOG.log(Level.WARNING, "Exception in handleFault on interceptor " + currentInterceptor, e); throw new RuntimeException(e); } } }
@SuppressWarnings("unchecked") public void unwind(Message message) { while (iterator.hasPrevious()) { Interceptor<Message> currentInterceptor = (Interceptor<Message>)iterator.previous(); if (isFineLogging) { LOG.fine("Invoking handleFault on interceptor " + currentInterceptor); } try { currentInterceptor.handleFault(message); } catch (RuntimeException e) { LOG.log(Level.WARNING, "Exception in handleFault on interceptor " + currentInterceptor, e); throw e; } catch (Exception e) { LOG.log(Level.WARNING, "Exception in handleFault on interceptor " + currentInterceptor, e); throw new RuntimeException(e); } } }
if (iterator.hasPrevious()) { iterator.previous();
if (iterator.hasPrevious()) { iterator.previous();
&& iterator.hasPrevious()) { iterator.previous();
&& iterator.hasPrevious()) { iterator.previous();
@SuppressWarnings("unchecked") public void unwind(Message message) { while (iterator.hasPrevious()) { Interceptor<Message> currentInterceptor = (Interceptor<Message>)iterator.previous(); if (isFineLogging) { LOG.fine("Invoking handleFault on interceptor " + currentInterceptor); } try { currentInterceptor.handleFault(message); } catch (RuntimeException e) { LOG.log(Level.WARNING, "Exception in handleFault on interceptor " + currentInterceptor, e); throw e; } catch (Exception e) { LOG.log(Level.WARNING, "Exception in handleFault on interceptor " + currentInterceptor, e); throw new RuntimeException(e); } } }
public static boolean setCurrentMessage(PhaseInterceptorChain chain, Message m) { if (getCurrentMessage() == m) { return false; } if (chain.iterator.hasPrevious()) { chain.iterator.previous(); if (chain.iterator.next() instanceof ServiceInvokerInterceptor) { CURRENT_MESSAGE.set(m); return true; } String error = "Only ServiceInvokerInterceptor can update the current chain message"; LOG.warning(error); throw new IllegalStateException(error); } return false; }
public static boolean setCurrentMessage(PhaseInterceptorChain chain, Message m) { if (getCurrentMessage() == m) { return false; } if (chain.iterator.hasPrevious()) { chain.iterator.previous(); if (chain.iterator.next() instanceof ServiceInvokerInterceptor) { CURRENT_MESSAGE.set(m); return true; } String error = "Only ServiceInvokerInterceptor can update the current chain message"; LOG.warning(error); throw new IllegalStateException(error); } return false; }