Top Description Methods
org.apache.coyote

public Interface Adapter

Known Direct Implementers
org.apache.catalina.connector.CoyoteAdapter
Imports
org.apache.tomcat.util.net.SocketEvent

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

Method Summary

Modifier and TypeMethod and Description
public boolean
public void
checkRecycled(Request
Request
req
,
Response
Response
res
)

Assert that request and response have been recycled.

public String

Returns:

The MBean domain name
getDomain
()

Provide the name of the domain to use to register MBeans for components associated with the connector.

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

public boolean

Returns:

true if processing can continue, otherwise false in which case an appropriate error will have been set on the response
prepare
(Request
The request object
req
,
Response
The response object
res
)

Prepare the given request/response for processing.

public void
service(Request
The request object
req
,
Response
The response object
res
)

Call the service method, and notify all listeners

Method Detail

asyncDispatchback to summary
public boolean asyncDispatch(Request req, Response res, SocketEvent status) throws Exception
checkRecycledback to summary
public 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

Request

res:Response

Response

getDomainback to summary
public String getDomain()

Provide the name of the domain to use to register MBeans for components associated with the connector.

Returns:String

The MBean domain name

logback to summary
public void log(Request req, Response res, long time)
prepareback to summary
public boolean prepare(Request req, Response res) throws Exception

Prepare the given request/response for processing. This method requires that the request object has been populated with the information available from the HTTP headers.

Parameters
req:Request

The request object

res:Response

The response object

Returns:boolean

true if processing can continue, otherwise false in which case an appropriate error will have been set on the response

Exceptions
Exception:
If the processing fails unexpectedly
serviceback to summary
public void service(Request req, Response res) throws Exception

Call the service method, and notify all listeners

Parameters
req:Request

The request object

res:Response

The response object

Exceptions
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 )