|
|||||||||
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
public class FactoryContext
e
The FactoryContext
is a context implementation that can
be used to serve dynamic Content
objects. This uses a
ContentFactory
implementation to produce instances
from the getInstance
method. This should be used if
content other than static files needs to be served from the
context. Also, this can be used as a caching implementation by
using the FileContentFactory
object for static files.
CacheContext
Field Summary | |
---|---|
protected ContentFactory |
factory
This is used to acquire Content implementations. |
Fields inherited from class simple.http.serve.FileContext |
---|
base, format, indexer, locator |
Constructor Summary | |
---|---|
FactoryContext(ContentFactory factory)
Constructor for the FactoryContext . |
|
FactoryContext(ContentFactory factory,
java.io.File base)
Constructor for the FactoryContext . |
|
FactoryContext(ContentFactory factory,
java.io.File base,
java.io.File path)
Constructor for the FactoryContext . |
|
FactoryContext(ContentFactory factory,
java.io.File base,
java.io.File[] list)
Constructor for the FactoryContext . |
Method Summary | |
---|---|
Content |
getContent(java.lang.String target)
This creates instances of the Content object using
the issued ContentFactory . |
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 |
Field Detail |
---|
protected ContentFactory factory
Content
implementations.
Constructor Detail |
---|
public FactoryContext(ContentFactory factory)
FactoryContext
. This will
produce dynamic Content
implementations. The
objects produced by the getContent
method are
created using a ContentFactory
. This loads all
configuration files from the current working directory.
factory
- used to produce dynamic content objectspublic FactoryContext(ContentFactory factory, java.io.File base)
FactoryContext
. This will
produce dynamic Content
implementations. The
objects produced by the getContent
method are
created using a ContentFactory
. This loads
all files and configuration from the specified path.
base
- the OS specific base path for this instancefactory
- used to produce dynamic content objectspublic FactoryContext(ContentFactory factory, java.io.File base, java.io.File path)
FactoryContext
. This will
produce dynamic Content
implementations. The
objects produced by the getContent
method are
created using a ContentFactory
. This loads
all files from the specified base path. Configuration can
be loaded from the file range provided.
base
- the OS specific base path for this instancefactory
- used to produce dynamic content objectspath
- this is the directory used for configurationpublic FactoryContext(ContentFactory factory, java.io.File base, java.io.File[] list)
FactoryContext
. This will
produce dynamic Content
implementations. The
objects produced by the getContent
method are
created using a ContentFactory
. This loads
all files from the specified base path. Configuration can
be loaded from the file range provided.
base
- the OS specific base path for this instancefactory
- used to produce dynamic content objectslist
- this is the range searched for configurationMethod Detail |
---|
public Content getContent(java.lang.String target) throws java.io.IOException
Content
object using
the issued ContentFactory
. This will initially
attempt to acquire the content instance using the provided
factory. However, if this fails the super class method is used.
getContent
in interface Context
getContent
in class FileContext
target
- the request URI used to reference the resource
Content
interface
java.io.IOException
- this is thrown if there is an I/O problem
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |