You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by sa...@apache.org on 2006/09/15 06:13:03 UTC

svn commit: r446510 - /incubator/synapse/trunk/java/modules/nhttp/src/org/apache/axis2/transport/nhttp/AsyncHTTPListener.java

Author: saminda
Date: Thu Sep 14 21:13:02 2006
New Revision: 446510

URL: http://svn.apache.org/viewvc?view=rev&rev=446510
Log:
update

Modified:
    incubator/synapse/trunk/java/modules/nhttp/src/org/apache/axis2/transport/nhttp/AsyncHTTPListener.java

Modified: incubator/synapse/trunk/java/modules/nhttp/src/org/apache/axis2/transport/nhttp/AsyncHTTPListener.java
URL: http://svn.apache.org/viewvc/incubator/synapse/trunk/java/modules/nhttp/src/org/apache/axis2/transport/nhttp/AsyncHTTPListener.java?view=diff&rev=446510&r1=446509&r2=446510
==============================================================================
--- incubator/synapse/trunk/java/modules/nhttp/src/org/apache/axis2/transport/nhttp/AsyncHTTPListener.java (original)
+++ incubator/synapse/trunk/java/modules/nhttp/src/org/apache/axis2/transport/nhttp/AsyncHTTPListener.java Thu Sep 14 21:13:02 2006
@@ -54,7 +54,7 @@
         this.cfgCtx = cfgCtx;
         this.port = port;
         TransportInDescription httpDescription = new TransportInDescription(
-            new QName(Constants.TRANSPORT_HTTP));
+                new QName(Constants.TRANSPORT_HTTP));
         httpDescription.setReceiver(this);
 
         ListenerManager listenerManager = cfgCtx.getListenerManager();
@@ -65,7 +65,8 @@
         cfgCtx.getListenerManager().addListener(httpDescription, true);
     }
 
-    public void init(ConfigurationContext cfgCtx, TransportInDescription transprtIn) throws AxisFault {
+    public void init(ConfigurationContext cfgCtx, TransportInDescription transprtIn)
+            throws AxisFault {
         this.cfgCtx = cfgCtx;
         serviceContextPath = cfgCtx.getServiceContextPath();
 
@@ -88,7 +89,7 @@
     public void start() throws AxisFault {
         List svcHandlers = new ArrayList();
         svcHandlers.add(
-            new org.apache.axis2.transport.nhttp.HttpServiceHandler(cfgCtx, port));
+                new org.apache.axis2.transport.nhttp.HttpServiceHandler(cfgCtx, port));
 
         NIOTransport nioTransport = new NIOTransport();
         nioTransport.setPort(port);
@@ -111,7 +112,7 @@
             log.info("Started AsyncHTTPListener on port : " + port);
         } catch (ContainerLifecycleException e) {
             throw new AxisFault("Error starting Async HTTP listener on port : "
-                + port + " : " + e.getMessage(), e);
+                                + port + " : " + e.getMessage(), e);
         }
     }
 
@@ -121,6 +122,15 @@
     }
 
     public EndpointReference getEPRForService(String serviceName, String ip) throws AxisFault {
-        return new EndpointReference("http://" + hostAddress + ":" + port + serviceContextPath + "/" + serviceName);
+        return new EndpointReference(
+                "http://" + hostAddress + ":" + port + serviceContextPath + "/" + serviceName);
+    }
+
+    //TODO This should handle other endpoints too. Ex: If a rest call has made 
+    public EndpointReference[] getEPRsForService(String serviceName, String ip) throws AxisFault {
+        EndpointReference[] endpointReferences = new EndpointReference[1];
+        endpointReferences[0] = new EndpointReference(
+                "http://" + hostAddress + ":" + port + serviceContextPath + "/" + serviceName);
+        return endpointReferences;
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org