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)
ResourceService
getResource
in interface ResourceService
public java.io.InputStream getResourceAsStream(java.lang.String name) throws java.io.FileNotFoundException
ResourceService
getResourceAsStream
in interface ResourceService
java.io.FileNotFoundException
public void cleanup()
AppContextCleanup
AppContext
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 AppContextCleanup
public AppContext getContext()
getContext
in interface Contexed
public java.lang.Class<ResourceService> getType()
AppContextService
getType
in interface AppContextService<ResourceService>