You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2006/08/29 12:47:33 UTC

svn commit: r438043 - in /incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi: ./ RMIHost.java RMIHostAdmin.java RMIHostException.java RMIHostRuntimeException.java

Author: antelder
Date: Tue Aug 29 03:47:33 2006
New Revision: 438043

URL: http://svn.apache.org/viewvc?rev=438043&view=rev
Log:
TUSCANY-668, apply patches from Venkat
- Decision on moving RMIHost related classes to host-api project. See disccusion in http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg07077.html
- Removing these classes from the sca-spi project
- Abstraction of Exception classes as inheriting from Tuscany Exception classes
- Repackage of RMIHostImpl within the RMIBinding extension implementation
- Fixing of bug in RMIService. 

Added:
    incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/
    incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHost.java   (with props)
    incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostAdmin.java   (with props)
    incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostException.java   (with props)
    incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostRuntimeException.java   (with props)

Added: incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHost.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHost.java?rev=438043&view=auto
==============================================================================
--- incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHost.java (added)
+++ incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHost.java Tue Aug 29 03:47:33 2006
@@ -0,0 +1,49 @@
+/*
+ * 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.host.rmi;
+
+import java.rmi.Remote;
+
+/* RMI Service hosting interface to be implemented by host environments that allows SCA Components
+ * to register RMI Services to handle inbound service requests over RMI to SCA Components
+ */
+
+public interface RMIHost {
+    final int RMI_DEFAULT_PORT = 1099;
+
+    // registers an RMI service with the given name and port
+    void registerService(String serviceName, int port, Remote serviceObject) throws RMIHostException,
+                                                                                   RMIHostRuntimeException;
+
+    // registers an RMI service with the given name and default port (1099)
+    void registerService(String serviceName, Remote serviceObject) throws RMIHostException,
+                                                                         RMIHostRuntimeException;
+
+    // unregister a service registered under the given service name and port number
+    void unregisterService(String serviceName, int port) throws RMIHostException,
+                                                               RMIHostRuntimeException;
+
+    // unregister a service registered under the given service name and defalut port number (1099)
+    void unregisterService(String serviceName) throws RMIHostException,
+                                                     RMIHostRuntimeException;
+
+    //find a remote service hosted on the given host, port and service name
+    Remote findService(String host, String port, String svcName) throws RMIHostException,
+                                                                       RMIHostRuntimeException;
+}

Propchange: incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHost.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHost.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostAdmin.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostAdmin.java?rev=438043&view=auto
==============================================================================
--- incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostAdmin.java (added)
+++ incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostAdmin.java Tue Aug 29 03:47:33 2006
@@ -0,0 +1,39 @@
+/*
+ * 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.host.rmi;
+
+import java.rmi.registry.Registry;
+import java.util.List;
+
+/* RMI Service hosting Admin Interface to be implemented by host environments that allows SCA Components
+ * to register RMI Services to handle inbound service requests over RMI to SCA Components.  This interface 
+ * can be used by admin functions to obtain information on RMI registries started and running in the host
+ * environment
+ */
+
+public interface RMIHostAdmin {
+    //gets all RMI registries running on the host.  Each element of the list is an object of type
+    //java.rmi.registry
+    List getAllRegistries() throws RMIHostRuntimeException;
+    
+    //gets a registry that is running at a particular port
+    Registry getRegistry(int port) throws RMIHostRuntimeException;
+    
+    //more methods to be added
+}

Propchange: incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostAdmin.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostAdmin.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostException.java?rev=438043&view=auto
==============================================================================
--- incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostException.java (added)
+++ incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostException.java Tue Aug 29 03:47:33 2006
@@ -0,0 +1,39 @@
+/*
+ * 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.host.rmi;
+
+import org.apache.tuscany.api.TuscanyException;
+
+/**
+ * This exception will relate to situations where the end applicaition's
+ * input is the cause of the exception
+ *
+ */
+public class RMIHostException extends TuscanyException {
+    
+    private static final long serialVersionUID = -1L;
+    
+    public RMIHostException(String message) {
+        super(message);
+    }
+    
+    public RMIHostException(Throwable e) {
+        super(e);
+    }
+}

Propchange: incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostException.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostRuntimeException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostRuntimeException.java?rev=438043&view=auto
==============================================================================
--- incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostRuntimeException.java (added)
+++ incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostRuntimeException.java Tue Aug 29 03:47:33 2006
@@ -0,0 +1,38 @@
+/*
+ * 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.host.rmi;
+
+import org.apache.tuscany.api.TuscanyRuntimeException;
+
+/**
+ * This exception relates to cases where there is a problem with the
+ * Host runtime
+ *
+ */
+public class RMIHostRuntimeException extends TuscanyRuntimeException {
+    private static final long serialVersionUID = -1L;
+    public RMIHostRuntimeException(String message) {
+        super(message);
+    }
+    
+    public RMIHostRuntimeException(Throwable e) {
+        super(e);
+    }
+
+}

Propchange: incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostRuntimeException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/host-api/src/main/java/org/apache/tuscany/host/rmi/RMIHostRuntimeException.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



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