com.sun.grizzly.standalone
Class StaticResourcesAdapter

java.lang.Object
  extended by com.sun.grizzly.standalone.StaticResourcesAdapter
All Implemented Interfaces:
Adapter
Direct Known Subclasses:
DynamicContentAdapter

Deprecated.

public class StaticResourcesAdapter
extends Object
implements Adapter

Simple HTTP based Web Server. Part of this class is from Tomcat sandbox code from Costin Manolache. This class is deprecated and moved under http-utils/src/main/java/com/sun/grizzly/tcp/

Author:
Jeanfrancois Arcand

Field Summary
 
Fields inherited from interface com.sun.grizzly.tcp.Adapter
CONNECTION_PROCESSING_COMPLETED, CONNECTION_PROCESSING_STARTED, REQUEST_PROCESSING_COMPLETED, REQUEST_PROCESSING_STARTED
 
Constructor Summary
StaticResourcesAdapter()
          Deprecated.  
StaticResourcesAdapter(String rootFolder)
          Deprecated.  
 
Method Summary
 void afterService(Request req, Response res)
          Deprecated. Finish the response and recycle the request/response tokens.
 void fireAdapterEvent(String string, Object object)
          Deprecated. Notify all container event listeners that a particular event has occurred for this Adapter.
 String getRootFolder()
          Deprecated.  
 void service(Request req, Response res)
          Deprecated. Call the service method, and notify all listeners
protected  void service(String uri, Request req, Response res)
          Deprecated.  
 void setRootFolder(String newRoot)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticResourcesAdapter

public StaticResourcesAdapter()
Deprecated. 

StaticResourcesAdapter

public StaticResourcesAdapter(String rootFolder)
Deprecated. 
Method Detail

service

public void service(Request req,
                    Response res)
             throws Exception
Deprecated. 
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 )

service

protected void service(String uri,
                       Request req,
                       Response res)
                throws Exception
Deprecated. 
Throws:
Exception

afterService

public void afterService(Request req,
                         Response res)
                  throws Exception
Deprecated. 
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)
Deprecated. 
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 type
object - Event data

getRootFolder

public String getRootFolder()
Deprecated. 

setRootFolder

public void setRootFolder(String newRoot)
Deprecated. 


Copyright © 2010 SUN Microsystems. All Rights Reserved.