| simple.http.serve.Indexer
All known Subclasses: simple.http.serve.FileIndexer,
Indexer | interface Indexer (Code) | | The Indexer object is used to acquire meta data for
a URI target. This provides a centralized source for meta data
within the server. The need to acquire information such as MIME
type, locale, and various other details for a URI frequently
arises. In order to provide a consistant set of details for a
specific target an Indexer implementation is used.
This helps various services and resources acauire meta data
quickly by facilitating a meta data cache for a context.
author: Niall Gallagher See Also: simple.http.serve.Index |
Method Summary | |
public String | getContentType(URI target) This allows the MIME type of this Index to
be acquired. | public File | getFile(URI target) This is used to acquire the File reference
for the index target. | public Locale | getLocale(URI target) This gets the locale for this index object the locale is
set to the Locale.getDefault if there is no
locale information available for the index target. | public Path | getPath(URI target) This is used to acquire the Path object that
exposes various parts of the URI path. |
getContentType | public String getContentType(URI target)(Code) | | This allows the MIME type of this Index to
be acquired. The MIME type of a file is retrieved by the
Context.getContentType method for a specific
request URI. This should have a value and perhaps some
parameters like the charset, "text/html; charset=UTF-8".
Parameters: target - the index target to get the MIME type for the MIME type this object has been set to |
getFile | public File getFile(URI target)(Code) | | This is used to acquire the File reference
for the index target. This is typically rooted at a
base path, for instance the Context root
is typically used. This allows the file to be opened,
deleted, or read should the need arise in a service.
Parameters: target - the index target to get the OS file for this returns the OS file for the resource |
getLocale | public Locale getLocale(URI target)(Code) | | This gets the locale for this index object the locale is
set to the Locale.getDefault if there is no
locale information available for the index target. This
will provide the Context.getLocale object.
Parameters: target - the index target to get the locale for this returns the locale for this index target |
getPath | public Path getPath(URI target)(Code) | | This is used to acquire the Path object that
exposes various parts of the URI path. This can be used
to extract the individual path segments as strings as
well as the file extension and various other details.
Parameters: target - the index target to get the URI path for this returns a path object with various details |
|
|