public class DefaultResourceService extends java.lang.Object implements ResourceService, Contexed
| Constructor and Description |
|---|
DefaultResourceService(AppContext c) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
AppContext is being closed. |
AppContext |
getContext() |
java.net.URL |
getResource(java.lang.String name)
get an identifying URL for the resource
A null result implies the resource cannot be located
|
java.io.InputStream |
getResourceAsStream(java.lang.String name)
get an InputStream to read the resource.
|
java.lang.Class<ResourceService> |
getType()
Returns the type of service the class should be registered under.
|
public DefaultResourceService(AppContext c)
public java.net.URL getResource(java.lang.String name)
ResourceServicegetResource in interface ResourceServicepublic java.io.InputStream getResourceAsStream(java.lang.String name)
throws java.io.FileNotFoundException
ResourceServicegetResourceAsStream in interface ResourceServicejava.io.FileNotFoundExceptionpublic void cleanup()
AppContextCleanupAppContext is being closed.
Only use this for cleanup that can't be handled by
normal garbage collection or for state which is never returned by reference.cleanup in interface AppContextCleanuppublic AppContext getContext()
getContext in interface Contexedpublic java.lang.Class<ResourceService> getType()
AppContextServicegetType in interface AppContextService<ResourceService>