org.objectweb.dsrg.sofa.dockregistry
Class DeploymentDockRegistryImpl
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.objectweb.dsrg.sofa.dockregistry.DeploymentDockRegistryImpl
- All Implemented Interfaces:
- java.io.Serializable, java.rmi.Remote, DeploymentDockRegistry
public class DeploymentDockRegistryImpl
- extends java.rmi.server.UnicastRemoteObject
- implements DeploymentDockRegistry
Implementation of the Deployment Dock Registry
- See Also:
- Serialized Form
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
DeploymentDockRegistryImpl
public DeploymentDockRegistryImpl(java.rmi.registry.Registry registry)
throws java.lang.Exception
- The constructor
- Parameters:
registry
- The registry where the DDR itself should be registered
- Throws:
java.lang.Exception
register
public boolean register(DeploymentDockRegistryClient deplDock,
java.lang.String name)
throws java.rmi.RemoteException
- Registers a new running dock
- Specified by:
register
in interface DeploymentDockRegistry
- Parameters:
deplDock
- The deployment dockname
- Its name
- Returns:
- True if the registration was successfull
- Throws:
java.rmi.RemoteException
unregister
public boolean unregister(java.lang.String name)
throws java.rmi.RemoteException
- Unregisters a deployment dock
- Specified by:
unregister
in interface DeploymentDockRegistry
- Parameters:
name
- The name of the dock to unregister
- Returns:
- True if the unregistration was successfull
- Throws:
java.rmi.RemoteException
lookup
public DeploymentDockRegistryClient lookup(java.lang.String name)
throws java.rmi.RemoteException,
DockNotFoundException
- Finds a deployment dock and return a reference to it
- Specified by:
lookup
in interface DeploymentDockRegistry
- Parameters:
name
- The name of the deployment dock to look up
- Returns:
- A reference to the given deployment dock
- Throws:
java.rmi.RemoteException
DockNotFoundException
getAllNames
public java.lang.String[] getAllNames()
throws java.rmi.RemoteException
- Gets the names of all registered (and reachable) deployment docks
- Specified by:
getAllNames
in interface DeploymentDockRegistry
- Returns:
- An array of all registered docks
- Throws:
java.rmi.RemoteException