org.hackystat.tickertape.notifier.nabaztag
Class NabaztagNotifier

java.lang.Object
  extended by org.hackystat.tickertape.notifier.nabaztag.NabaztagNotifier

public class NabaztagNotifier
extends java.lang.Object

A notifier for the Nabaztag rabbit.

Author:
Philip Johnson

Constructor Summary
NabaztagNotifier(java.lang.String serialNumber, java.lang.String token, java.util.logging.Logger logger)
          Create a new instance of a Nabaztag notifier.
 
Method Summary
 void notify(java.lang.String message)
          Contacts the Nabaztag and sends the passed string.
 java.lang.String post(java.lang.String url)
          Performs an HTTP POST of the passed URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NabaztagNotifier

public NabaztagNotifier(java.lang.String serialNumber,
                        java.lang.String token,
                        java.util.logging.Logger logger)
Create a new instance of a Nabaztag notifier.

Parameters:
serialNumber - The serial number for this Nabaztag device.
token - The token for this device.
logger - The logger for status messages.
Method Detail

notify

public void notify(java.lang.String message)
Contacts the Nabaztag and sends the passed string. All spaces are replaced by '+'. Also, all '@' are replaced by '+at+'.

Parameters:
message - The message to be sent to the Nabaztag.

post

public java.lang.String post(java.lang.String url)
Performs an HTTP POST of the passed URL.

Parameters:
url - The URL.
Returns:
The response from the server as a string.