summaryrefslogtreecommitdiffstats
path: root/branches/sca-equinox/modules/host-rmi/src/main/java/org/apache/tuscany/sca/host/rmi/ExtensibleRMIHost.java
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-09-29 00:50:22 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-09-29 00:50:22 +0000
commit2a7966363348acb2c6f6ad6eaa2308fd4da1f1ae (patch)
tree60890a3079724b0b7752c2997102e0b9e487ea15 /branches/sca-equinox/modules/host-rmi/src/main/java/org/apache/tuscany/sca/host/rmi/ExtensibleRMIHost.java
parent4f70240f137fdb1bfe4f5aeb26b664162310958e (diff)
Ported from trunk and simplified. Support the rmi:// uri for binding.rmi.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@699932 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/modules/host-rmi/src/main/java/org/apache/tuscany/sca/host/rmi/ExtensibleRMIHost.java')
-rw-r--r--branches/sca-equinox/modules/host-rmi/src/main/java/org/apache/tuscany/sca/host/rmi/ExtensibleRMIHost.java26
1 files changed, 6 insertions, 20 deletions
diff --git a/branches/sca-equinox/modules/host-rmi/src/main/java/org/apache/tuscany/sca/host/rmi/ExtensibleRMIHost.java b/branches/sca-equinox/modules/host-rmi/src/main/java/org/apache/tuscany/sca/host/rmi/ExtensibleRMIHost.java
index 32fe6c2deb..29b4e195c7 100644
--- a/branches/sca-equinox/modules/host-rmi/src/main/java/org/apache/tuscany/sca/host/rmi/ExtensibleRMIHost.java
+++ b/branches/sca-equinox/modules/host-rmi/src/main/java/org/apache/tuscany/sca/host/rmi/ExtensibleRMIHost.java
@@ -35,39 +35,25 @@ public class ExtensibleRMIHost implements RMIHost {
this.rmiHosts = rmiHosts;
}
- public void registerService(String serviceName, int port, Remote serviceObject) throws RMIHostException, RMIHostRuntimeException {
+ public void registerService(String uri, Remote serviceObject) throws RMIHostException, RMIHostRuntimeException {
if (rmiHosts.getRMIHosts().isEmpty()) {
throw new RMIHostException("No RMI host available");
}
- rmiHosts.getRMIHosts().get(0).registerService(serviceName, port, serviceObject);
+ rmiHosts.getRMIHosts().get(0).registerService(uri, serviceObject);
}
- public Remote findService(String host, String port, String svcName) throws RMIHostException, RMIHostRuntimeException {
+ public void unregisterService(String uri) throws RMIHostException, RMIHostRuntimeException {
if (rmiHosts.getRMIHosts().isEmpty()) {
throw new RMIHostException("No RMI host available");
}
- return rmiHosts.getRMIHosts().get(0).findService(host, port, svcName);
+ rmiHosts.getRMIHosts().get(0).unregisterService(uri);
}
- public void registerService(String serviceName, Remote serviceObject) throws RMIHostException, RMIHostRuntimeException {
+ public Remote findService(String uri) throws RMIHostException, RMIHostRuntimeException {
if (rmiHosts.getRMIHosts().isEmpty()) {
throw new RMIHostException("No RMI host available");
}
- rmiHosts.getRMIHosts().get(0).registerService(serviceName, serviceObject);
+ return rmiHosts.getRMIHosts().get(0).findService(uri);
}
- public void unregisterService(String serviceName) throws RMIHostException, RMIHostRuntimeException {
- if (rmiHosts.getRMIHosts().isEmpty()) {
- throw new RMIHostException("No RMI host available");
- }
- rmiHosts.getRMIHosts().get(0).unregisterService(serviceName);
- }
-
- public void unregisterService(String serviceName, int port) throws RMIHostException, RMIHostRuntimeException {
- if (rmiHosts.getRMIHosts().isEmpty()) {
- throw new RMIHostException("No RMI host available");
- }
- rmiHosts.getRMIHosts().get(0).unregisterService(serviceName, port);
- }
-
}