All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class replica.NameService

java.lang.Object
   |
   +----replica.NameService

public class NameService
extends Object
This class provides a NameService. It can be registerd all types of objects in the Nameservice.

Version:
1.0
Author:
Markus Jäger

Method Index

 o get(String)
This method retrieves an object from a NameService.
 o getLocalNS()
This method returns the NameService of the current process.
 o getRemoteNS(int)
This method creates a stub to connect a Remote-NameService.
 o getRemoteNS(String, int)
This method creates a stub to connect a Remote-NameService.
 o register(String, Object)
This method binds an object to a name.
 o unregister(String)
This method unbinds a name.

Methods

 o getLocalNS
 public static NameService getLocalNS()
This method returns the NameService of the current process.

Returns:
The NameService
 o getRemoteNS
 public static NameService getRemoteNS(String hostName,
                                       int port)
This method creates a stub to connect a Remote-NameService.

Parameters:
hostName - The name of the computer which contains the Remote-NameService.
port - The port the Remote-NameService is listening on.
Returns:
The stub
 o getRemoteNS
 public static NameService getRemoteNS(int port)
This method creates a stub to connect a Remote-NameService.

Parameters:
port - The port the Remote-NameService is listening on.
Returns:
The stub
 o get
 public Object get(String name) throws UnknownObjectException
This method retrieves an object from a NameService.

Parameters:
name - The name of the object.
Returns:
The object
Throws: UnknownObjectException
Thrown if no object is bound to the name.
 o register
 public void register(String name,
                      Object obj)
This method binds an object to a name.

Parameters:
name - The name
The - object
 o unregister
 public void unregister(String name)
This method unbinds a name.

Parameters:
name - The name

All Packages  Class Hierarchy  This Package  Previous  Next  Index