diff options
author | wjaniszewski <wjaniszewski@13f79535-47bb-0310-9956-ffa450edef68> | 2008-08-01 22:27:33 +0000 |
---|---|---|
committer | wjaniszewski <wjaniszewski@13f79535-47bb-0310-9956-ffa450edef68> | 2008-08-01 22:27:33 +0000 |
commit | 13b7f97dd44734f792038d514a06bb276c7ba0dc (patch) | |
tree | 9f014682b36b8e2c9c418e297db81315f30fd394 /java/sca/modules/host-corba/src/main | |
parent | 79e1414fe9d4ee6201e0455166de26c9a2e1c8a3 (diff) |
1. SCA default binding over CORBA - now transient name server is beeing created automatically for localhost service bindings. 2. Code cleanup
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@681871 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/host-corba/src/main')
2 files changed, 27 insertions, 3 deletions
diff --git a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHost.java b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHost.java index f68fb21737..17e9566e17 100644 --- a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHost.java +++ b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHost.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.host.corba; -import org.omg.CORBA.ORB; import org.omg.CORBA.Object; /** @@ -29,6 +28,7 @@ public interface CorbaHost { /** * Registers servant in name server. + * * @param uri corbaname URI * @param serviceObject * @throws CorbaHostException @@ -37,18 +37,35 @@ public interface CorbaHost { /** * Removes servant from name server + * * @param orb The ORB instance * @param name binding name * @throws CorbaHostException */ void unregisterServant(String uri) throws CorbaHostException; - + /** * Gets reference to object + * * @param name binding name * @return objects reference * @throws CorbaHostException */ Object lookup(String uri) throws CorbaHostException; + /** + * Provides name server under given port. + * + * @param port + * @throws CorbaHostException + */ + void createLocalNameServer(int port) throws CorbaHostException; + + /** + * Stops name server but only if every client released previously created NS. + * + * @param port + * @throws CorbaHostException + */ + void releaseLocalNameServer(int port) throws CorbaHostException; } diff --git a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java index 73471d658a..1c36fca57d 100644 --- a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java +++ b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.host.corba; -import org.omg.CORBA.ORB; import org.omg.CORBA.Object; /** @@ -52,4 +51,12 @@ public class ExtensibleCorbaHost implements CorbaHost { return hosts.getCorbaHosts().get(0); } + public void createLocalNameServer(int port) throws CorbaHostException { + getCorbaHost().createLocalNameServer(port); + } + + public void releaseLocalNameServer(int port) throws CorbaHostException { + getCorbaHost().releaseLocalNameServer(port); + } + } |