at.spardat.xma.boot.cache
Interface IFileCacheResource

All Known Implementing Classes:
FCResource

public interface IFileCacheResource

interface to storage module resources


Method Summary
 long getExpiration()
          Gets the expiration date of this resource.
 java.io.InputStream getInputStream()
          Gets an input stream from this resource
 long getLastModified()
          Last-Modified is the http-header value used to check, if a resource is still up to date.
 long getLastUpdated()
          Returns the time in the local system clock that the file was most recently checked for an update by this client machine.
 java.net.URL getLocalRes()
          get an url to the local resource
 java.net.URL getLocation()
          Returns the remote location this entry caches.
 java.lang.String getProperty(java.lang.String key)
          Returns the value of the specified key, or null if the key does not exist.
 java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
          Returns the value of the specified key, or the default value if the key does not exist.
 boolean isExpired()
          is this resource still up to date
 void setExpiration(long l)
          Sets the expiration date of this resource.
 void setProperty(java.lang.String key, long value)
          Sets the named property to the given value.
 java.lang.Object setProperty(java.lang.String key, java.lang.String value)
          Sets the value for the specified key.
 

Method Detail

getLocation

public java.net.URL getLocation()
Returns the remote location this entry caches.


getLocalRes

public java.net.URL getLocalRes()
get an url to the local resource


getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Gets an input stream from this resource

Returns:
InputStream returns an input-stream for this resource, to read from.
Throws:
java.io.IOException

getLastUpdated

public long getLastUpdated()
Returns the time in the local system clock that the file was most recently checked for an update by this client machine.
info:

This is not a http-header information. It is only used bye the client to remember the date/time when this resource was checked for existing updates.

Returns:
long last update timestamp

getLastModified

public long getLastModified()
Last-Modified is the http-header value used to check, if a resource is still up to date.

Returns:
long last modified date

getProperty

public java.lang.String getProperty(java.lang.String key)
Returns the value of the specified key, or null if the key does not exist.

Parameters:
key - key to look for

getProperty

public java.lang.String getProperty(java.lang.String key,
                                    java.lang.String defaultValue)
Returns the value of the specified key, or the default value if the key does not exist.


setProperty

public java.lang.Object setProperty(java.lang.String key,
                                    java.lang.String value)
Sets the value for the specified key.

Returns:
the previous value

setExpiration

public void setExpiration(long l)
Sets the expiration date of this resource.

Parameters:
l - expiration date/time
Returns:
void

getExpiration

public long getExpiration()
Gets the expiration date of this resource.

Returns:
the expiration date in milliseconds since 1.1.1970

setProperty

public void setProperty(java.lang.String key,
                        long value)
Sets the named property to the given value.

Parameters:
key - name of the property
value - of the property

isExpired

public boolean isExpired()
is this resource still up to date

Returns:
true if it is already expired