See: Description
Interface | Description |
---|---|
ResourceLoader |
A
ResourceLoader is a pluggable contract for loading resources. |
Class | Description |
---|---|
DelegatingResourceLoader | Deprecated
this resource loader can easily leak between application instances
|
ResourceLoaderManager |
ResourceLoaderManager discovers and instantiates all
ResourceLoader s defined. |
ResourceProvider |
The ResourceProvider allows dynamic loading of managed resources.
|
ResourceProviderProducer |
FIXME This producer serves as a temporary workaround for the GlassFish BDA visiblity problem.
|
Annotation Type | Description |
---|---|
Resource |
An injection point qualifier that may be used to specify a resource to
inject.
|
An extensible, injectable resource loader that can provide provide URLs, managed input streams and sets of properties.
If the resource name is known at development time, the resource can be injected:
@Inject @Resource("WEB-INF/beans.xml") URL beansXml; @Inject @Resource("WEB-INF/web.xml") InputStream webXml; @Inject @Resource("META-INF/aws.properties") Properties awsProperties;
If the resource name is not known, the ResourceProvider
can be injected, and the resource looked up dynamically:
@Inject void readXml(ResourceProvider provider, String fileName) { InputStream webXml = provider.loadResourceStream(fileName); }
Any input stream injected, or created directly by the ResourceProvider
is managed, and will be automatically closed when the bean declaring the injection point of the resource
or provider is destroyed.
Resource
,
ResourceProvider
,
ResourceLoader
,
ResourceLoaderManager
Copyright © 2008–2013 Seam Framework. All rights reserved.