| java.lang.Object com.lutris.appserver.server.httpPresentation.PresentationLoader
PresentationLoader | class PresentationLoader (Code) | | Loader for presentation objects and resources associated with an
application. It also manages a cache of resources.
version: $Revision: 1.2 $ author: Mark Diekhans since: 1.8 See Also: HttpPresentationManager |
Constructor Summary | |
protected | PresentationLoader(String appPresentationPrefix, ClassLoader applicationClassLoader, boolean cacheClasses, boolean cacheFiles, LogChannel presLogChannel) Constructor.
Parameters: appPresentationPrefix - Prefix added to the file name portionof the URL. |
PresentationLoader | protected PresentationLoader(String appPresentationPrefix, ClassLoader applicationClassLoader, boolean cacheClasses, boolean cacheFiles, LogChannel presLogChannel) throws HttpPresentationException(Code) | | Constructor.
Parameters: appPresentationPrefix - Prefix added to the file name portionof the URL. The resulting names is used to search for classes andfiles on the class path. Parameters: applicationClassLoader - The class loader to use for the application. Parameters: cacheClasses - Enables or disables caching of presentation objectclasses in memory. Parameters: cacheFiles - Enables or disables caching of files (html, gif, etc)that are servered as part of the application. Parameters: presLogChannel - Log channel for the presentation. Maybe null. |
addMimeType | public void addMimeType(String mimeType, String extension)(Code) | | Add a new mime type to extension mapping.
|
flushCache | protected void flushCache()(Code) | | Flush the presentation object and resource caches.
|
getAppClassLoader | protected ClassLoader getAppClassLoader()(Code) | | Get the application class loader.
The application class loader. |
getAppFileAsStream | protected InputStream getAppFileAsStream(String appFileName) throws IOException, HttpPresentationException(Code) | | Get a file associated with the application. The file is located
in the same manner as presentation objects are located. That is,
prepending the presentationPrefix to the specified
path and searching the class path for a directory or JAR containing
the file.
Parameters: appfileName - The file name relative to theto the application's presentationPrefix . An input stream associated with the file. exception: IOException - If the file can not be found or opened. |
getMimeType | protected String getMimeType(String urlPath)(Code) | | Returns the mime type for the URL path.
Parameters: urlPath - the URL path. |
isPOCacheEnabled | protected boolean isPOCacheEnabled()(Code) | | Determine if the PO cache is enabled.
true is the cache is enabled. |
isPresentationRequest | protected boolean isPresentationRequest(HttpPresentationRequest request) throws HttpPresentationException(Code) | | Determine if a request URL references a presentation object.
Parameters: request - The request for the presentation. true if the URL has a presentation object MIME type. |
isResourceCacheEnabled | protected boolean isResourceCacheEnabled()(Code) | | Determine if the file resource class cache is enabled.
true is the cache is enabled. |
sizeofPOCache | protected int sizeofPOCache()(Code) | | Return the number of entries in the PO cache.
the number of entries in the cache or 0 is disabled. |
sizeofResourceCache | protected int sizeofResourceCache()(Code) | | Return the number of entries in the resource cache.
the number of entries in the cache or 0 is disabled. |
|
|