| Modifier and Type | Class and Description |
|---|---|
| public static enum | |
| public static interface | WebResourceRoot.
Provides a mechanism to modify the caching behaviour. |
| public static enum |
| Modifier and Type | Method and Description |
|---|---|
| public void | addJarResources(WebResourceSet
the resource set to use webResourceSet)Adds the provided WebResourceSet to this web application as a 'Jar' resource. |
| public void | addPostResources(WebResourceSet
the resource set to use webResourceSet)Adds the provided WebResourceSet to this web application as a 'Post' resource. |
| public void | addPreResources(WebResourceSet
the resource set to use webResourceSet)Adds the provided WebResourceSet to this web application as a 'Pre' resource. |
| public void | backgroundProcess()
This method will be invoked by the context on a periodic basis and allows the implementation a method that executes periodic tasks, such as purging expired cache entries. |
| public void | createWebResourceSet(WebResourceRoot.
The type of type,WebResourceSet to createThe path within the web application that the
resources should be published at. It must start
with '/'. webAppMount, URL The URL of the resource (must locate a JAR, file or
directory) url, String The path within the resource where the content is to
be found. It must start with '/'. internalPath)Creates a new |
| public void | createWebResourceSet(WebResourceRoot.
The type of type,WebResourceSet to createThe path within the web application that the
resources should be published at. It must start
with '/'. webAppMount, String The location of the resources base, String The path within the resource to the archive where
the content is to be found. If there is no
archive then this should be archivePath, String null.The path within the archive (or the resource if the
archivePath is internalPath)null where the
content is to be found. It must start with '/'.Creates a new |
| public void | deregisterTrackedResource(TrackedWebResource
the resource that was tracked trackedResource)Stop tracking specified resource, once it no longer needs to free resources. |
| public void | |
| public boolean | Returns: true if symbolic links are allowedDetermine if this resources allow the use of symbolic links. |
| public String | Returns: The strategy to use for the resources archive lookupGet the strategy to use for the resources archive lookup. |
| public WebResourceRoot. | Returns: The strategy to use for the resources archive lookupGet the strategy to use for the resources archive lookup. |
| public List | |
| public long | Returns: Maximum cache size in kilobytesGet the maximum permitted size for the cache. |
| public int | Returns: Maximum size for a single cached object in kilobytesGet the maximum permitted size for a single object in the cache. |
| public default WebResourceRoot. | Returns: the current caching strategy ornull if no strategy has
been configuredObtain the current caching strategy. |
| public long | |
| public WebResource | Returns: The object that represents the class loader resource at the given pathThe path of the class loader resource of interest relative
to the the root of class loader resources for this web
application. path)Obtain the object that represents the class loader resource at the given path. |
| public WebResource[] | Returns: The objects that represents the class loader resources at the given path. There will always be at least one element although that element may represent a resource that is not present.The path for the class loader resource of interest relative
to the root of the class loader resources for the web
application. It must start with '/'. path)Obtain the objects that represent the class loader resource at the given path. |
| public Context | |
| public WebResourceSet[] | Returns: the list of WebResourceSet configured to this web application as a 'Jar' resource.
|
| public WebResourceSet[] | Returns: the list of WebResourceSet configured to this web application as a 'Post' resource.
|
| public WebResourceSet[] | Returns: the list of WebResourceSet configured to this web application as a 'Pre' resource.
|
| public WebResource | Returns: The object that represents the resource at the given pathThe path for the resource of interest relative to the root
of the web application. It must start with '/'. path)Obtain the object that represents the resource at the given path. |
| public WebResource[] | Returns: The objects that represents the resource at the given pathThe path for the resource of interest relative to the root
of the web application. It must start with '/'. path)Obtain the objects that represent the resource at the given path. |
| public boolean | Returns: true if it has been enabled, otherwise falseHas the track locked files feature been enabled? |
| public boolean | |
| public String[] | Returns: The list of resources. If path does not refer to a directory then a zero length array will be returned.The path for the resource of interest relative to the root
of the web application. It must start with '/'. path)Obtain the list of the names of all of the files and directories located in the specified directory. |
| public WebResource[] | Returns: The list of resources. If path does not refer to a directory then a zero length array will be returned.The path for the resource of interest relative to the root
of the web application. It must start with '/'. path)Obtain the list of all of the WebResources in the specified directory. |
| public Set | Returns: The Set of resources. If path does not refer to a directory then null will be returned.The path for the resource of interest relative to the root
of the web application. It must start with '/'. path)Obtain the Set of the web applications pathnames of all of the files and directories located in the specified directory. |
| public boolean | |
| public void | registerTrackedResource(TrackedWebResource
the resource that will be tracked trackedResource)Add a specified resource to track to be able to later release resources on stop. |
| public void | setAllowLinking(boolean
true if symbolic links are allowed.Configure if this resources allow the use of symbolic links. |
| public void | setArchiveIndexStrategy(String
The strategy to use for the resources archive lookup archiveIndexStrategy)Set the strategy to use for the resources archive lookup. |
| public void | setCacheMaxSize(long
Maximum cache size in kilobytes cacheMaxSize)Set the maximum permitted size for the cache. |
| public void | setCacheObjectMaxSize(int
Maximum size for a single cached object in
kilobytes cacheObjectMaxSize)Set the maximum permitted size for a single object in the cache. |
| public default void | setCacheStrategy(WebResourceRoot.
The new strategy to use or strategynull for no strategySet the current caching strategy. |
| public void | |
| public void | setCachingAllowed(boolean
true to enable caching, else
falseSet whether or not caching is permitted for this web application. |
| public void | setContext(Context
the associated context context)Set the web application this WebResourceRoot is associated with. |
| public void | setTrackLockedFiles(boolean
true to enable it, false to
disable itControls whether the track locked files feature is enabled. |
| public boolean | Returns: true if and only if the new Resource is writtenThe path to be used for the new Resource. It is relative
to the root of the web application and must start with
'/'. path, InputStream The InputStream that will provide the content for the
new Resource. is, boolean If overwrite)true and the resource already exists it
will be overwritten. If false and the
resource already exists the write will fail.Create a new resource at the requested path using the provided InputStream. |
| addJarResources | back to summary |
|---|---|
| public void addJarResources(WebResourceSet webResourceSet) Adds the provided WebResourceSet to this web application as a 'Jar' resource.
| |
| addPostResources | back to summary |
|---|---|
| public void addPostResources(WebResourceSet webResourceSet) Adds the provided WebResourceSet to this web application as a 'Post' resource.
| |
| addPreResources | back to summary |
|---|---|
| public void addPreResources(WebResourceSet webResourceSet) Adds the provided WebResourceSet to this web application as a 'Pre' resource.
| |
| backgroundProcess | back to summary |
|---|---|
| public void backgroundProcess() This method will be invoked by the context on a periodic basis and allows the implementation a method that executes periodic tasks, such as purging expired cache entries. | |
| createWebResourceSet | back to summary |
|---|---|
| public void createWebResourceSet(WebResourceRoot. Creates a new
| |
| createWebResourceSet | back to summary |
|---|---|
| public void createWebResourceSet(WebResourceRoot. Creates a new
| |
| deregisterTrackedResource | back to summary |
|---|---|
| public void deregisterTrackedResource(TrackedWebResource trackedResource) Stop tracking specified resource, once it no longer needs to free resources.
| |
| gc | back to summary |
|---|---|
| public void gc() Implementations may cache some information to improve performance. This method triggers the clean-up of those resources. | |
| getAllowLinking | back to summary |
|---|---|
| public boolean getAllowLinking() Determine if this resources allow the use of symbolic links.
| |
| getArchiveIndexStrategy | back to summary |
|---|---|
| public String getArchiveIndexStrategy() Get the strategy to use for the resources archive lookup.
| |
| getArchiveIndexStrategyEnum | back to summary |
|---|---|
| public WebResourceRoot. Get the strategy to use for the resources archive lookup.
| |
| getBaseUrls | back to summary |
|---|---|
public List
| |
| getCacheMaxSize | back to summary |
|---|---|
| public long getCacheMaxSize() Get the maximum permitted size for the cache.
| |
| getCacheObjectMaxSize | back to summary |
|---|---|
| public int getCacheObjectMaxSize() Get the maximum permitted size for a single object in the cache. Note
that the maximum size in bytes may not exceed
| |
| getCacheStrategy | back to summary |
|---|---|
| public default WebResourceRoot. Obtain the current caching strategy.
The default implementation returns
| |
| getCacheTtl | back to summary |
|---|---|
| public long getCacheTtl() Get the Time-To-Live (TTL) for cache entries.
| |
| getClassLoaderResource | back to summary |
|---|---|
| public WebResource getClassLoaderResource(String path) Obtain the object that represents the class loader resource at the given path. WEB-INF/classes is always searched prior to searching JAR files in WEB-INF/lib. The search order for JAR files will be consistent across subsequent calls to this method until the web application is reloaded. No guarantee is made as to what the search order for JAR files may be.
| |
| getClassLoaderResources | back to summary |
|---|---|
| public WebResource[] getClassLoaderResources(String path) Obtain the objects that represent the class loader resource at the given path. Note that the resource at that path may not exist. If the path does not exist, the WebResource returned will be associated with the main WebResourceSet. This will include all matches even if the resource would not normally be accessible (e.g. because it was overridden by another resource)
| |
| getContext | back to summary |
|---|---|
public Context getContext()
| |
| getJarResources | back to summary |
|---|---|
public WebResourceSet[] getJarResources()
| |
| getPostResources | back to summary |
|---|---|
public WebResourceSet[] getPostResources()
| |
| getPreResources | back to summary |
|---|---|
public WebResourceSet[] getPreResources()
| |
| getResource | back to summary |
|---|---|
| public WebResource getResource(String path) Obtain the object that represents the resource at the given path. Note that the resource at that path may not exist. If the resource does not exist, the WebResource returned will be associated with the main WebResourceSet.
| |
| getResources | back to summary |
|---|---|
| public WebResource[] getResources(String path) Obtain the objects that represent the resource at the given path. Note that the resource at that path may not exist. If the resource does not exist, the WebResource returned will be associated with the main WebResourceSet. This will include all matches even if the resource would not normally be accessible (e.g. because it was overridden by another resource)
| |
| getTrackLockedFiles | back to summary |
|---|---|
| public boolean getTrackLockedFiles() Has the track locked files feature been enabled?
| |
| isCachingAllowed | back to summary |
|---|---|
public boolean isCachingAllowed()
| |
| list | back to summary |
|---|---|
| public String[] list(String path) Obtain the list of the names of all of the files and directories located in the specified directory. | |
| listResources | back to summary |
|---|---|
| public WebResource[] listResources(String path) Obtain the list of all of the WebResources in the specified directory.
| |
| listWebAppPaths | back to summary |
|---|---|
| public Set Obtain the Set of the web applications pathnames of all of the files and directories located in the specified directory. Paths representing directories will end with a '/' character. | |
| mkdir | back to summary |
|---|---|
| public boolean mkdir(String path) Create a new directory at the given path.
| |
| registerTrackedResource | back to summary |
|---|---|
| public void registerTrackedResource(TrackedWebResource trackedResource) Add a specified resource to track to be able to later release resources on stop.
| |
| setAllowLinking | back to summary |
|---|---|
| public void setAllowLinking(boolean allowLinking) Configure if this resources allow the use of symbolic links.
| |
| setArchiveIndexStrategy | back to summary |
|---|---|
| public void setArchiveIndexStrategy(String archiveIndexStrategy) Set the strategy to use for the resources archive lookup.
| |
| setCacheMaxSize | back to summary |
|---|---|
| public void setCacheMaxSize(long cacheMaxSize) Set the maximum permitted size for the cache.
| |
| setCacheObjectMaxSize | back to summary |
|---|---|
| public void setCacheObjectMaxSize(int cacheObjectMaxSize) Set the maximum permitted size for a single object in the cache. Note
that the maximum size in bytes may not exceed
| |
| setCacheStrategy | back to summary |
|---|---|
| public default void setCacheStrategy(WebResourceRoot. Set the current caching strategy.
The default implementation is a NO-OP. Sub-classes wishing to utilise a
| |
| setCacheTtl | back to summary |
|---|---|
| public void setCacheTtl(long ttl) Set the Time-To-Live (TTL) for cache entries.
| |
| setCachingAllowed | back to summary |
|---|---|
| public void setCachingAllowed(boolean cachingAllowed) Set whether or not caching is permitted for this web application.
| |
| setContext | back to summary |
|---|---|
| public void setContext(Context context) Set the web application this WebResourceRoot is associated with.
| |
| setTrackLockedFiles | back to summary |
|---|---|
| public void setTrackLockedFiles(boolean trackLockedFiles) Controls whether the track locked files feature is enabled. If enabled,
all calls to methods that return objects that lock a file and need to be
closed to release that lock (e.g.
| |
| write | back to summary |
|---|---|
| public boolean write(String path, InputStream is, boolean overwrite) Create a new resource at the requested path using the provided InputStream.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final WebResourceRoot. | |
| public static final WebResourceRoot. | |
| private final boolean | |
| public static final WebResourceRoot. | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public boolean | |
| public static WebResourceRoot. | |
| public static WebResourceRoot. |
| BLOOM | back to summary |
|---|---|
| public static final WebResourceRoot. | |
| PURGED | back to summary |
|---|---|
| public static final WebResourceRoot. | |
| retain | back to summary |
|---|---|
| private final boolean retain | |
| SIMPLE | back to summary |
|---|---|
| public static final WebResourceRoot. | |
| usesBloom | back to summary |
|---|---|
| private final boolean usesBloom | |
| ArchiveIndexStrategy | back to summary |
|---|---|
| private ArchiveIndexStrategy(boolean usesBloom, boolean retain) | |
| getRetain | back to summary |
|---|---|
| public boolean getRetain() | |
| getUsesBloom | back to summary |
|---|---|
| public boolean getUsesBloom() | |
| valueOf | back to summary |
|---|---|
| public static WebResourceRoot. | |
| values | back to summary |
|---|---|
| public static WebResourceRoot. | |
| Modifier and Type | Method and Description |
|---|---|
| public boolean |
| noCache | back to summary |
|---|---|
| public boolean noCache(String path) Should the result of looking up the resource at the given path be excluded from caching?
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final WebResourceRoot. | |
| public static final WebResourceRoot. | |
| public static final WebResourceRoot. | |
| public static final WebResourceRoot. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static WebResourceRoot. | |
| public static WebResourceRoot. |
| CLASSES_JAR | back to summary |
|---|---|
| public static final WebResourceRoot. | |
| POST | back to summary |
|---|---|
| public static final WebResourceRoot. | |
| PRE | back to summary |
|---|---|
| public static final WebResourceRoot. | |
| RESOURCE_JAR | back to summary |
|---|---|
| public static final WebResourceRoot. | |
| ResourceSetType | back to summary |
|---|---|
| private ResourceSetType() | |
| valueOf | back to summary |
|---|---|
| public static WebResourceRoot. | |
| values | back to summary |
|---|---|
| public static WebResourceRoot. | |