org.superfeedr
Class Superfeedr

java.lang.Object
  extended by org.superfeedr.Superfeedr

public class Superfeedr
extends java.lang.Object

The SuperFeedr Class is the entry point to access the superFeedr XMPP functionnalities. To use this Class, you should already have a superfeedr account.

Author:
thomas RICARD

Constructor Summary
Superfeedr(java.lang.String jid, java.lang.String password, java.lang.String server)
          Constructor of a superfeedr instance that will connect to the specified server using the jid and password as credentials
 
Method Summary
 void addOnNotificationHandler(OnNotificationHandler handler)
          Add handler as a notification handler on this superfeedr.
 void close()
          This method is used to close the connection to the Superfeer Server.
static java.util.Date convertDate(java.lang.String date)
          This class converts a ISO 8601 date represented as a string to a java Date Object
 java.util.List<java.net.URL> getSubscriptionList()
          This method is used to retreive the feeds URL you subscribed to.
 void removeOnNotificationHandler(OnNotificationHandler handler)
          Try to remove the specified handler from the list of notification handler
 void subscribe(java.util.List<java.net.URL> feedUrls, onSubUnsubscriptionHandler handler)
          Call this method to add subscription to your superfeedr account.
 void unsubscribe(java.util.List<java.net.URL> feedUrls, onSubUnsubscriptionHandler handler)
          Call this method to remove subscription from your superfeedr account.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Superfeedr

public Superfeedr(java.lang.String jid,
                  java.lang.String password,
                  java.lang.String server)
           throws org.jivesoftware.smack.XMPPException
Constructor of a superfeedr instance that will connect to the specified server using the jid and password as credentials

Parameters:
jid - the jid you want to connect with
password - the password to use
server - the server you connect to
Throws:
org.jivesoftware.smack.XMPPException
Method Detail

convertDate

public static java.util.Date convertDate(java.lang.String date)
This class converts a ISO 8601 date represented as a string to a java Date Object

Parameters:
date -
Returns:

close

public void close()
           throws org.jivesoftware.smack.XMPPException
This method is used to close the connection to the Superfeer Server.

Throws:
org.jivesoftware.smack.XMPPException

addOnNotificationHandler

public void addOnNotificationHandler(OnNotificationHandler handler)
Add handler as a notification handler on this superfeedr. When a notification is received, a SuperfeedrEventExtension object is created and passed to each listener

Parameters:
handler - the handler to be added

removeOnNotificationHandler

public void removeOnNotificationHandler(OnNotificationHandler handler)
Try to remove the specified handler from the list of notification handler

Parameters:
handler - the notification handler to be removed from the list

subscribe

public void subscribe(java.util.List<java.net.URL> feedUrls,
                      onSubUnsubscriptionHandler handler)
Call this method to add subscription to your superfeedr account. The passed URL must be well formatted and must represent something that can be used as source by superfeedr. See the Superfeedr website for information about that.

Parameters:
feedUrls - the list of feeds you want to add to your superfeedr account
handler - the callback

unsubscribe

public void unsubscribe(java.util.List<java.net.URL> feedUrls,
                        onSubUnsubscriptionHandler handler)
Call this method to remove subscription from your superfeedr account.

Parameters:
feedUrls - the list of feeds you want to add to your superfeedr account
handler - the callback

getSubscriptionList

public java.util.List<java.net.URL> getSubscriptionList()
This method is used to retreive the feeds URL you subscribed to.

Returns:
a list of your feed url