cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r896561 - in /cxf/trunk/api/src: main/java/org/apache/cxf/logging/ main/java/org/apache/cxf/phase/ test/java/org/apache/cxf/phase/
Date Wed, 06 Jan 2010 17:37:05 GMT
Author: dkulp
Date: Wed Jan  6 17:37:00 2010
New Revision: 896561

URL: http://svn.apache.org/viewvc?rev=896561&view=rev
Log:
Rename to FaultListener to make it sound a bit more flexible in what it
can do.

Added:
    cxf/trunk/api/src/main/java/org/apache/cxf/logging/FaultListener.java   (contents, props
changed)
      - copied, changed from r896560, cxf/trunk/api/src/main/java/org/apache/cxf/logging/FaultLogger.java
Removed:
    cxf/trunk/api/src/main/java/org/apache/cxf/logging/FaultLogger.java
Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
    cxf/trunk/api/src/test/java/org/apache/cxf/phase/PhaseInterceptorChainTest.java

Copied: cxf/trunk/api/src/main/java/org/apache/cxf/logging/FaultListener.java (from r896560,
cxf/trunk/api/src/main/java/org/apache/cxf/logging/FaultLogger.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/logging/FaultListener.java?p2=cxf/trunk/api/src/main/java/org/apache/cxf/logging/FaultListener.java&p1=cxf/trunk/api/src/main/java/org/apache/cxf/logging/FaultLogger.java&r1=896560&r2=896561&rev=896561&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/logging/FaultLogger.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/logging/FaultListener.java Wed Jan  6 17:37:00
2010
@@ -22,23 +22,24 @@
 import org.apache.cxf.message.Message;
 
 /**
- * Implement this interface to customize logging behavior for Exceptions
+ * Implement this interface to customize behavior for Exceptions
  * thrown by the application implementing the service call.
  * Implementations of this class must be registered in configuration of CXF
  * to be invoked.
  *
- * Implementing this interface can also be used for listening to exceptions
+ * Implementing this interface can be used for listening to exceptions
  * that occur in the service, as long as they are not caught in the application.
  */
-public interface FaultLogger {
+public interface FaultListener {
     /**
-     * Handle logging for the occured exception.
+     * Handle the occurred exception.
      * @param exception The exception
      * @param description A description of where in the service interfaces
      * the exception occurred.
-     * @param message the message processed while the exception occured.
-     * @return <code>true</code> if CXF should use default logging for this
-     * exception, <code>false</code> if CXF not should do any logging.
+     * @param message the message processed while the exception occurred.
+     * @return <code>true</code> if CXF should use default handling for this
+     * exception which normally is just logging the exception, <code>false</code>

+     * if CXF not should do any logging.
      */
-    boolean log(Exception exception, String description, Message message);
+    boolean faultOccurred(Exception exception, String description, Message message);
 }

Propchange: cxf/trunk/api/src/main/java/org/apache/cxf/logging/FaultListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/api/src/main/java/org/apache/cxf/logging/FaultListener.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

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=896561&r1=896560&r2=896561&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 Wed Jan  6
17:37:00 2010
@@ -35,7 +35,7 @@
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.interceptor.InterceptorChain;
-import org.apache.cxf.logging.FaultLogger;
+import org.apache.cxf.logging.FaultListener;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.FaultMode;
 import org.apache.cxf.message.Message;
@@ -269,11 +269,11 @@
                             }
                         }
 
-                        FaultLogger flogger = (FaultLogger)
-                                message.getContextualProperty(FaultLogger.class.getName());
+                        FaultListener flogger = (FaultListener)
+                                message.getContextualProperty(FaultListener.class.getName());
                         boolean useDefaultLogging = true;
                         if (flogger != null) {
-                            useDefaultLogging = flogger.log(ex, description.toString(), message);
+                            useDefaultLogging = flogger.faultOccurred(ex, description.toString(),
message);
                         }
                         if (useDefaultLogging) {
                             doDefaultLogging(message, ex, description);

Modified: cxf/trunk/api/src/test/java/org/apache/cxf/phase/PhaseInterceptorChainTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/test/java/org/apache/cxf/phase/PhaseInterceptorChainTest.java?rev=896561&r1=896560&r2=896561&view=diff
==============================================================================
--- cxf/trunk/api/src/test/java/org/apache/cxf/phase/PhaseInterceptorChainTest.java (original)
+++ cxf/trunk/api/src/test/java/org/apache/cxf/phase/PhaseInterceptorChainTest.java Wed Jan
 6 17:37:00 2010
@@ -30,7 +30,7 @@
 import org.apache.cxf.continuations.SuspendedInvocationException;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.interceptor.InterceptorChain;
-import org.apache.cxf.logging.FaultLogger;
+import org.apache.cxf.logging.FaultListener;
 import org.apache.cxf.message.FaultMode;
 import org.apache.cxf.message.Message;
 import org.easymock.classextension.EasyMock;
@@ -448,11 +448,11 @@
                                    boolean expectFault, 
                                    boolean returnFromCustomLogger) {
         if (useCustomLogger) {
-            FaultLogger customLogger = control.createMock(FaultLogger.class);
-            message.getContextualProperty(FaultLogger.class.getName());
+            FaultListener customLogger = control.createMock(FaultListener.class);
+            message.getContextualProperty(FaultListener.class.getName());
             EasyMock.expectLastCall().andReturn(customLogger);
             if (expectFault) {
-                customLogger.log(EasyMock.isA(Exception.class),
+                customLogger.faultOccurred(EasyMock.isA(Exception.class),
                                  EasyMock.isA(String.class), 
                                  EasyMock.isA(Message.class));
                 EasyMock.expectLastCall().andReturn(returnFromCustomLogger);
@@ -464,7 +464,7 @@
                 }
             }
         } else {
-            message.getContextualProperty(FaultLogger.class.getName());
+            message.getContextualProperty(FaultListener.class.getName());
             EasyMock.expectLastCall().andReturn(null);
         }
 



Mime
View raw message