Adapter (Apache Tomcat 7.0.104 API Documentation)

org.apache.coyote

## Interface Adapter

- All Known Implementing Classes:
    CoyoteAdapter

      public interface Adapter

  Adapter. This represents the entry point in a coyote-based servlet container.
  Author:
    Remy Maucherat
  See Also:
    `ProtocolHandler`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `asyncDispatch(Request req, Response res, SocketStatus status)`
    `void` | `checkRecycled(Request req, Response res)` Assert that request and response have been recycled.
    `void` | `errorDispatch(Request request, Response response)`
    `boolean` | `event(Request req, Response res, SocketStatus status)`
    `String` | `getDomain()` Provide the name of the domain to use to register MBeans for components associated with the connector.
    `void` | `log(Request req, Response res, long time)`
    `void` | `service(Request req, Response res)` Call the service method, and notify all listeners

- - ### Method Detail

    - #### service

          void service(Request req,
                     Response res)
                       throws Exception

      Call the service method, and notify all listeners
      Parameters:
        `req` - The request object
        `res` - The response object
      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 )

    - #### event

          boolean event(Request req,
                      Response res,
                      SocketStatus status)
                        throws Exception

      Throws:
        `Exception`

    - #### asyncDispatch

          boolean asyncDispatch(Request req,
                              Response res,
                              SocketStatus status)
                                throws Exception

      Throws:
        `Exception`

    - #### errorDispatch

          void errorDispatch(Request request,
                           Response response)

    - #### log

          void log(Request req,
                 Response res,
                 long time)

    - #### checkRecycled

          void checkRecycled(Request req,
                           Response res)

      Assert that request and response have been recycled. If they have not then log a warning and force a recycle. This method is called as a safety check when a processor is being recycled and may be returned to a pool for reuse.
      Parameters:
        `req` - Request
        `res` - Response

    - #### getDomain

          String getDomain()

      Provide the name of the domain to use to register MBeans for components associated with the connector.
      Returns:
        The MBean domain name

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.