cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r995331 - in /cxf/trunk: api/src/main/java/org/apache/cxf/interceptor/InterceptorChain.java api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java
Date Thu, 09 Sep 2010 06:42:09 GMT
Author: ningjiang
Date: Thu Sep  9 06:42:08 2010
New Revision: 995331

URL: http://svn.apache.org/viewvc?rev=995331&view=rev
Log:
CXF-2984 Added getState() method into InterceptorChain

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/InterceptorChain.java
    cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/InterceptorChain.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/InterceptorChain.java?rev=995331&r1=995330&r2=995331&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/InterceptorChain.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/InterceptorChain.java Thu Sep 
9 06:42:08 2010
@@ -75,6 +75,8 @@ public interface InterceptorChain extend
     
     void reset();
     
+    State getState();
+    
     ListIterator<Interceptor<? extends Message>> getIterator();
 
     MessageObserver getFaultObserver();

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java?rev=995331&r1=995330&r2=995331&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java Thu Sep  9
06:42:08 2010
@@ -154,7 +154,6 @@ public class PhaseInterceptorChain imple
         return CURRENT_MESSAGE.get();
     }
     
-    // this method should really be on the InterceptorChain interface
     public synchronized State getState() {
         return state;
     }

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java?rev=995331&r1=995330&r2=995331&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java
Thu Sep  9 06:42:08 2010
@@ -38,7 +38,6 @@ import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.ExchangeImpl;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.PhaseChainCache;
-import org.apache.cxf.phase.PhaseInterceptorChain;
 import org.apache.cxf.phase.PhaseManager;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.ServiceImpl;
@@ -60,10 +59,10 @@ public class ChainInitiationObserver imp
         Bus origBus = BusFactory.getThreadDefaultBus(false);
         BusFactory.setThreadDefaultBus(bus);
         try {
-            PhaseInterceptorChain phaseChain = null;
+            InterceptorChain phaseChain = null;
             
-            if (m.getInterceptorChain() instanceof PhaseInterceptorChain) {
-                phaseChain = (PhaseInterceptorChain)m.getInterceptorChain();
+            if (m.getInterceptorChain() != null) {
+                phaseChain = m.getInterceptorChain();
                 // To make sure the phase chain is run by one thread once
                 synchronized (phaseChain) {
                     if (phaseChain.getState() == InterceptorChain.State.PAUSED 
@@ -117,7 +116,7 @@ public class ChainInitiationObserver imp
             BusFactory.setThreadDefaultBus(origBus);
         }
     }
-    private void addToChain(PhaseInterceptorChain chain, Message m) {
+    private void addToChain(InterceptorChain chain, Message m) {
         Collection<InterceptorProvider> providers 
             = CastUtils.cast((Collection<?>)m.get(Message.INTERCEPTOR_PROVIDERS));
         if (providers != null) {



Mime
View raw message