org.objectweb.david.libs.services.naming
Class Directory
java.lang.Object
|
+--org.omg.CORBA.portable.ObjectImpl
|
+--org.objectweb.david.apis.services.naming._NameServerImplBase
|
+--org.objectweb.david.libs.services.naming.Directory
- All Implemented Interfaces:
- IDLEntity, InvokeHandler, NameServer, NameServerOperations, Object, Serializable
- public class Directory
- extends _NameServerImplBase
Implementation of a
simple name server.
Usage: java org.objectweb.david.libs.services.naming.Directory [options]
where [options] are:
-file filename indicates a file name where the name server IOR
should be written
-port port-number indicates a specific port number for the name
server. If not specified, the default value is specified under the name
"/david/naming/default_port" in the bootstrap context. If port = 0,
a connection
is opened for the name server on an unused port.
-verbose causes the name server to print messages to stdout when
interfaces are added, requested or removed.
This name server uses IIOP to interact with clients.
- See Also:
- Serialized Form
|
Method Summary |
Object |
get(String name)
Returns the interface registered under the name 'name' in the name server. |
static void |
main(String[] args)
Launches the name server. |
boolean |
put(String name,
Object itf,
boolean replace)
Registers interface 'itf' under the name 'name' in the name server. |
void |
remove(String name)
Removes the interface registered under the name 'name' from the name server. |
| Methods inherited from class org.omg.CORBA.portable.ObjectImpl |
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_interface, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString |
| Methods inherited from interface org.omg.CORBA.Object |
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_interface, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override |
main
public static void main(String[] args)
- Launches the name server.
- Parameters:
args - Name Server options.
put
public boolean put(String name,
Object itf,
boolean replace)
- Registers interface 'itf' under the name 'name' in the name server.
- Overrides:
put in class _NameServerImplBase
- Parameters:
name - the name of the interface;itf - the interface to register.replace - true means replace any existing interface registered under
the same name, if any.- Returns:
- true if the interface could be added to the name server,
false otherwise.
remove
public void remove(String name)
- Removes the interface registered under the name 'name' from the name server.
- Overrides:
remove in class _NameServerImplBase
- Parameters:
name - the name of the interface;
get
public Object get(String name)
- Returns the interface registered under the name 'name' in the name server.
- Overrides:
get in class _NameServerImplBase
- Parameters:
name - the name of the interface;- Returns:
- the registered interface, 'null' if 'name' is not associated
with any interface in the name server.