You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by gn...@apache.org on 2007/04/17 22:03:31 UTC
svn commit: r529748 -
/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java
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) {