net.spy.temperature
Class SpyTemp

java.lang.Object
  extended bynet.spy.temperature.SpyTemp

public class SpyTemp
extends Object

A simple interface to my temperature servlet at home.


Constructor Summary
SpyTemp()
          Get a SpyTemp object reading from the default temperature base.
SpyTemp(String tempBase)
          Get a SpyTemp object reading from the default temperature base.
 
Method Summary
 double getTemp(String which)
          Get the current reading for a given thermometer.
 String[] listTherms()
          List all available thermometers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpyTemp

public SpyTemp()
Get a SpyTemp object reading from the default temperature base.


SpyTemp

public SpyTemp(String tempBase)
Get a SpyTemp object reading from the default temperature base.

Parameters:
tempBase - URL to the net.spy.temperature.Temperature servlet that will be answering temperature requests.
Method Detail

listTherms

public String[] listTherms()
                    throws Exception
List all available thermometers.

Returns:
list of available thermometers
Throws:
Exception - if there's a failure getting the list.

getTemp

public double getTemp(String which)
               throws Exception
Get the current reading for a given thermometer.

Parameters:
which - which thermometer (from the above list) to read
Throws:
Exception - if there's a problem getting the reading.