public class ResourceDepot extends Object implements Depot, AcceptsBusEventAggregator
Constructor and Description |
---|
ResourceDepot() |
ResourceDepot(ClassLoader pLoader,
String pPrefix) |
ResourceDepot(String pPrefix) |
Modifier and Type | Method and Description |
---|---|
String |
describe(String pName,
String pType)
Describe the underlying resource that is used if someone asks for an input stream with the given name and type.
|
Depot |
getDepot(String pUri)
Supports classpath uri's like "classpath:/my/prefix/".
|
InputStream |
getInputStreamFor(String pName,
String type)
Returns an Input Stream that contains the information,
or null if the requested configuration data was not found.
|
String |
getPrefix()
returns the prefix that this ResourceDepot is initialized with
|
static void |
main(String[] args) |
void |
setBusEventAggregator(neo.nursery.BusEventAggregator pBusEventAggregator) |
void |
setPrefix(String pPrefix)
Lets you inject a prefix that will than be prepended to any lookup String
|
String |
toString() |
public ResourceDepot()
public ResourceDepot(String pPrefix)
public ResourceDepot(ClassLoader pLoader, String pPrefix)
public void setPrefix(String pPrefix)
public String getPrefix()
public Depot getDepot(String pUri) throws BusException
getDepot
in interface Depot
pUri
- The uri for the depot or null if the implementation
does not support this uri.BusException
- if an error occursDepot.getDepot(String)
public InputStream getInputStreamFor(String pName, String type) throws IOException
Depot
getInputStreamFor
in interface Depot
IOException
- if there is an error reading the requested informationpublic String describe(String pName, String pType)
Depot
public void setBusEventAggregator(neo.nursery.BusEventAggregator pBusEventAggregator)
setBusEventAggregator
in interface AcceptsBusEventAggregator
© 1998- 2018 Stibo DX