com.aetrion.flickr.util
Class FileAuthStore

java.lang.Object
  extended by com.aetrion.flickr.util.FileAuthStore
All Implemented Interfaces:
AuthStore

public class FileAuthStore
extends java.lang.Object
implements AuthStore

Implements a filesystem based storage system for Auth instances. One ".auth" file is maintained per Auth instance stored.

Author:
Matthew MacKenzie

Constructor Summary
FileAuthStore(java.io.File authStoreDir)
           
 
Method Summary
 void clear(java.lang.String nsid)
          Clear for a given NSID.
 void clearAll()
          Clear out the store.
static void main(java.lang.String[] args)
           
 Auth retrieve(java.lang.String nsid)
          Retrieve Auth for a given NSID.
 Auth[] retrieveAll()
          Retrieve all Auth objects being stored.
 void store(Auth token)
          Store an Auth.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileAuthStore

public FileAuthStore(java.io.File authStoreDir)
              throws java.io.IOException
Throws:
java.io.IOException
Method Detail

store

public void store(Auth token)
           throws java.io.IOException
Description copied from interface: AuthStore
Store an Auth.

Specified by:
store in interface AuthStore
Parameters:
token - Auth object to be stored.
Throws:
java.io.IOException

retrieve

public Auth retrieve(java.lang.String nsid)
Description copied from interface: AuthStore
Retrieve Auth for a given NSID.

Specified by:
retrieve in interface AuthStore
Parameters:
nsid - NSID
Returns:
Auth

retrieveAll

public Auth[] retrieveAll()
Description copied from interface: AuthStore
Retrieve all Auth objects being stored.

Specified by:
retrieveAll in interface AuthStore
Returns:
Auth objects

clearAll

public void clearAll()
Description copied from interface: AuthStore
Clear out the store.

Specified by:
clearAll in interface AuthStore

clear

public void clear(java.lang.String nsid)
Description copied from interface: AuthStore
Clear for a given NSID.

Specified by:
clear in interface AuthStore

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright (C) 2005-2008 Aetrion LLC. All Rights Reserved.