com.notifo.client
Class NotifoHttpClient

java.lang.Object
  extended by com.notifo.client.NotifoHttpClient
All Implemented Interfaces:
NotifoClient

public class NotifoHttpClient
extends Object
implements NotifoClient

Author:
sscanlon

Constructor Summary
NotifoHttpClient(String userName, String apiKey)
          Construct a client with a username and apikey.
 
Method Summary
 NotifoResponse sendMessage(NotifoMessage message)
          Send a message with the parameters in NotifoMessage
 NotifoResponse sendMessage(String messageBody)
          Send a message to the default user (you)
 NotifoResponse sendMessage(String to, String messageBody)
          Send a message to a particular user
 void setHttpClient(org.apache.http.client.HttpClient httpClient)
          Override the default http client
 NotifoResponse subscribeUser(String userName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotifoHttpClient

public NotifoHttpClient(String userName,
                        String apiKey)
Construct a client with a username and apikey. "username" will be the default recipient of messages

Parameters:
userName -
apiKey -
Method Detail

sendMessage

public NotifoResponse sendMessage(String messageBody)
                           throws NotifoException
Description copied from interface: NotifoClient
Send a message to the default user (you)

Specified by:
sendMessage in interface NotifoClient
Throws:
NotifoException

sendMessage

public NotifoResponse sendMessage(String to,
                                  String messageBody)
                           throws NotifoException
Description copied from interface: NotifoClient
Send a message to a particular user

Specified by:
sendMessage in interface NotifoClient
Throws:
NotifoException

sendMessage

public NotifoResponse sendMessage(NotifoMessage message)
                           throws NotifoException
Send a message with the parameters in NotifoMessage

Specified by:
sendMessage in interface NotifoClient
Returns:
Throws:
NotifoException

subscribeUser

public NotifoResponse subscribeUser(String userName)
                             throws NotifoException
Specified by:
subscribeUser in interface NotifoClient
Returns:
Throws:
NotifoException

setHttpClient

public void setHttpClient(org.apache.http.client.HttpClient httpClient)
Override the default http client

Parameters:
httpClient -


Copyright © 2011. All Rights Reserved.