|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.placelab.client.PlacelabWithProxy
A useful class that manages a spotter and a set of trackers for the program.
Many simple application can use this as their core class. This object can be
constructed by explicitly passing in spotters and tracker, or by letting it
create default spotters and trackers. This object can also be configured to
either ping the spotter and trackers automatically at a predetermined
interval, or rely on manual pinging via the pulse method. This object also
has a side effect that it creates an
org.placelab.proxy.ProxyServletEnginethat is active for the duration
of the execution. It is important to call the createProxy() method to ensure
that the proxy object is active.
| Field Summary | |
static int |
spotterDelay
|
| Constructor Summary | |
PlacelabWithProxy()
This constructor creates a PlacelabWithProxy object that with a WiFiSpotterand a
org.placelab.tracker.CentroidTracker. |
|
PlacelabWithProxy(Spotter _spotter,
Tracker tracker,
Mapper mapper,
int spotterDelay)
This constructor allows all arguments (spotters, trackers and pulse frequency) to be passed in. |
|
PlacelabWithProxy(Tracker tracker,
Mapper mapper,
int spotterDelay)
This constructor is similar to the no-arg constructor, except that it uses the tracker passed in and the pulse frequency that is passed in. |
|
| Method Summary | |
void |
addEstimateListener(EstimateListener listener)
Add a listener that will be called back when the tracker's position estimates change |
void |
addShutdownListener(ShutdownListener listener)
Allows an application to register to find out when the place lab infrastructure is being shut down. |
void |
createProxy()
Start up the http proxy. |
Mapper |
getMapper()
|
Spotter |
getSpotter()
|
Tracker |
getTracker()
Return the tracker the PlaceLab object is maintaining |
static void |
main(java.lang.String[] args)
This entry point causes a default PlacelabWithProxy object to be created at which point the program goes idle and does not exit. |
Measurement |
pulse()
|
void |
run()
This method implements the core execution loop for the pulsing. |
void |
shutdown()
Shuts the proxy and pulsing off. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static int spotterDelay
| Constructor Detail |
public PlacelabWithProxy()
throws java.io.IOException
WiFiSpotterand a
org.placelab.tracker.CentroidTracker. This object
will pulse the spotter once every 2000 ms by default.
public PlacelabWithProxy(Tracker tracker,
Mapper mapper,
int spotterDelay)
throws java.io.IOException
public PlacelabWithProxy(Spotter _spotter,
Tracker tracker,
Mapper mapper,
int spotterDelay)
throws java.io.IOException
| Method Detail |
public void createProxy()
public void addEstimateListener(EstimateListener listener)
public Tracker getTracker()
public Mapper getMapper()
public Spotter getSpotter()
public static void main(java.lang.String[] args)
org.placelab.proxy.ProxyServletEnginemakes this a good entry
point for applications with no local UI that want to make use of the web
proxy and servlet features.
public void shutdown()
shutdown in interface ShutdownListenerpublic void addShutdownListener(ShutdownListener listener)
public Measurement pulse()
public void run()
run in interface java.lang.Runnable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||