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; }
Interceptor<Message> currentInterceptor = (Interceptor<Message>)iterator.next(); if (isFineLogging) { LOG.fine("Invoking handleMessage on interceptor " + currentInterceptor);
Interceptor<Message> currentInterceptor = (Interceptor<Message>)iterator.next(); if (isFineLogging) { LOG.fine("Invoking handleMessage on interceptor " + currentInterceptor);
Interceptor<Message> currentInterceptor = (Interceptor<Message>)iterator.next(); if (isFineLogging) { LOG.fine("Invoking handleMessage on interceptor " + currentInterceptor);
Interceptor<Message> currentInterceptor = (Interceptor<Message>)iterator.next(); if (isFineLogging) { LOG.fine("Invoking handleMessage on interceptor " + currentInterceptor);
/** * Intercept a message, invoking each phase's handlers in turn, * starting at the specified interceptor. * * @param message the message * @param startingAtInterceptorID the id of the interceptor * @throws Exception */ public synchronized boolean doInterceptStartingAt(Message message, String startingAtInterceptorID) { updateIterator(); while (state == State.EXECUTING && iterator.hasNext()) { PhaseInterceptor<? extends Message> currentInterceptor = (PhaseInterceptor<? extends Message>)iterator.next(); if (currentInterceptor.getId().equals(startingAtInterceptorID)) { iterator.previous(); break; } } return doIntercept(message); }
/** * Intercept a message, invoking each phase's handlers in turn, * starting at the specified interceptor. * * @param message the message * @param startingAtInterceptorID the id of the interceptor * @throws Exception */ public synchronized boolean doInterceptStartingAt(Message message, String startingAtInterceptorID) { updateIterator(); while (state == State.EXECUTING && iterator.hasNext()) { PhaseInterceptor<? extends Message> currentInterceptor = (PhaseInterceptor<? extends Message>)iterator.next(); if (currentInterceptor.getId().equals(startingAtInterceptorID)) { iterator.previous(); break; } } return doIntercept(message); }
/** * Intercept a message, invoking each phase's handlers in turn, * starting after the specified interceptor. * * @param message the message * @param startingAfterInterceptorID the id of the interceptor * @throws Exception */ public synchronized boolean doInterceptStartingAfter(Message message, String startingAfterInterceptorID) { updateIterator(); while (state == State.EXECUTING && iterator.hasNext()) { PhaseInterceptor<? extends Message> currentInterceptor = (PhaseInterceptor<? extends Message>)iterator.next(); if (currentInterceptor.getId().equals(startingAfterInterceptorID)) { break; } } return doIntercept(message); }
/** * Intercept a message, invoking each phase's handlers in turn, * starting at the specified interceptor. * * @param message the message * @param startingAtInterceptorID the id of the interceptor * @throws Exception */ public synchronized boolean doInterceptStartingAt(Message message, String startingAtInterceptorID) { updateIterator(); while (state == State.EXECUTING && iterator.hasNext()) { PhaseInterceptor<? extends Message> currentInterceptor = (PhaseInterceptor<? extends Message>)iterator.next(); if (currentInterceptor.getId().equals(startingAtInterceptorID)) { iterator.previous(); break; } } return doIntercept(message); }
/** * Intercept a message, invoking each phase's handlers in turn, * starting after the specified interceptor. * * @param message the message * @param startingAfterInterceptorID the id of the interceptor * @throws Exception */ public synchronized boolean doInterceptStartingAfter(Message message, String startingAfterInterceptorID) { updateIterator(); while (state == State.EXECUTING && iterator.hasNext()) { PhaseInterceptor<? extends Message> currentInterceptor = (PhaseInterceptor<? extends Message>)iterator.next(); if (currentInterceptor.getId().equals(startingAfterInterceptorID)) { break; } } return doIntercept(message); }
/** * Intercept a message, invoking each phase's handlers in turn, * starting after the specified interceptor. * * @param message the message * @param startingAfterInterceptorID the id of the interceptor * @throws Exception */ public synchronized boolean doInterceptStartingAfter(Message message, String startingAfterInterceptorID) { updateIterator(); while (state == State.EXECUTING && iterator.hasNext()) { PhaseInterceptor<? extends Message> currentInterceptor = (PhaseInterceptor<? extends Message>)iterator.next(); if (currentInterceptor.getId().equals(startingAfterInterceptorID)) { break; } } return doIntercept(message); }
/** * Intercept a message, invoking each phase's handlers in turn, * starting at the specified interceptor. * * @param message the message * @param startingAtInterceptorID the id of the interceptor * @throws Exception */ public synchronized boolean doInterceptStartingAt(Message message, String startingAtInterceptorID) { updateIterator(); while (state == State.EXECUTING && iterator.hasNext()) { PhaseInterceptor<? extends Message> currentInterceptor = (PhaseInterceptor<? extends Message>)iterator.next(); if (currentInterceptor.getId().equals(startingAtInterceptorID)) { iterator.previous(); break; } } return doIntercept(message); }
/** * Intercept a message, invoking each phase's handlers in turn, * starting after the specified interceptor. * * @param message the message * @param startingAfterInterceptorID the id of the interceptor * @throws Exception */ public synchronized boolean doInterceptStartingAfter(Message message, String startingAfterInterceptorID) { updateIterator(); while (state == State.EXECUTING && iterator.hasNext()) { PhaseInterceptor<? extends Message> currentInterceptor = (PhaseInterceptor<? extends Message>)iterator.next(); if (currentInterceptor.getId().equals(startingAfterInterceptorID)) { break; } } return doIntercept(message); }