org.objectweb.proactive.core.body.ft.servers.location
Interface LocationServer

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
FTServer, LocationServerImpl

public interface LocationServer
extends java.rmi.Remote

An object implementing this interface provides location services. This server is an RMI object.

Since:
ProActive 2.2
Author:
cdelbe

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.
 

Method Detail

searchObject

public UniversalBody searchObject(UniqueID id,
                                  UniversalBody oldLocation,
                                  UniqueID caller)
                           throws java.rmi.RemoteException
Return the current location of object id.

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

updateLocation

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

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

getAllLocations

public java.util.ArrayList getAllLocations()
                                    throws java.rmi.RemoteException
Return the list of locations of all registered bodies.

Returns:
the list of locations of all registered bodies.
Throws:
java.rmi.RemoteException

getLocation

public UniversalBody getLocation(UniqueID id)
                          throws java.rmi.RemoteException
Return the current known location of a registred body.

Returns:
the current known location of a registred body.
Throws:
java.rmi.RemoteException

initialize

public void initialize()
                throws java.rmi.RemoteException
Reinit the state of the location server.

Throws:
java.rmi.RemoteException


Copyright 2001-2005 INRIA All Rights Reserved.