Class Registry
java.lang.Object
org.palladiosimulator.protocom.framework.java.ee.protocol.Registry
The Registry singleton provides methods for registering and accessing remote objects.
Communication with registered objects is performed over HTTP.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Registry
Singleton accessor.Gets the location of the registry.Returns a stub for an object with the specified name.void
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 Details
-
getInstance
Singleton accessor.- Returns:
- the registry instance
-
setLocation
Sets the location of the registry.- Parameters:
location
- the location URL of the registry
-
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
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
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
-