This connector uses efficient NIO buffers with a non blocking threading model. Direct NIO buffers are used and threads are only allocated to connections with requests. Synchronization is used to simulate blocking for the servlet API, and any unflushed content at the end of request handling is written asynchronously.
This connector is best used when there are a many connections that have idle periods.
When used with {@link org.eclipse.jetty.continuation.Continuation}, threadless waits are supported. If a filter or servlet returns after calling {@link Continuation#suspend()} or when aruntime exception is thrown from a call to {@link Continuation#undispatch()}, Jetty will will not send a response to the client. Instead the thread is released and the Continuation is placed on the timer queue. If the Continuation timeout expires, or it's resume method is called, then the request is again allocated a thread and the request is retried. The limitation of this approach is that request content is not available on the retried request, thus if possible it should be read after the continuation or saved as a request attribute or as the associated object of the Continuation instance.
@org.apache.xbean.XBean element="nioConnector" description="Creates an NIO based socket connector"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|