Class Registry
- java.lang.Object
-
- org.palladiosimulator.protocom.framework.java.ee.protocol.Registry
-
public final class Registry extends Object
The Registry singleton provides methods for registering and accessing remote objects. Communication with registered objects is performed over HTTP.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Registry
getInstance()
Singleton accessor.String
getLocation()
Gets the location of the registry.Object
lookup(String name)
Returns a stub for an object with the specified name.void
register(String name, Class<?>[] interfaces, String location, String path)
Registers the specified object in the registry.void
setLocation(String location)
Sets the location of the registry.void
unregister(String name)
Removes the specified object from the registry.
-
-
-
Method Detail
-
getInstance
public static Registry getInstance()
Singleton accessor.- Returns:
- the registry instance
-
setLocation
public void setLocation(String location)
Sets the location of the registry.- Parameters:
location
- the location URL of the registry
-
getLocation
public String getLocation()
Gets the location of the registry.- Returns:
- the location of the registry
-
register
public void register(String name, Class<?>[] interfaces, String location, String path) throws RegistryException
Registers the specified object in the registry.- Parameters:
name
- the name under which the object is registeredinterfaces
- the interfaces of the objectlocation
- the location part of the object's URLpath
- the path part of the object's URL- Throws:
RegistryException
- when the object could not be registered
-
unregister
public void unregister(String name) throws RegistryException
Removes the specified object from the registry.- Parameters:
name
- the name of the object to remove- Throws:
RegistryException
- when the object could not be unregistered
-
lookup
public Object lookup(String name) throws RegistryException
Returns a stub for an object with the specified name.- Parameters:
name
- the name under which the object is registered- Returns:
- a stub for the object
- Throws:
RegistryException
- when the object was not registered
-
-