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/25 13:06:43 UTC

svn commit: r436753 - in /incubator/tuscany/java/sca/spi/src/main/java/org/apache/tuscany/spi/host: RMIHost.java RMIHostAdmin.java RemoteServiceException.java

Author: antelder
Date: Fri Aug 25 04:06:42 2006
New Revision: 436753

URL: http://svn.apache.org/viewvc?rev=436753&view=rev
Log:
TUSCANY-611, add the RMIHost interfaces

Added:
    incubator/tuscany/java/sca/spi/src/main/java/org/apache/tuscany/spi/host/RMIHost.java   (with props)
    incubator/tuscany/java/sca/spi/src/main/java/org/apache/tuscany/spi/host/RMIHostAdmin.java   (with props)
    incubator/tuscany/java/sca/spi/src/main/java/org/apache/tuscany/spi/host/RemoteServiceException.java   (with props)

Added: incubator/tuscany/java/sca/spi/src/main/java/org/apache/tuscany/spi/host/RMIHost.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/spi/src/main/java/org/apache/tuscany/spi/host/RMIHost.java?rev=436753&view=auto
==============================================================================
--- incubator/tuscany/java/sca/spi/src/main/java/org/apache/tuscany/spi/host/RMIHost.java (added)
+++ incubator/tuscany/java/sca/spi/src/main/java/org/apache/tuscany/spi/host/RMIHost.java Fri Aug 25 04:06:42 2006
@@ -0,0 +1,44 @@
+/*
+ * 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.spi.host;
+
+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 {
+    public static final int RMI_DEFAULT_PORT = 1099;
+
+    // registers an RMI service with the given name and port
+    public void registerService(String serviceName, int port, Remote serviceObject) throws RemoteServiceException;
+
+    // registers an RMI service with the given name and default port (1099)
+    public void registerService(String serviceName, Remote serviceObject) throws RemoteServiceException;
+
+    // unregister a service registered under the given service name and port number
+    public void unregisterService(String serviceName, int port) throws RemoteServiceException;
+
+    // unregister a service registered under the given service name and defalut port number (1099)
+    public void unregisterService(String serviceName) throws RemoteServiceException;
+
+    // find a remote service hosted on the given host, port and service name
+    public Remote findService(String host, String port, String svcName) throws RemoteServiceException;
+}

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

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

Added: incubator/tuscany/java/sca/spi/src/main/java/org/apache/tuscany/spi/host/RMIHostAdmin.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/spi/src/main/java/org/apache/tuscany/spi/host/RMIHostAdmin.java?rev=436753&view=auto
==============================================================================
--- incubator/tuscany/java/sca/spi/src/main/java/org/apache/tuscany/spi/host/RMIHostAdmin.java (added)
+++ incubator/tuscany/java/sca/spi/src/main/java/org/apache/tuscany/spi/host/RMIHostAdmin.java Fri Aug 25 04:06:42 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.spi.host;
+
+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
+    public List getAllRegistries() throws RemoteServiceException;
+
+    // gets a registry that is running at a particular port
+    public Registry getRegistry(int port) throws RemoteServiceException;
+
+    // more methods to be added
+}

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

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

Added: incubator/tuscany/java/sca/spi/src/main/java/org/apache/tuscany/spi/host/RemoteServiceException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/spi/src/main/java/org/apache/tuscany/spi/host/RemoteServiceException.java?rev=436753&view=auto
==============================================================================
--- incubator/tuscany/java/sca/spi/src/main/java/org/apache/tuscany/spi/host/RemoteServiceException.java (added)
+++ incubator/tuscany/java/sca/spi/src/main/java/org/apache/tuscany/spi/host/RemoteServiceException.java Fri Aug 25 04:06:42 2006
@@ -0,0 +1,30 @@
+/*
+ * 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.spi.host;
+
+public class RemoteServiceException extends Exception {
+    public RemoteServiceException(String message) {
+        super(message);
+    }
+
+    public RemoteServiceException(Exception e) {
+        super(e);
+    }
+
+}

Propchange: incubator/tuscany/java/sca/spi/src/main/java/org/apache/tuscany/spi/host/RemoteServiceException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/spi/src/main/java/org/apache/tuscany/spi/host/RemoteServiceException.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