cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r529748 - /incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java
Date Tue, 17 Apr 2007 20:03:31 GMT
Author: gnodet
Date: Tue Apr 17 13:03:31 2007
New Revision: 529748

URL: http://svn.apache.org/viewvc?view=rev&rev=529748
Log:
Add the constructor with a MessageObserver back

Modified:
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java?view=diff&rev=529748&r1=529747&r2=529748
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java Tue
Apr 17 13:03:31 2007
@@ -45,14 +45,31 @@
     private Bus bus;
     private ServerLifeCycleManager mgr;
     private BindingFactory bindingFactory;
+    private MessageObserver messageObserver;
     
     public ServerImpl(Bus bus, 
                       Endpoint endpoint, 
                       DestinationFactory destinationFactory, 
                       BindingFactory bindingFactory) throws BusException, IOException {
+        this(bus, endpoint, destinationFactory, bindingFactory, null);
+    }
+
+    public ServerImpl(Bus bus, 
+                      Endpoint endpoint, 
+                      DestinationFactory destinationFactory, 
+                      MessageObserver messageObserver) throws BusException, IOException {
+        this(bus, endpoint, destinationFactory, null, messageObserver);
+    }
+
+    protected ServerImpl(Bus bus, 
+                         Endpoint endpoint, 
+                         DestinationFactory destinationFactory, 
+                         BindingFactory bindingFactory,
+                         MessageObserver messageObserver) throws BusException, IOException
{
         this.endpoint = endpoint;
         this.bus = bus;
         this.bindingFactory = bindingFactory;
+        this.messageObserver = messageObserver;
         
         EndpointInfo ei = endpoint.getEndpointInfo();
         
@@ -97,7 +114,11 @@
     }
 
     public void start() {     
-        bindingFactory.addListener(destination, endpoint);
+        if (messageObserver != null) {
+            destination.setMessageObserver(messageObserver);
+        } else {
+            bindingFactory.addListener(destination, endpoint);
+        }
         
         // register the active server to run
         if (null != serverRegistry) {



Mime
View raw message