com.sun.enterprise.web.connector.grizzly.standalone
Class StaticResourcesAdapter
java.lang.Object
com.sun.enterprise.web.connector.grizzly.standalone.StaticResourcesAdapter
- All Implemented Interfaces:
- Adapter
- Direct Known Subclasses:
- CometdAdapter
public class StaticResourcesAdapter
- extends Object
- implements Adapter
Simple HTTP based Web Server. Part of this class is from Tomcat sandbox code
from Costin Manolache.
- Author:
- Jeanfrancois Arcand
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StaticResourcesAdapter
public StaticResourcesAdapter()
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
- 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 )
getContentType
public String getContentType(String ext)
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
- Throws:
Exception
fireAdapterEvent
public void fireAdapterEvent(String string,
Object object)
- Description copied from interface:
Adapter
- Notify all container event listeners that a particular event has
occurred for this Adapter. The default implementation performs
this notification synchronously using the calling thread.
- Specified by:
fireAdapterEvent in interface Adapter
- Parameters:
string - Event typeobject - Event data
getRootFolder
public String getRootFolder()
Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.