|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.grizzly.tcp.StaticResourcesAdapter
com.sun.grizzly.tcp.DynamicContentAdapter
GrizzlyAdapter
instead.
public abstract class DynamicContentAdapter
Abstract Adapter that contains all the common behaviour of the Adapter implementation for standalone usage as well as embedded use.
Nested Class Summary | |
---|---|
class |
DynamicContentAdapter.RequestTupple
Deprecated. Statefull token used to share information with the Containers. |
Field Summary | |
---|---|
protected String |
contextRoot
Deprecated. |
protected static String |
RFC_2616_FORMAT
Deprecated. |
Fields inherited from class com.sun.grizzly.tcp.StaticResourcesAdapter |
---|
cache, commitErrorResponse, fileFolders, logger, resourcesContextPath |
Constructor Summary | |
---|---|
DynamicContentAdapter()
Deprecated. |
|
DynamicContentAdapter(String publicDirectory)
Deprecated. |
Method Summary | |
---|---|
void |
afterService(Request req,
Response res)
Deprecated. Finish the Response and recycle the Request and the
Response . |
String |
getContextRoot()
Deprecated. |
protected abstract int |
getTokenID()
Deprecated. |
void |
service(Request req,
Response res)
Deprecated. Based on the Request URI, try to map the file from the rootFolder, and send it synchronously using send file. |
protected abstract void |
serviceDynamicContent(Request req,
Response res)
Deprecated. |
void |
setContextRoot(String contextRoot)
Deprecated. |
Methods inherited from class com.sun.grizzly.tcp.StaticResourcesAdapter |
---|
addRootFolder, customizedErrorPage, getDefaultContentType, getResourcesContextPath, getRootFolder, getRootFolders, initWebDir, isUseSendFile, service, setDefaultContentType, setLogger, setResourcesContextPath, setRootFolder, setUseSendFile |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String RFC_2616_FORMAT
protected String contextRoot
Constructor Detail |
---|
public DynamicContentAdapter()
public DynamicContentAdapter(String publicDirectory)
Method Detail |
---|
protected abstract int getTokenID()
protected abstract void serviceDynamicContent(Request req, Response res) throws IOException
IOException
public void afterService(Request req, Response res) throws Exception
StaticResourcesAdapter
Response
and recycle the Request
and the
Response
. If the StaticResourcesAdapter.commitErrorResponse
is set to false, this method does nothing.
afterService
in interface Adapter
afterService
in class StaticResourcesAdapter
req
- Request
res
- Response
Exception
public void service(Request req, Response res) throws Exception
StaticResourcesAdapter
Request
URI, try to map the file from the rootFolder, and send it synchronously using send file.
service
in interface Adapter
service
in class StaticResourcesAdapter
req
- the Request
res
- the Response
Exception
- if an error happens during handling of
the request. Common errors are:
public void setContextRoot(String contextRoot)
public String getContextRoot()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |