public interface ResourceProvider
This is SPI to access resources available at runtime. Depending on the web container this can be an application classpath only or bundles which are identified by the provided context.
| Modifier and Type | Method and Description |
|---|---|
URL |
getApplicationResource(String path)
Gets the resource identified by
path located in the application
bundle (jar) which may be found using this resource provider instance. |
List<URL> |
getApplicationResources(String path)
Gets all the resources identified by
path located in in the
application bundle (jar) which may be found using this resource provider. |
URL |
getClientResource(String path)
Gets "flow-client" bundle resource identified by the
path. |
InputStream |
getClientResourceAsStream(String path)
Gets "flow-client" bundle resource content identified by the
path. |
URL getApplicationResource(String path)
path located in the application
bundle (jar) which may be found using this resource provider instance.
If the provider doesn't contain any information about application bundle
or there is no resource with the given path then this method returns
null.
path - the resource pathnullList<URL> getApplicationResources(String path) throws IOException
path located in in the
application bundle (jar) which may be found using this resource provider.
If the provider doesn't contain any information about application bundle or there is no resource with the given path then this method returns an empty list.
path - the resource pathIOException - if there is an I/O errorURL getClientResource(String path)
path.path - the resource pathnullInputStream getClientResourceAsStream(String path) throws IOException
path.path - the resource pathnullIOException - If there is an I/O error.Copyright © 2021. All rights reserved.