public class ServletResourceService extends java.lang.Object implements ResourceService
ServletContext
Constructor and Description |
---|
ServletResourceService(AppContext conn,
ServletContext 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<? super ResourceService> |
getType()
Returns the type of service the class should be registered under.
|
public ServletResourceService(AppContext conn, ServletContext 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.lang.Exception
ResourceService
getResourceAsStream
in interface ResourceService
java.lang.Exception
- spublic 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()
public java.lang.Class<? super ResourceService> getType()
AppContextService
getType
in interface AppContextService<ResourceService>