del.icio.us.cache
Class DeliciousCache

java.lang.Object
  extended bydel.icio.us.cache.DeliciousCache

public class DeliciousCache
extends java.lang.Object

A cache for del.icio.us requests to get recent posts.

Version:
$Id: DeliciousCache.java,v 1.3 2007/01/19 00:14:43 czarneckid Exp $
Author:
Simon Brown

Method Summary
static DeliciousCache getInstance()
          Gets the singleton instance.
 java.util.List getRecentPosts(java.lang.String username, java.lang.String password, int count, java.lang.String tag, long timeout)
          Gets a list of recent posts for ths given criteria.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DeliciousCache getInstance()
Gets the singleton instance.

Returns:
a DeliciousCache instance

getRecentPosts

public java.util.List getRecentPosts(java.lang.String username,
                                     java.lang.String password,
                                     int count,
                                     java.lang.String tag,
                                     long timeout)
Gets a list of recent posts for ths given criteria. If the posts that were last retrieved are more than timeout milliseconds old, they are refreshed from del.icio.us.

Parameters:
username - the del.icio.us username
password - the del.icio.us password
count - the number of recent posts to get
tag - a filter tag (optional, can be null)
timeout - the timeout in milliseconds of the cached data
Returns:
a Collection of Post objects