to.etc.domui.caches
Class FileImageRetriever
java.lang.Object
to.etc.domui.caches.FileImageRetriever
- All Implemented Interfaces:
- IImageRetriever
public class FileImageRetriever
- extends java.lang.Object
- implements IImageRetriever
Method Summary |
static java.lang.String |
createFileURL(java.io.File what,
java.lang.String mime)
Creates a safe file reference. |
long |
getCheckInterval()
Returns the check interval, in millis. |
java.lang.String |
getRetrieverKey()
Returns an unique string identifier, usable in file names and URL's, to represent all images
obtained from this retriever. |
IImageReference |
loadImage(java.lang.String key)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileImageRetriever
public FileImageRetriever()
createFileURL
public static java.lang.String createFileURL(java.io.File what,
java.lang.String mime)
- Creates a safe file reference. The key is stored in the session.
- Parameters:
what
-
- Returns:
getCheckInterval
public long getCheckInterval()
- Description copied from interface:
IImageRetriever
- Returns the check interval, in millis. This is the age that an image may have in the cache before it's
rechecked for changes again. Returning 0 means the image gets checked for validity always.
- Specified by:
getCheckInterval
in interface IImageRetriever
- Returns:
getRetrieverKey
public java.lang.String getRetrieverKey()
- Description copied from interface:
IImageRetriever
- Returns an unique string identifier, usable in file names and URL's, to represent all images
obtained from this retriever. Called once when the retriever is registered. The value returned
by this call may not change over the lifetime of this factory.
- Specified by:
getRetrieverKey
in interface IImageRetriever
- Returns:
loadImage
public IImageReference loadImage(java.lang.String key)
throws java.lang.Exception
- Specified by:
loadImage
in interface IImageRetriever
- Throws:
java.lang.Exception