|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.cache.PlainResource
org.norther.tammi.spray.engine.resource.AbstractResourceResolver.AbstractResource
protected abstract class AbstractResourceResolver.AbstractResource
An abstract resource.
| Constructor Summary | |
|---|---|
protected |
AbstractResourceResolver.AbstractResource(String name,
Object src)
Constructs a new resource. |
| Method Summary | |
|---|---|
boolean |
equals(Object object)
|
long |
getCheckInterval()
Gets the interval of checking validity of the resource. |
InputStream |
getInputStream()
Gets the resource as a stream. |
protected abstract InputStream |
getInputStream(Object src)
Implements getting of the source specific input stream. |
long |
getLastModified()
Gets the resource modification time. |
long |
getLength()
Gets the length of the resource. |
int |
getSizeLimit()
Gets the size limit for a cached resource. |
int |
hashCode()
|
boolean |
isValid()
Checks whether the original resource is still valid. |
void |
release()
Releases the cached resource. |
void |
setCheckInterval(long range)
Sets the interval of checking validity of the resource. |
void |
setSizeLimit(int lim)
Sets a size limit for a resource. |
| Methods inherited from class org.norther.tammi.core.cache.PlainResource |
|---|
activated, expired, getContents, getContents, getName, getPath, getSource, isDeleteOnRelease, passivated, setDeleteOnRelease, setPath |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.norther.tammi.core.cache.Resource |
|---|
getContents, getName, getPath, getSource, isDeleteOnRelease, setDeleteOnRelease, setPath |
| Constructor Detail |
|---|
protected AbstractResourceResolver.AbstractResource(String name,
Object src)
name - the resource.src - the source.| Method Detail |
|---|
public long getLength()
Resource
getLength in interface ResourcegetLength in class PlainResourcepublic long getLastModified()
Resource
getLastModified in interface ResourcegetLastModified in class PlainResourcepublic long getCheckInterval()
Resource
getCheckInterval in interface ResourcegetCheckInterval in class PlainResourcepublic void setCheckInterval(long range)
Resource
setCheckInterval in interface ResourcesetCheckInterval in class PlainResourcerange - the check interval in milliseconds (-1 = only once).public int getSizeLimit()
Resource
getSizeLimit in interface ResourcegetSizeLimit in class PlainResourcepublic void setSizeLimit(int lim)
Resource
setSizeLimit in interface ResourcesetSizeLimit in class PlainResourcelim - a limit for a resource size in bytes (-1 = unlimited).
public InputStream getInputStream()
throws IOException
Resource
getInputStream in interface ResourcegetInputStream in class PlainResourceIOException - on I/O errors.public boolean isValid()
Resource
isValid in interface ResourceisValid in class PlainResourcepublic void release()
Resource
release in interface Resourcerelease in class PlainResourcepublic boolean equals(Object object)
equals in class Objectpublic int hashCode()
hashCode in class Object
protected abstract InputStream getInputStream(Object src)
throws IOException
src - the resource source.
IOException - on I/O errors.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||