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
-
get(String)
- This method retrieves an object from a NameService.
-
getLocalNS()
- This method returns the NameService of the current process.
-
getRemoteNS(int)
- This method creates a stub to connect a Remote-NameService.
-
getRemoteNS(String, int)
- This method creates a stub to connect a Remote-NameService.
-
register(String, Object)
- This method binds an object to a name.
-
unregister(String)
- This method unbinds a name.
getLocalNS
public static NameService getLocalNS()
- This method returns the NameService of the current process.
- Returns:
- The NameService
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
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
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.
register
public void register(String name,
Object obj)
- This method binds an object to a name.
- Parameters:
- name - The name
- The - object
unregister
public void unregister(String name)
- This method unbinds a name.
- Parameters:
- name - The name
All Packages Class Hierarchy This Package Previous Next Index