com.sun.grizzly.tcp
Class DynamicContentAdapter
java.lang.Object
com.sun.grizzly.tcp.StaticResourcesAdapter
com.sun.grizzly.tcp.DynamicContentAdapter
- All Implemented Interfaces:
- Adapter
- Direct Known Subclasses:
- RailsAdapter
public abstract class DynamicContentAdapter
- extends StaticResourcesAdapter
Abstract Adapter that contains all the common behaviour of the Adapter implmentation
for standalone usage as well as embedded use.
- Author:
- Jerome Dochez, Jean-Francois Arcand
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RFC_2616_FORMAT
protected static final String RFC_2616_FORMAT
- See Also:
- Constant Field Values
contextRoot
protected String contextRoot
DynamicContentAdapter
public DynamicContentAdapter()
DynamicContentAdapter
public DynamicContentAdapter(String publicDirectory)
getTokenID
protected abstract int getTokenID()
serviceDynamicContent
protected abstract void serviceDynamicContent(Request req,
Response res)
throws IOException
- Throws:
IOException
afterService
public void afterService(Request req,
Response res)
throws Exception
- Description copied from interface:
Adapter
- Finish the response and recycle the request/response tokens. Base on
the connection header, the underlying socket transport will be closed
- Specified by:
afterService
in interface Adapter
- Overrides:
afterService
in class StaticResourcesAdapter
- Throws:
Exception
fireAdapterEvent
public void fireAdapterEvent(String type,
Object data)
- Description copied from class:
StaticResourcesAdapter
- Not Used.
- Specified by:
fireAdapterEvent
in interface Adapter
- Overrides:
fireAdapterEvent
in class StaticResourcesAdapter
- Parameters:
type
- Event typedata
- Event data
service
public void service(Request req,
Response res)
throws Exception
- Description copied from interface:
Adapter
- Call the service method, and notify all listeners
- Specified by:
service
in interface Adapter
- Overrides:
service
in class StaticResourcesAdapter
- Throws:
Exception
- if an error happens during handling of
the request. Common errors are:
- IOException if an input/output error occurs and we are
processing an included servlet (otherwise it is swallowed and
handled by the top level error handler mechanism)
- ServletException if a servlet throws an exception and
we are processing an included servlet (otherwise it is swallowed
and handled by the top level error handler mechanism)
Tomcat should be able to handle and log any other exception ( including
runtime exceptions )
setContextRoot
public void setContextRoot(String contextRoot)
getContextRoot
public String getContextRoot()
Copyright © 2011 SUN Microsystems. All Rights Reserved.