tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r951651 [6/13] - in /tuscany/sca-java-2.x/trunk/modules: assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ assembly/src/main/java/org/apache/tuscany/sca/assembly/ assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ bi...
Date Sat, 05 Jun 2010 05:17:51 GMT
Modified: tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPInvoker.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPInvoker.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPInvoker.java Sat Jun  5 05:17:47 2010
@@ -1,161 +1,161 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.    
- */
-
-package org.apache.tuscany.sca.binding.jsonp.runtime;
-
-import java.io.BufferedReader;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-
-import org.apache.commons.codec.EncoderException;
-import org.apache.commons.codec.net.URLCodec;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.impl.client.DefaultHttpClient;
-import org.apache.tuscany.sca.assembly.EndpointReference;
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.invocation.Message;
-import org.codehaus.jackson.JsonGenerationException;
-import org.codehaus.jackson.JsonParseException;
-import org.codehaus.jackson.map.JsonMappingException;
-import org.codehaus.jackson.map.ObjectMapper;
-
-public class JSONPInvoker implements Invoker {
-    
-    protected Operation operation;
-    protected EndpointReference endpoint;
-
-    protected ObjectMapper mapper; // TODO: share mapper btw invoker and servlet or move to databinding
-
-    public JSONPInvoker(Operation operation, EndpointReference endpoint) {
-        this.operation = operation;
-        this.endpoint = endpoint;
-        this.mapper = new ObjectMapper();
-    }
-
-    public Message invoke(Message msg) {
-        try {
-
-            return doInvoke(msg);
-            
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    public Message doInvoke(Message msg) throws JsonGenerationException, JsonMappingException, IOException, EncoderException {
-        String uri = endpoint.getBinding().getURI() + "/" + operation.getName();
-        String[] jsonArgs = objectsToJSON((Object[])msg.getBody());
-
-        String responseJSON = invokeHTTPRequest(uri, jsonArgs);
-
-        Object response = jsonToObjects(responseJSON)[0];
-        msg.setBody(response);
-
-        return msg;
-    }
-
-    protected String invokeHTTPRequest(String url, String[] jsonArgs) throws IOException, EncoderException {
-        
-         HttpClient httpclient = new DefaultHttpClient();
-         
-         
-         URLCodec uc = new URLCodec();
-         for (int i=0 ; i<jsonArgs.length; i++) {
-             if (i == 0) {
-                 url += '?';
-             } else {
-                 url += '&';
-             }
-             url += "arg" + i + "=";
-             url += uc.encode(jsonArgs[i]);
-         }
-
-         HttpGet httpget = new HttpGet(url); 
-
-         HttpResponse response = httpclient.execute(httpget);
-         
-         StringBuffer responseJSON = new StringBuffer(); 
-
-         HttpEntity entity = response.getEntity();
-         
-         // If the response does not enclose an entity, there is no need
-         // to worry about connection release
-         if (entity != null) {
-             InputStream instream = entity.getContent();
-             try {
-                 
-                 BufferedReader reader = new BufferedReader(new InputStreamReader(instream));
-                 String s = null;
-                 while ((s = reader.readLine()) != null) {
-                     responseJSON.append(s);
-                 }
-                 
-             } catch (IOException ex) {
-         
-                 // In case of an IOException the connection will be released
-                 // back to the connection manager automatically
-                 throw ex;
-                 
-             } catch (RuntimeException ex) {
-         
-                 // In case of an unexpected exception you may want to abort
-                 // the HTTP request in order to shut down the underlying 
-                 // connection and release it back to the connection manager.
-                 httpget.abort();
-                 throw ex;
-                 
-             } finally {
-         
-                 // Closing the input stream will trigger connection release
-                 instream.close();
-                 
-             }
-             
-             // When HttpClient instance is no longer needed, 
-             // shut down the connection manager to ensure
-             // immediate deallocation of all system resources
-             httpclient.getConnectionManager().shutdown();        
-         }
-         
-         return responseJSON.toString();
-    }
-
-    protected String[] objectsToJSON(Object[] msgArgs) throws JsonGenerationException, JsonMappingException, IOException {
-        String[] jsonArgs = new String[msgArgs.length];
-        for (int i=0; i<msgArgs.length; i++) {
-            ByteArrayOutputStream os = new ByteArrayOutputStream();
-            mapper.writeValue(os , msgArgs[i]);
-            jsonArgs[i] = os.toString();
-        }
-        return jsonArgs;
-    }
-
-    protected Object[] jsonToObjects(String jsonRequest) throws JsonParseException, JsonMappingException, IOException {
-        Class<?> c = new Object[0].getClass();
-        Object[] args = (Object[])mapper.readValue("[" + jsonRequest +"]", c);
-        return args;
-    }
-    
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.sca.binding.jsonp.runtime;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import org.apache.commons.codec.EncoderException;
+import org.apache.commons.codec.net.URLCodec;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.invocation.Message;
+import org.codehaus.jackson.JsonGenerationException;
+import org.codehaus.jackson.JsonParseException;
+import org.codehaus.jackson.map.JsonMappingException;
+import org.codehaus.jackson.map.ObjectMapper;
+
+public class JSONPInvoker implements Invoker {
+    
+    protected Operation operation;
+    protected EndpointReference endpoint;
+
+    protected ObjectMapper mapper; // TODO: share mapper btw invoker and servlet or move to databinding
+
+    public JSONPInvoker(Operation operation, EndpointReference endpoint) {
+        this.operation = operation;
+        this.endpoint = endpoint;
+        this.mapper = new ObjectMapper();
+    }
+
+    public Message invoke(Message msg) {
+        try {
+
+            return doInvoke(msg);
+            
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public Message doInvoke(Message msg) throws JsonGenerationException, JsonMappingException, IOException, EncoderException {
+        String uri = endpoint.getBinding().getURI() + "/" + operation.getName();
+        String[] jsonArgs = objectsToJSON((Object[])msg.getBody());
+
+        String responseJSON = invokeHTTPRequest(uri, jsonArgs);
+
+        Object response = jsonToObjects(responseJSON)[0];
+        msg.setBody(response);
+
+        return msg;
+    }
+
+    protected String invokeHTTPRequest(String url, String[] jsonArgs) throws IOException, EncoderException {
+        
+         HttpClient httpclient = new DefaultHttpClient();
+         
+         
+         URLCodec uc = new URLCodec();
+         for (int i=0 ; i<jsonArgs.length; i++) {
+             if (i == 0) {
+                 url += '?';
+             } else {
+                 url += '&';
+             }
+             url += "arg" + i + "=";
+             url += uc.encode(jsonArgs[i]);
+         }
+
+         HttpGet httpget = new HttpGet(url); 
+
+         HttpResponse response = httpclient.execute(httpget);
+         
+         StringBuffer responseJSON = new StringBuffer(); 
+
+         HttpEntity entity = response.getEntity();
+         
+         // If the response does not enclose an entity, there is no need
+         // to worry about connection release
+         if (entity != null) {
+             InputStream instream = entity.getContent();
+             try {
+                 
+                 BufferedReader reader = new BufferedReader(new InputStreamReader(instream));
+                 String s = null;
+                 while ((s = reader.readLine()) != null) {
+                     responseJSON.append(s);
+                 }
+                 
+             } catch (IOException ex) {
+         
+                 // In case of an IOException the connection will be released
+                 // back to the connection manager automatically
+                 throw ex;
+                 
+             } catch (RuntimeException ex) {
+         
+                 // In case of an unexpected exception you may want to abort
+                 // the HTTP request in order to shut down the underlying 
+                 // connection and release it back to the connection manager.
+                 httpget.abort();
+                 throw ex;
+                 
+             } finally {
+         
+                 // Closing the input stream will trigger connection release
+                 instream.close();
+                 
+             }
+             
+             // When HttpClient instance is no longer needed, 
+             // shut down the connection manager to ensure
+             // immediate deallocation of all system resources
+             httpclient.getConnectionManager().shutdown();        
+         }
+         
+         return responseJSON.toString();
+    }
+
+    protected String[] objectsToJSON(Object[] msgArgs) throws JsonGenerationException, JsonMappingException, IOException {
+        String[] jsonArgs = new String[msgArgs.length];
+        for (int i=0; i<msgArgs.length; i++) {
+            ByteArrayOutputStream os = new ByteArrayOutputStream();
+            mapper.writeValue(os , msgArgs[i]);
+            jsonArgs[i] = os.toString();
+        }
+        return jsonArgs;
+    }
+
+    protected Object[] jsonToObjects(String jsonRequest) throws JsonParseException, JsonMappingException, IOException {
+        Class<?> c = new Object[0].getClass();
+        Object[] args = (Object[])mapper.readValue("[" + jsonRequest +"]", c);
+        return args;
+    }
+    
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPInvoker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPInvoker.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPReferenceBindingProvider.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPReferenceBindingProvider.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPReferenceBindingProvider.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPReferenceBindingProvider.java Sat Jun  5 05:17:47 2010
@@ -1,53 +1,53 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.    
- */
-
-package org.apache.tuscany.sca.binding.jsonp.runtime;
-
-import org.apache.tuscany.sca.assembly.EndpointReference;
-import org.apache.tuscany.sca.interfacedef.InterfaceContract;
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
-
-public class JSONPReferenceBindingProvider implements ReferenceBindingProvider {
-
-    private EndpointReference endpoint;
-
-    public JSONPReferenceBindingProvider(EndpointReference endpoint) {
-        this.endpoint = endpoint;
-    }
-    public Invoker createInvoker(Operation operation) {
-        return new JSONPInvoker(operation, endpoint);
-    }
-
-    public void start() {
-    }
-
-    public void stop() {
-    }
-
-    public InterfaceContract getBindingInterfaceContract() {
-        return null;
-    }
-
-    public boolean supportsOneWayInvocation() {
-        return false;
-    }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.sca.binding.jsonp.runtime;
+
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.interfacedef.InterfaceContract;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
+
+public class JSONPReferenceBindingProvider implements ReferenceBindingProvider {
+
+    private EndpointReference endpoint;
+
+    public JSONPReferenceBindingProvider(EndpointReference endpoint) {
+        this.endpoint = endpoint;
+    }
+    public Invoker createInvoker(Operation operation) {
+        return new JSONPInvoker(operation, endpoint);
+    }
+
+    public void start() {
+    }
+
+    public void stop() {
+    }
+
+    public InterfaceContract getBindingInterfaceContract() {
+        return null;
+    }
+
+    public boolean supportsOneWayInvocation() {
+        return false;
+    }
+
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPReferenceBindingProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPReferenceBindingProvider.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldClient.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldClient.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldClient.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldClient.java Sat Jun  5 05:17:47 2010
@@ -1,37 +1,37 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.    
- */
-
-package helloworld;
-
-import org.oasisopen.sca.annotation.Reference;
-
-public class HelloWorldClient implements HelloWorldService {
-
-    @Reference
-    public HelloWorldService  ref;
-    
-    public String sayHello(String name) {
-        return ref.sayHello(name);
-    }
-
-    public String sayHello2(String firstName, String lastName) {
-        return ref.sayHello2(firstName, lastName);
-    }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClient implements HelloWorldService {
+
+    @Reference
+    public HelloWorldService  ref;
+    
+    public String sayHello(String name) {
+        return ref.sayHello(name);
+    }
+
+    public String sayHello2(String firstName, String lastName) {
+        return ref.sayHello2(firstName, lastName);
+    }
+
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldClient.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/binary/BinaryServiceTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/binary/BinaryServiceTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/binary/BinaryService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/binary/BinaryService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/binary/BinaryServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/binary/BinaryServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Items.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Items.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/binding-rss-runtime/src/test/java/org/apache/tuscany/sca/binding/rss/RSSGetTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rss-runtime/src/test/java/org/apache/tuscany/sca/binding/rss/RSSGetTestCase.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-rss-runtime/src/test/java/org/apache/tuscany/sca/binding/rss/RSSGetTestCase.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-rss-runtime/src/test/java/org/apache/tuscany/sca/binding/rss/RSSGetTestCase.java Sat Jun  5 05:17:47 2010
@@ -1,78 +1,78 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.    
- */
-
-package org.apache.tuscany.sca.binding.rss;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.ContributionLocationHelper;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
-
-/**
- * Basic test case that will get the feed entries from an RSS feed.
- */
-public class RSSGetTestCase {
-    protected static Node scaConsumerNode;
-    protected static Node scaProviderNode;
-    protected static CustomerClient testService;
-
-    @BeforeClass
-    public static void init() throws Exception {
-        System.out.println(">>>RSSGetTestCase.init entry");
-        String contribution = ContributionLocationHelper.getContributionLocation(RSSGetTestCase.class);
-
-        scaProviderNode = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/rss/Provider.composite", new Contribution("provider", contribution));
-        scaProviderNode.start();
-
-        scaConsumerNode = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/rss/Consumer.composite", new Contribution("consumer", contribution));
-        scaConsumerNode.start();
-
-        testService = scaConsumerNode.getService(CustomerClient.class, "CustomerClient");
-    }
-
-    @AfterClass
-    public static void destroy() throws Exception {
-        // System.out.println(">>>RSSGetTestCase.destroy entry");
-        if (scaConsumerNode != null) {
-            scaConsumerNode.stop();
-        }
-        if (scaProviderNode != null) {
-            scaProviderNode.stop();
-        }
-    }
-
-    @Test
-    public void testPrelim() throws Exception {
-        Assert.assertNotNull(scaProviderNode);
-        Assert.assertNotNull(scaConsumerNode);
-        Assert.assertNotNull(testService);
-    }
-
-    @Test
-    @Ignore("TUSCANY-3537")
-    public void testRSSGet() throws Exception {
-        testService.testCustomerCollection();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.sca.binding.rss;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * Basic test case that will get the feed entries from an RSS feed.
+ */
+public class RSSGetTestCase {
+    protected static Node scaConsumerNode;
+    protected static Node scaProviderNode;
+    protected static CustomerClient testService;
+
+    @BeforeClass
+    public static void init() throws Exception {
+        System.out.println(">>>RSSGetTestCase.init entry");
+        String contribution = ContributionLocationHelper.getContributionLocation(RSSGetTestCase.class);
+
+        scaProviderNode = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/rss/Provider.composite", new Contribution("provider", contribution));
+        scaProviderNode.start();
+
+        scaConsumerNode = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/rss/Consumer.composite", new Contribution("consumer", contribution));
+        scaConsumerNode.start();
+
+        testService = scaConsumerNode.getService(CustomerClient.class, "CustomerClient");
+    }
+
+    @AfterClass
+    public static void destroy() throws Exception {
+        // System.out.println(">>>RSSGetTestCase.destroy entry");
+        if (scaConsumerNode != null) {
+            scaConsumerNode.stop();
+        }
+        if (scaProviderNode != null) {
+            scaProviderNode.stop();
+        }
+    }
+
+    @Test
+    public void testPrelim() throws Exception {
+        Assert.assertNotNull(scaProviderNode);
+        Assert.assertNotNull(scaConsumerNode);
+        Assert.assertNotNull(testService);
+    }
+
+    @Test
+    @Ignore("TUSCANY-3537")
+    public void testRSSGet() throws Exception {
+        testService.testCustomerCollection();
+    }
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-rss-runtime/src/test/java/org/apache/tuscany/sca/binding/rss/RSSGetTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-rss-runtime/src/test/java/org/apache/tuscany/sca/binding/rss/RSSGetTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-rss/src/main/java/org/apache/tuscany/sca/binding/rss/RSSBinding.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-rss/src/main/java/org/apache/tuscany/sca/binding/rss/RSSBinding.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/resources/org/apache/tuscany/sca/binding/ws/jaxws/ri/definitions.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/resources/org/apache/tuscany/sca/binding/ws/jaxws/ri/definitions.xml?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/resources/org/apache/tuscany/sca/binding/ws/jaxws/ri/definitions.xml (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/resources/org/apache/tuscany/sca/binding/ws/jaxws/ri/definitions.xml Sat Jun  5 05:17:47 2010
@@ -1,41 +1,41 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.    
--->
-
-<!-- $Rev: 907636 $ $Date: 2010-02-09 01:39:16 +1300 (Tue, 09 Feb 2010) $ -->
-
-<sca:definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
-            targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
-            xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
-            xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
-            
-    <sca:bindingType type="sca:binding.ws"  mayProvide="sca:SOAP sca:SOAP.v1_1 sca:SOAP.v1_2 tuscany:MTOM" alwaysProvides=""/>
-
-    <!-- see the file sca-policy-1.1-intents-definitions.xml in the -->
-    <!-- assembly-xsd module for spec defined intents               -->
-    
-    <!-- PolicyIntents defined by the SCA Runtime Extension for WS Binding Axis 2 -->
-    
-    <sca:intent name="MTOM" constrains="sca:binding.ws">
-        <sca:description>
-            Communication through this binding requires MTOM support
-        </sca:description>
-    </sca:intent>
-    
- </sca:definitions>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+
+<!-- $Rev: 907636 $ $Date: 2010-02-09 01:39:16 +1300 (Tue, 09 Feb 2010) $ -->
+
+<sca:definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+            targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
+            xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+            xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
+            
+    <sca:bindingType type="sca:binding.ws"  mayProvide="sca:SOAP sca:SOAP.v1_1 sca:SOAP.v1_2 tuscany:MTOM" alwaysProvides=""/>
+
+    <!-- see the file sca-policy-1.1-intents-definitions.xml in the -->
+    <!-- assembly-xsd module for spec defined intents               -->
+    
+    <!-- PolicyIntents defined by the SCA Runtime Extension for WS Binding Axis 2 -->
+    
+    <sca:intent name="MTOM" constrains="sca:binding.ws">
+        <sca:description>
+            Communication through this binding requires MTOM support
+        </sca:description>
+    </sca:intent>
+    
+ </sca:definitions>

Propchange: tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/resources/org/apache/tuscany/sca/binding/ws/jaxws/ri/definitions.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/management/ConfigAttributes.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/management/ConfigAttributes.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/management/ConfigAttributes.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/management/ConfigAttributes.java Sat Jun  5 05:17:47 2010
@@ -1,26 +1,26 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.    
- */
-
-package org.apache.tuscany.sca.management;
-
-import java.util.Map;
-
-public interface ConfigAttributes {
-    Map<String, String> getAttributes();
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.sca.management;
+
+import java.util.Map;
+
+public interface ConfigAttributes {
+    Map<String, String> getAttributes();
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/management/ConfigAttributes.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/management/ConfigAttributes.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistryURI.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistryURI.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistryURI.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistryURI.java Sat Jun  5 05:17:47 2010
@@ -1,168 +1,168 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.    
- */
-
-package org.apache.tuscany.sca.runtime;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * Utility to parse the config uri string.
- * 
- * tuscany:[domainName]?listen=[port|ip:port]]&password=abc&multicast=[off|port|ip:port]&remotes=ip:port,ip:port,...
-
- * listen - defines the local bind address and port, it defaults to all network interfaces on port 14820 and if that port in use it will try incrementing by one till a free port is found.
- * password -  is the password other nodes must use to connect to this domain. The default is 'tuscany'.
- * multicast - defines if multicast discovery is used and if so what multicast ip group and port is used. 
- *             The default is multicast is off if remotes= is specified (only for now due to a Hazelcast limitation that is planned to be fixed), 
- *             otherwise if remotes= is not specified then multicast defaults to 224.5.12.10:51482
- * remotes - a list of ipAddress:port for remote nodes
- * 
- * @tuscany.spi.extension.asclient
- *             
- */
-public class DomainRegistryURI {
-    
-    private String domainName = "default";
-    private String bindAddress = null; // null means all network adapters
-    private int listenPort = 14820;
-    private String password = "tuscany";
-    private boolean multicastDisabled = false;
-    private String multicastAddress = "224.5.12.10";
-    private int multicastPort = 51482;
-    private List<String> remotes = new ArrayList<String>();
-    private String uri;
-
-    public DomainRegistryURI(String uri) {
-        this.uri = uri;
-        parseURI(uri);
-    }
-
-    private void parseURI(String uri) {
-        if (uri.startsWith("tuscanyclient:")) {
-            uri = uri.replace("tuscanyclient:", "tuscany:");    
-        }
-        
-        if (!uri.startsWith("tuscany:")) {
-            throw new IllegalArgumentException("Config URI must start with 'tuscany:'");
-        }
-        
-        // make it a URI so java.net.URI can be used to parse it
-        int i = uri.indexOf(":");
-        if (uri.charAt("tuscany:".length()) != '/') {
-            uri = uri.replaceFirst(":", ":/");
-        }
-        if (uri.charAt("tuscany:".length()+1) != '/') {
-            uri = uri.replaceFirst(":/", "://");
-        }
-        URI configURI = URI.create(uri);
-        
-        this.domainName = configURI.getHost();
-        
-        String query = configURI.getQuery();
-        if (query != null && query.length() > 0) {
-            String[] params = query.split("&");
-            Map<String, String> paramMap = new HashMap<String, String>();
-            for (String param : params) {
-                paramMap.put(param.split("=")[0], param.split("=")[1]);
-            }
-            for (String name : paramMap.keySet()) {
-                String value = paramMap.get(name);
-                if ("listen".equals(name)) {
-                    if (value.indexOf(":") == -1) {
-                        this.listenPort = Integer.parseInt(value);   
-                    } else {
-                        String[] addr = value.split(":");
-                        this.bindAddress = addr[0];   
-                        this.listenPort = Integer.parseInt(addr[1]);   
-                    }
-                } else if ("multicast".equals(name)) {
-                    if ("off".equalsIgnoreCase(value)) {
-                        this.multicastDisabled = true;
-                    } else {
-                        if (value.indexOf(":") == -1) {
-                            this.multicastAddress = value;
-                        } else {
-                            String[] addr = value.split(":");
-                            this.multicastAddress = addr[0];
-                            this.multicastPort = Integer.parseInt(addr[1]);
-                        }
-                    }
-                } else if ("password".equals(name)) {
-                    this.password = value;
-                } else if ("remotes".equals(name)) {
-                    String[] ips = value.split(",");
-                    for (String ip : ips) {
-                        if (ip.indexOf(":") == -1) {
-                            remotes.add(ip + ":14820");
-                        } else {
-                            remotes.add(ip);
-                        }
-                    }
-                    if (paramMap.containsKey("multicast")) {
-//                        throw new IllegalArgumentException("Cannot have multicast and remotes (for now)");
-                    } else {
-                        this.multicastDisabled = true;
-                    }
-                }
-            }
-        }
-    }
-
-    public String getDomainName() {
-        return domainName;
-    }
-
-    public String getBindAddress() {
-        return bindAddress;
-    }
-
-    public int getListenPort() {
-        return listenPort;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public boolean isMulticastDisabled() {
-        return multicastDisabled;
-    }
-
-    public String getMulticastAddress() {
-        return multicastAddress;
-    }
-
-    public int getMulticastPort() {
-        return multicastPort;
-    }
-
-    public List<String> getRemotes() {
-        return remotes;
-    }
-    
-    public String toString() {
-        return uri;
-    }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.sca.runtime;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * Utility to parse the config uri string.
+ * 
+ * tuscany:[domainName]?listen=[port|ip:port]]&password=abc&multicast=[off|port|ip:port]&remotes=ip:port,ip:port,...
+
+ * listen - defines the local bind address and port, it defaults to all network interfaces on port 14820 and if that port in use it will try incrementing by one till a free port is found.
+ * password -  is the password other nodes must use to connect to this domain. The default is 'tuscany'.
+ * multicast - defines if multicast discovery is used and if so what multicast ip group and port is used. 
+ *             The default is multicast is off if remotes= is specified (only for now due to a Hazelcast limitation that is planned to be fixed), 
+ *             otherwise if remotes= is not specified then multicast defaults to 224.5.12.10:51482
+ * remotes - a list of ipAddress:port for remote nodes
+ * 
+ * @tuscany.spi.extension.asclient
+ *             
+ */
+public class DomainRegistryURI {
+    
+    private String domainName = "default";
+    private String bindAddress = null; // null means all network adapters
+    private int listenPort = 14820;
+    private String password = "tuscany";
+    private boolean multicastDisabled = false;
+    private String multicastAddress = "224.5.12.10";
+    private int multicastPort = 51482;
+    private List<String> remotes = new ArrayList<String>();
+    private String uri;
+
+    public DomainRegistryURI(String uri) {
+        this.uri = uri;
+        parseURI(uri);
+    }
+
+    private void parseURI(String uri) {
+        if (uri.startsWith("tuscanyclient:")) {
+            uri = uri.replace("tuscanyclient:", "tuscany:");    
+        }
+        
+        if (!uri.startsWith("tuscany:")) {
+            throw new IllegalArgumentException("Config URI must start with 'tuscany:'");
+        }
+        
+        // make it a URI so java.net.URI can be used to parse it
+        int i = uri.indexOf(":");
+        if (uri.charAt("tuscany:".length()) != '/') {
+            uri = uri.replaceFirst(":", ":/");
+        }
+        if (uri.charAt("tuscany:".length()+1) != '/') {
+            uri = uri.replaceFirst(":/", "://");
+        }
+        URI configURI = URI.create(uri);
+        
+        this.domainName = configURI.getHost();
+        
+        String query = configURI.getQuery();
+        if (query != null && query.length() > 0) {
+            String[] params = query.split("&");
+            Map<String, String> paramMap = new HashMap<String, String>();
+            for (String param : params) {
+                paramMap.put(param.split("=")[0], param.split("=")[1]);
+            }
+            for (String name : paramMap.keySet()) {
+                String value = paramMap.get(name);
+                if ("listen".equals(name)) {
+                    if (value.indexOf(":") == -1) {
+                        this.listenPort = Integer.parseInt(value);   
+                    } else {
+                        String[] addr = value.split(":");
+                        this.bindAddress = addr[0];   
+                        this.listenPort = Integer.parseInt(addr[1]);   
+                    }
+                } else if ("multicast".equals(name)) {
+                    if ("off".equalsIgnoreCase(value)) {
+                        this.multicastDisabled = true;
+                    } else {
+                        if (value.indexOf(":") == -1) {
+                            this.multicastAddress = value;
+                        } else {
+                            String[] addr = value.split(":");
+                            this.multicastAddress = addr[0];
+                            this.multicastPort = Integer.parseInt(addr[1]);
+                        }
+                    }
+                } else if ("password".equals(name)) {
+                    this.password = value;
+                } else if ("remotes".equals(name)) {
+                    String[] ips = value.split(",");
+                    for (String ip : ips) {
+                        if (ip.indexOf(":") == -1) {
+                            remotes.add(ip + ":14820");
+                        } else {
+                            remotes.add(ip);
+                        }
+                    }
+                    if (paramMap.containsKey("multicast")) {
+//                        throw new IllegalArgumentException("Cannot have multicast and remotes (for now)");
+                    } else {
+                        this.multicastDisabled = true;
+                    }
+                }
+            }
+        }
+    }
+
+    public String getDomainName() {
+        return domainName;
+    }
+
+    public String getBindAddress() {
+        return bindAddress;
+    }
+
+    public int getListenPort() {
+        return listenPort;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public boolean isMulticastDisabled() {
+        return multicastDisabled;
+    }
+
+    public String getMulticastAddress() {
+        return multicastAddress;
+    }
+
+    public int getMulticastPort() {
+        return multicastPort;
+    }
+
+    public List<String> getRemotes() {
+        return remotes;
+    }
+    
+    public String toString() {
+        return uri;
+    }
+
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistryURI.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistryURI.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeProperties.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeProperties.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeProperties.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeProperties.java Sat Jun  5 05:17:47 2010
@@ -1,31 +1,31 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.    
- */
-
-package org.apache.tuscany.sca.runtime;
-
-import java.util.Properties;
-/**
- * 
- * @tuscany.spi.extension.asclient
- *
- */
-public interface RuntimeProperties {
-    Properties getProperties();
-    void setProperties(Properties properties);
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.sca.runtime;
+
+import java.util.Properties;
+/**
+ * 
+ * @tuscany.spi.extension.asclient
+ *
+ */
+public interface RuntimeProperties {
+    Properties getProperties();
+    void setProperties(Properties properties);
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeProperties.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeProperties.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/Version.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/Version.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/Version.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/Version.java Sat Jun  5 05:17:47 2010
@@ -1,47 +1,47 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.    
- */
-
-package org.apache.tuscany.sca.runtime;
-
-import java.util.ResourceBundle;
-
-public class Version {
-    
-    public static final String VERSION;
-    public static final String REVISION;
-    public static final String BUILDTIME;
-    static {
-        ResourceBundle rb = ResourceBundle.getBundle("org/apache/tuscany/sca/runtime/revision");
-        VERSION = rb.getString("version");
-        REVISION = rb.getString("revision");
-        BUILDTIME = rb.getString("buildtime");
-    }
-
-    public static String getVersion() {
-        return VERSION;
-    }
-    
-    public static String getRevsion() {
-        return REVISION;
-    }
-    
-    public static String getBuildTime() {
-        return BUILDTIME;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.sca.runtime;
+
+import java.util.ResourceBundle;
+
+public class Version {
+    
+    public static final String VERSION;
+    public static final String REVISION;
+    public static final String BUILDTIME;
+    static {
+        ResourceBundle rb = ResourceBundle.getBundle("org/apache/tuscany/sca/runtime/revision");
+        VERSION = rb.getString("version");
+        REVISION = rb.getString("revision");
+        BUILDTIME = rb.getString("buildtime");
+    }
+
+    public static String getVersion() {
+        return VERSION;
+    }
+    
+    public static String getRevsion() {
+        return REVISION;
+    }
+    
+    public static String getBuildTime() {
+        return BUILDTIME;
+    }
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/Version.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/Version.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/core-spi/src/test/java/org/apache/tuscany/sca/runtime/ConfigURITestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-spi/src/test/java/org/apache/tuscany/sca/runtime/ConfigURITestCase.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core-spi/src/test/java/org/apache/tuscany/sca/runtime/ConfigURITestCase.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core-spi/src/test/java/org/apache/tuscany/sca/runtime/ConfigURITestCase.java Sat Jun  5 05:17:47 2010
@@ -1,107 +1,107 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.    
- */
-
-package org.apache.tuscany.sca.runtime;
-
-import java.net.UnknownHostException;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.runtime.DomainRegistryURI;
-import org.junit.Test;
-
-public class ConfigURITestCase {
-
-    @Test
-    public void testInvalidPrefix() throws UnknownHostException {
-        try {
-            new DomainRegistryURI("foo");
-            Assert.fail();
-        } catch (IllegalArgumentException e) {
-            // expected
-        }
-    }
-
-    @Test
-    public void testDomainName() throws UnknownHostException {
-        DomainRegistryURI configURI = new DomainRegistryURI("tuscany:myDomain");
-        Assert.assertEquals("myDomain", configURI.getDomainName());
-        Assert.assertFalse(configURI.isMulticastDisabled());
-    }
-
-    @Test
-    public void testListenAddr() throws UnknownHostException {
-        DomainRegistryURI configURI = new DomainRegistryURI("tuscany:myDomain?listen=4321");
-        Assert.assertEquals("myDomain", configURI.getDomainName());
-        Assert.assertFalse(configURI.isMulticastDisabled());
-        Assert.assertEquals(4321, configURI.getListenPort());
-        Assert.assertNull(configURI.getBindAddress());
-    }
-    @Test
-    public void testListenAddr2() throws UnknownHostException {
-        DomainRegistryURI configURI = new DomainRegistryURI("tuscany:myDomain?listen=1.1.1.1:4321");
-        Assert.assertEquals("myDomain", configURI.getDomainName());
-        Assert.assertFalse(configURI.isMulticastDisabled());
-        Assert.assertEquals(4321, configURI.getListenPort());
-        Assert.assertEquals("1.1.1.1", configURI.getBindAddress());
-    }
-
-    @Test
-    public void testMulticase1() throws UnknownHostException {
-        DomainRegistryURI configURI = new DomainRegistryURI("tuscany:myDomain?multicast=off");
-        Assert.assertEquals("myDomain", configURI.getDomainName());
-        Assert.assertTrue(configURI.isMulticastDisabled());
-    }
-
-    @Test
-    public void testMulticase2() throws UnknownHostException {
-        DomainRegistryURI configURI = new DomainRegistryURI("tuscany:myDomain?multicast=1.2.3.4:67");
-        Assert.assertEquals("myDomain", configURI.getDomainName());
-        Assert.assertFalse(configURI.isMulticastDisabled());
-        Assert.assertEquals("1.2.3.4", configURI.getMulticastAddress());
-        Assert.assertEquals(67, configURI.getMulticastPort());
-    }
-
-    @Test
-    public void testMulticase3() throws UnknownHostException {
-        DomainRegistryURI configURI = new DomainRegistryURI("tuscany:myDomain?multicast=1.2.3.4");
-        Assert.assertEquals("myDomain", configURI.getDomainName());
-        Assert.assertFalse(configURI.isMulticastDisabled());
-        Assert.assertEquals("1.2.3.4", configURI.getMulticastAddress());
-        Assert.assertEquals(51482, configURI.getMulticastPort());
-    }
-
-    @Test
-    public void testPassword() {
-        DomainRegistryURI configURI = new DomainRegistryURI("tuscany:myDomain?password=bla");
-        Assert.assertEquals("myDomain", configURI.getDomainName());
-        Assert.assertEquals("bla", configURI.getPassword());
-    }
-
-    @Test
-    public void testRemotes() throws UnknownHostException {
-        DomainRegistryURI configURI = new DomainRegistryURI("tuscany:myDomain?remotes=1.1.1.1:23,2.2.2.2");
-        Assert.assertEquals("myDomain", configURI.getDomainName());
-        Assert.assertTrue(configURI.isMulticastDisabled());
-        Assert.assertEquals(2, configURI.getRemotes().size());
-        Assert.assertEquals("1.1.1.1:23", configURI.getRemotes().get(0));
-        Assert.assertEquals("2.2.2.2:14820", configURI.getRemotes().get(1));
-    }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.sca.runtime;
+
+import java.net.UnknownHostException;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.runtime.DomainRegistryURI;
+import org.junit.Test;
+
+public class ConfigURITestCase {
+
+    @Test
+    public void testInvalidPrefix() throws UnknownHostException {
+        try {
+            new DomainRegistryURI("foo");
+            Assert.fail();
+        } catch (IllegalArgumentException e) {
+            // expected
+        }
+    }
+
+    @Test
+    public void testDomainName() throws UnknownHostException {
+        DomainRegistryURI configURI = new DomainRegistryURI("tuscany:myDomain");
+        Assert.assertEquals("myDomain", configURI.getDomainName());
+        Assert.assertFalse(configURI.isMulticastDisabled());
+    }
+
+    @Test
+    public void testListenAddr() throws UnknownHostException {
+        DomainRegistryURI configURI = new DomainRegistryURI("tuscany:myDomain?listen=4321");
+        Assert.assertEquals("myDomain", configURI.getDomainName());
+        Assert.assertFalse(configURI.isMulticastDisabled());
+        Assert.assertEquals(4321, configURI.getListenPort());
+        Assert.assertNull(configURI.getBindAddress());
+    }
+    @Test
+    public void testListenAddr2() throws UnknownHostException {
+        DomainRegistryURI configURI = new DomainRegistryURI("tuscany:myDomain?listen=1.1.1.1:4321");
+        Assert.assertEquals("myDomain", configURI.getDomainName());
+        Assert.assertFalse(configURI.isMulticastDisabled());
+        Assert.assertEquals(4321, configURI.getListenPort());
+        Assert.assertEquals("1.1.1.1", configURI.getBindAddress());
+    }
+
+    @Test
+    public void testMulticase1() throws UnknownHostException {
+        DomainRegistryURI configURI = new DomainRegistryURI("tuscany:myDomain?multicast=off");
+        Assert.assertEquals("myDomain", configURI.getDomainName());
+        Assert.assertTrue(configURI.isMulticastDisabled());
+    }
+
+    @Test
+    public void testMulticase2() throws UnknownHostException {
+        DomainRegistryURI configURI = new DomainRegistryURI("tuscany:myDomain?multicast=1.2.3.4:67");
+        Assert.assertEquals("myDomain", configURI.getDomainName());
+        Assert.assertFalse(configURI.isMulticastDisabled());
+        Assert.assertEquals("1.2.3.4", configURI.getMulticastAddress());
+        Assert.assertEquals(67, configURI.getMulticastPort());
+    }
+
+    @Test
+    public void testMulticase3() throws UnknownHostException {
+        DomainRegistryURI configURI = new DomainRegistryURI("tuscany:myDomain?multicast=1.2.3.4");
+        Assert.assertEquals("myDomain", configURI.getDomainName());
+        Assert.assertFalse(configURI.isMulticastDisabled());
+        Assert.assertEquals("1.2.3.4", configURI.getMulticastAddress());
+        Assert.assertEquals(51482, configURI.getMulticastPort());
+    }
+
+    @Test
+    public void testPassword() {
+        DomainRegistryURI configURI = new DomainRegistryURI("tuscany:myDomain?password=bla");
+        Assert.assertEquals("myDomain", configURI.getDomainName());
+        Assert.assertEquals("bla", configURI.getPassword());
+    }
+
+    @Test
+    public void testRemotes() throws UnknownHostException {
+        DomainRegistryURI configURI = new DomainRegistryURI("tuscany:myDomain?remotes=1.1.1.1:23,2.2.2.2");
+        Assert.assertEquals("myDomain", configURI.getDomainName());
+        Assert.assertTrue(configURI.isMulticastDisabled());
+        Assert.assertEquals(2, configURI.getRemotes().size());
+        Assert.assertEquals("1.1.1.1:23", configURI.getRemotes().get(0));
+        Assert.assertEquals("2.2.2.2:14820", configURI.getRemotes().get(1));
+    }
+
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/core-spi/src/test/java/org/apache/tuscany/sca/runtime/ConfigURITestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/core-spi/src/test/java/org/apache/tuscany/sca/runtime/ConfigURITestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/core-spi/src/test/java/org/apache/tuscany/sca/runtime/VersionTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-spi/src/test/java/org/apache/tuscany/sca/runtime/VersionTestCase.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core-spi/src/test/java/org/apache/tuscany/sca/runtime/VersionTestCase.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core-spi/src/test/java/org/apache/tuscany/sca/runtime/VersionTestCase.java Sat Jun  5 05:17:47 2010
@@ -1,36 +1,36 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.runtime;
-
-import org.junit.Test;
-import org.junit.Ignore;
-
-/**
- */
-@Ignore
-public class VersionTestCase {
-
-    @Test
-    public void testRevision() {
-        // Doesn't test much, just that it has been initilized to a number
-        System.out.println(Version.getVersion() + " " + Version.getRevsion() + " " + Version.getBuildTime());
-        Integer.parseInt(Version.getRevsion());
-    }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.runtime;
+
+import org.junit.Test;
+import org.junit.Ignore;
+
+/**
+ */
+@Ignore
+public class VersionTestCase {
+
+    @Test
+    public void testRevision() {
+        // Doesn't test much, just that it has been initilized to a number
+        System.out.println(Version.getVersion() + " " + Version.getRevsion() + " " + Version.getBuildTime());
+        Integer.parseInt(Version.getRevsion());
+    }
+
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/core-spi/src/test/java/org/apache/tuscany/sca/runtime/VersionTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/core-spi/src/test/java/org/apache/tuscany/sca/runtime/VersionTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncJDKInvocationHandler.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncJDKInvocationHandler.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncJDKInvocationHandler.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncJDKInvocationHandler.java Sat Jun  5 05:17:47 2010
@@ -1,101 +1,101 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.    
- */
-
-package org.apache.tuscany.sca.core.invocation.impl;
-
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.concurrent.Future;
-
-import javax.xml.ws.AsyncHandler;
-import javax.xml.ws.Response;
-
-import org.apache.tuscany.sca.invocation.MessageFactory;
-import org.apache.tuscany.sca.runtime.Invocable;
-import org.oasisopen.sca.ServiceReference;
-
-public class AsyncJDKInvocationHandler extends JDKInvocationHandler {
-    
-    private static final long serialVersionUID = 1L;
-
-    public AsyncJDKInvocationHandler(MessageFactory messageFactory, ServiceReference<?> callableReference) {
-        super(messageFactory, callableReference);
-    }
-
-    public AsyncJDKInvocationHandler(MessageFactory messageFactory,
-                                     Class<?> businessInterface,
-                                     Invocable source) {
-        super(messageFactory, businessInterface, source);
-    }
-
-    @Override
-    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
-        if (isAsyncCallback(method)) {
-            return doInvokeAsyncCallback(proxy, method, args);            
-        } else if (isAsyncPoll(method)) {
-            return doInvokeAsyncPoll(proxy, method, args);            
-        } else {
-            return super.invoke(proxy, method, args);
-        }
-    }
-
-    protected boolean isAsyncCallback(Method method) {
-        if (method.getName().endsWith("Async") && (method.getReturnType().isAssignableFrom(Future.class))) {
-            if (method.getParameterTypes().length > 0) {
-                return method.getParameterTypes()[method.getParameterTypes().length-1].isAssignableFrom(AsyncHandler.class);
-            }
-        }
-        return false;
-    }
-
-    protected boolean isAsyncPoll(Method method) {
-        return method.getName().endsWith("Async") && (method.getReturnType().isAssignableFrom(Response.class));
-    }
-
-    protected AsyncResponse doInvokeAsyncPoll(Object proxy, Method asyncMethod, Object[] args) {
-        Object response;
-        boolean isException;
-        try {
-            response = super.invoke(proxy, getNonAsyncMethod(asyncMethod), args);
-            isException = false;
-        } catch (Throwable e) {
-            response = e;
-            isException = true;
-        }
-        return new AsyncResponse(response, isException);
-    }
-
-    private Object doInvokeAsyncCallback(Object proxy, Method asyncMethod, Object[] args) {
-        AsyncHandler handler = (AsyncHandler)args[args.length-1];
-        Response response = doInvokeAsyncPoll(proxy,asyncMethod,Arrays.copyOf(args, args.length-1));
-        handler.handleResponse(response);
-        
-        return null;
-    }
-
-    protected Method getNonAsyncMethod(Method asyncMethod) {
-        String methodName = asyncMethod.getName().substring(0, asyncMethod.getName().length()-5);
-        for (Method m : businessInterface.getMethods()) {
-            if (methodName.equals(m.getName())) {
-                return m;
-            }
-        }
-        throw new IllegalStateException("No non-async method matching async method " + asyncMethod.getName());
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.sca.core.invocation.impl;
+
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.concurrent.Future;
+
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+import org.apache.tuscany.sca.invocation.MessageFactory;
+import org.apache.tuscany.sca.runtime.Invocable;
+import org.oasisopen.sca.ServiceReference;
+
+public class AsyncJDKInvocationHandler extends JDKInvocationHandler {
+    
+    private static final long serialVersionUID = 1L;
+
+    public AsyncJDKInvocationHandler(MessageFactory messageFactory, ServiceReference<?> callableReference) {
+        super(messageFactory, callableReference);
+    }
+
+    public AsyncJDKInvocationHandler(MessageFactory messageFactory,
+                                     Class<?> businessInterface,
+                                     Invocable source) {
+        super(messageFactory, businessInterface, source);
+    }
+
+    @Override
+    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+        if (isAsyncCallback(method)) {
+            return doInvokeAsyncCallback(proxy, method, args);            
+        } else if (isAsyncPoll(method)) {
+            return doInvokeAsyncPoll(proxy, method, args);            
+        } else {
+            return super.invoke(proxy, method, args);
+        }
+    }
+
+    protected boolean isAsyncCallback(Method method) {
+        if (method.getName().endsWith("Async") && (method.getReturnType().isAssignableFrom(Future.class))) {
+            if (method.getParameterTypes().length > 0) {
+                return method.getParameterTypes()[method.getParameterTypes().length-1].isAssignableFrom(AsyncHandler.class);
+            }
+        }
+        return false;
+    }
+
+    protected boolean isAsyncPoll(Method method) {
+        return method.getName().endsWith("Async") && (method.getReturnType().isAssignableFrom(Response.class));
+    }
+
+    protected AsyncResponse doInvokeAsyncPoll(Object proxy, Method asyncMethod, Object[] args) {
+        Object response;
+        boolean isException;
+        try {
+            response = super.invoke(proxy, getNonAsyncMethod(asyncMethod), args);
+            isException = false;
+        } catch (Throwable e) {
+            response = e;
+            isException = true;
+        }
+        return new AsyncResponse(response, isException);
+    }
+
+    private Object doInvokeAsyncCallback(Object proxy, Method asyncMethod, Object[] args) {
+        AsyncHandler handler = (AsyncHandler)args[args.length-1];
+        Response response = doInvokeAsyncPoll(proxy,asyncMethod,Arrays.copyOf(args, args.length-1));
+        handler.handleResponse(response);
+        
+        return null;
+    }
+
+    protected Method getNonAsyncMethod(Method asyncMethod) {
+        String methodName = asyncMethod.getName().substring(0, asyncMethod.getName().length()-5);
+        for (Method m : businessInterface.getMethods()) {
+            if (methodName.equals(m.getName())) {
+                return m;
+            }
+        }
+        throw new IllegalStateException("No non-async method matching async method " + asyncMethod.getName());
+    }
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncJDKInvocationHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncJDKInvocationHandler.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncResponse.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncResponse.java?rev=951651&r1=951650&r2=951651&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncResponse.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncResponse.java Sat Jun  5 05:17:47 2010
@@ -1,68 +1,68 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.    
- */
-
-package org.apache.tuscany.sca.core.invocation.impl;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
-import javax.xml.ws.Response;
-
-public class AsyncResponse implements Response {
-
-    private Object response;
-    private boolean isException;
-
-    public AsyncResponse(Object response, boolean isException) {
-        this.response = response;
-        this.isException = isException;
-    }
-    
-    public Map getContext() {
-        return new HashMap();
-    }
-
-    public boolean cancel(boolean mayInterruptIfRunning) {
-        return false;
-    }
-
-    public Object get() throws InterruptedException, ExecutionException {
-        if (isException) {
-            throw new ExecutionException((Throwable)response);
-        } else {
-            return response;
-        }
-    }
-
-    public Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
-        return get();
-    }
-
-    public boolean isCancelled() {
-        return false;
-    }
-
-    public boolean isDone() {
-        return true;
-    }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.sca.core.invocation.impl;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+import javax.xml.ws.Response;
+
+public class AsyncResponse implements Response {
+
+    private Object response;
+    private boolean isException;
+
+    public AsyncResponse(Object response, boolean isException) {
+        this.response = response;
+        this.isException = isException;
+    }
+    
+    public Map getContext() {
+        return new HashMap();
+    }
+
+    public boolean cancel(boolean mayInterruptIfRunning) {
+        return false;
+    }
+
+    public Object get() throws InterruptedException, ExecutionException {
+        if (isException) {
+            throw new ExecutionException((Throwable)response);
+        } else {
+            return response;
+        }
+    }
+
+    public Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
+        return get();
+    }
+
+    public boolean isCancelled() {
+        return false;
+    }
+
+    public boolean isDone() {
+        return true;
+    }
+
+}

Propchange: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncResponse.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncResponse.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



Mime
View raw message