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 Details

    • 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 registered
      interfaces - the interfaces of the object
      location - the location part of the object's URL
      path - 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