com.sun.grizzly.tcp
Interface Adapter

All Known Implementing Classes:
CometdAdapter, DynamicContentAdapter, GrizzlyAdapter, GrizzlyAdapterChain, OSGiMainAdapter, OSGiResourceAdapter, OSGiServletAdapter, ServletAdapter, StaticResourcesAdapter, WebAppAdapter

public interface Adapter

Adapter. This represents the extention point to any customized http container, like Servlet, static resource, etc.

Author:
Remy Maucherat, Jeanfrancois Arcand

Method Summary
 void afterService(Request req, Response res)
          Finish the response and dedide if the Request/Response object must be recycled.
 void service(Request req, Response res)
          Invoke the service method.
 

Method Detail

service

void service(Request req,
             Response res)
             throws Exception
Invoke the service method. The service method is usually responsible for manipulating the Request and preparing the Response.

Parameters:
req - The Request
res - The Response
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)

afterService

void afterService(Request req,
                  Response res)
                  throws Exception
Finish the response and dedide if the Request/Response object must be recycled.

Parameters:
req - The Request
res - The Response
Throws:
Exception


Copyright © 2013 Oracle Corporation. All Rights Reserved.