|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimple.http.serve.FileContext
simple.http.serve.FactoryContext
simple.http.serve.CacheContext
public class CacheContext
The CacheContext
object is used to provide a caching
implementation of the context. This will ensure that frequent
requests for Content
objects will hit a cache and
thus require less I/O to fulfill the request. The also provides a
means to share caching across multiple objects, which share the
context. The default maximum cache size is eight kilobytes.
CacheContentFactory
Field Summary |
---|
Fields inherited from class simple.http.serve.FactoryContext |
---|
factory |
Fields inherited from class simple.http.serve.FileContext |
---|
base, format, indexer, locator |
Constructor Summary | |
---|---|
CacheContext()
Constructor for the CacheContext object. |
|
CacheContext(java.io.File base)
Constructor for the CacheContext object. |
|
CacheContext(java.io.File base,
java.io.File path)
Constructor for the CacheContext object. |
|
CacheContext(java.io.File base,
java.io.File[] list)
Constructor for the CacheContext object. |
|
CacheContext(java.io.File base,
java.io.File[] list,
int size)
Constructor for the CacheContext object. |
|
CacheContext(java.io.File base,
int size)
Constructor for the CacheContext object. |
Method Summary |
---|
Methods inherited from class simple.http.serve.FactoryContext |
---|
getContent |
Methods inherited from class simple.http.serve.FileContext |
---|
getBasePath, getContentType, getDirectory, getFile, getFormat, getIndex, getLocale, getLocator, getName, getPath, getProperties, getRealPath, getRequestPath |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CacheContext()
CacheContext
object. This is
used to create a context for the current working directory.
This will use a cache that has a default maximum size of eight
kilobytes. Also, items remain cached for at most one minute.
public CacheContext(java.io.File base)
CacheContext
object. This is
used to create a context instance for the specified directory.
This will use a cache that has a default maximum size of eight
kilobytes. Also, items remain cached for at most one minute.
base
- this is the directory specifying the context rootpublic CacheContext(java.io.File base, int size)
CacheContext
object. This is
used to create a context instance for the specified directory.
This will use a cache that has a default maximum size of eight
kilobytes. Also, items remain cached for at most one minute.
base
- this is the directory specifying the context rootsize
- this is the maximum file size that will be cachedpublic CacheContext(java.io.File base, java.io.File path)
CacheContext
object. This is
used to create a context instance for the specified directory.
This will use a cache that has a default maximum size of eight
kilobytes. Also, items remain cached for at most one minute.
This will make use of one directory to find configuration.
base
- this is the directory specifying the context rootpath
- this is the directory file used for configurationpublic CacheContext(java.io.File base, java.io.File[] list)
CacheContext
object. This is
used to create a context instance for the specified directory.
This will use a cache that has a default maximum size of eight
kilobytes. Also, items remain cached for at most one minute.
This will make use of the file list to find configuration.
base
- this is the directory specifying the context rootlist
- this is the range of files used for configurationpublic CacheContext(java.io.File base, java.io.File[] list, int size)
CacheContext
object. This is
used to create a context instance for the specified directory.
This will use a cache that has a default maximum size of eight
kilobytes. Also, items remain cached for at most one minute.
This will make use of the file list to find configuration.
base
- this is the directory specifying the context rootsize
- this is the maximum file size that will be cachedlist
- this is the range of files used for configuration
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |