org.objectweb.proactive.ext.util
Class SimpleLocationServer

java.lang.Object
  extended by org.objectweb.proactive.ext.util.SimpleLocationServer
All Implemented Interfaces:
Active, LocationServer, RunActive

public class SimpleLocationServer
extends java.lang.Object
implements RunActive, LocationServer

An implementation of a Location Server


Constructor Summary
SimpleLocationServer()
           
SimpleLocationServer(java.lang.String url)
           
 
Method Summary
static void main(java.lang.String[] args)
           
protected  java.lang.String normalizeURL(java.lang.String url)
           
protected  void register()
           
 void runActivity(Body body)
          First register with the specified url Then wait for request
 UniversalBody searchObject(UniqueID id)
          Return a reference to the remote body if available.
 void updateLocation(UniqueID i, UniversalBody s)
          Update the location for the mobile object s with id
 void updateLocation(UniqueID i, UniversalBody s, int version)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleLocationServer

public SimpleLocationServer()

SimpleLocationServer

public SimpleLocationServer(java.lang.String url)
Method Detail

updateLocation

public void updateLocation(UniqueID i,
                           UniversalBody s)
Update the location for the mobile object s with id

Specified by:
updateLocation in interface LocationServer

searchObject

public UniversalBody searchObject(UniqueID id)
Return a reference to the remote body if available. Return null otherwise

Specified by:
searchObject in interface LocationServer

runActivity

public void runActivity(Body body)
First register with the specified url Then wait for request

Specified by:
runActivity in interface RunActive
Parameters:
body - the body of the active object being started

normalizeURL

protected java.lang.String normalizeURL(java.lang.String url)

register

protected void register()

main

public static void main(java.lang.String[] args)

updateLocation

public void updateLocation(UniqueID i,
                           UniversalBody s,
                           int version)
Specified by:
updateLocation in interface LocationServer


Copyright 2001-2007 INRIA All Rights Reserved.