org.objectweb.proactive.core.body.ft.servers.location
Class LocationServerImpl

java.lang.Object
  extended byorg.objectweb.proactive.core.body.ft.servers.location.LocationServerImpl
All Implemented Interfaces:
LocationServer, java.rmi.Remote

public class LocationServerImpl
extends java.lang.Object
implements LocationServer

An implementation of the LocationServer

Author:
cdelbe

Field Summary
protected static org.apache.log4j.Logger logger
           
 
Constructor Summary
LocationServerImpl(FTServer server)
           
 
Method Summary
 java.util.ArrayList getAllLocations()
          Return the list of locations of all registered bodies.
 UniversalBody getLocation(UniqueID id)
          Return the current known location of a registred body.
 void initialize()
          Reinit the state of the location server.
 UniversalBody searchObject(UniqueID id, UniversalBody oldLocation, UniqueID caller)
          Return the current location of object id.
 void updateLocation(UniqueID id, UniversalBody newLocation)
          Set the new location of the active object identified by id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger
Constructor Detail

LocationServerImpl

public LocationServerImpl(FTServer server)
Method Detail

searchObject

public UniversalBody searchObject(UniqueID id,
                                  UniversalBody oldLocation,
                                  UniqueID caller)
                           throws java.rmi.RemoteException
Description copied from interface: LocationServer
Return the current location of object id.

Specified by:
searchObject in interface LocationServer
Parameters:
id - Unique id of the searched object
oldLocation - last known location of the searched object
Returns:
the new location of the searched object
Throws:
java.rmi.RemoteException
See Also:
LocationServer.searchObject(org.objectweb.proactive.core.UniqueID, org.objectweb.proactive.core.body.UniversalBody, org.objectweb.proactive.core.UniqueID)

updateLocation

public void updateLocation(UniqueID id,
                           UniversalBody newLocation)
                    throws java.rmi.RemoteException
Description copied from interface: LocationServer
Set the new location of the active object identified by id. Call register in the recovery process.

Specified by:
updateLocation in interface LocationServer
Parameters:
id - id of the caller
newLocation - new location of the caller. If this location is null, the body id is removed from the location table.
Throws:
java.rmi.RemoteException
See Also:
LocationServer.updateLocation(org.objectweb.proactive.core.UniqueID, org.objectweb.proactive.core.body.UniversalBody)

getAllLocations

public java.util.ArrayList getAllLocations()
                                    throws java.rmi.RemoteException
Description copied from interface: LocationServer
Return the list of locations of all registered bodies.

Specified by:
getAllLocations in interface LocationServer
Returns:
the list of locations of all registered bodies.
Throws:
java.rmi.RemoteException
See Also:
LocationServer.getAllLocations()

getLocation

public UniversalBody getLocation(UniqueID id)
                          throws java.rmi.RemoteException
Description copied from interface: LocationServer
Return the current known location of a registred body.

Specified by:
getLocation in interface LocationServer
Returns:
the current known location of a registred body.
Throws:
java.rmi.RemoteException
See Also:
LocationServer.getLocation(org.objectweb.proactive.core.UniqueID)

initialize

public void initialize()
                throws java.rmi.RemoteException
Description copied from interface: LocationServer
Reinit the state of the location server.

Specified by:
initialize in interface LocationServer
Throws:
java.rmi.RemoteException
See Also:
LocationServer.initialize()


Copyright 2001-2005 INRIA All Rights Reserved.