| Modifier and Type | Class and Description |
|---|---|
| protected abstract static class | |
| protected static class | |
| protected static class |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | handle(Request
the HTTP request to handle request, Response the HTTP response to handle response, Callback the callback to complete when the handling is complete callback)Overrides org. Implements org. Invoked to handle the passed HTTP request and response. |
| protected DelayedHandler. |
| DelayedHandler | back to summary |
|---|---|
| public DelayedHandler() | |
| DelayedHandler | back to summary |
|---|---|
| public DelayedHandler(Handler handler) | |
| handle | back to summary |
|---|---|
| public boolean handle(Request request, Response response, Callback callback) throws Exception Overrides org. Implements org. Doc from org. Invoked to handle the passed HTTP request and response. The request is accepted by returning true, then handling must be concluded by completing the passed callback. The handling may be asynchronous, i.e. this method may return true and complete the given callback later, possibly from a different thread. If this method returns false, then the callback must not be invoked and any mutation on the response reversed. Exceptions thrown by this method may be subsequently handled by an error The simplest implementation is:
public boolean handle(Request request, Response response, Callback callback)
{
callback.succeeded();
return true;
}
A HelloWorld implementation is:
public boolean handle(Request request, Response response, Callback callback)
{
response.write(true, ByteBuffer.wrap("Hello World\n".getBytes(StandardCharsets.UTF_8)), callback);
return true;
}
| |
| newDelayedProcess | back to summary |
|---|---|
| protected DelayedHandler. | |
| Modifier and Type | Field and Description |
|---|---|
| private final Callback | |
| private final Handler | |
| private final Request | |
| private final Response |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract void | |
| protected Callback | |
| protected Handler | |
| protected Request | |
| protected Response | |
| protected void |
| _callback | back to summary |
|---|---|
| private final Callback _callback | |
| _handler | back to summary |
|---|---|
| private final Handler _handler | |
| _request | back to summary |
|---|---|
| private final Request _request | |
| _response | back to summary |
|---|---|
| private final Response _response | |
| DelayedProcess | back to summary |
|---|---|
| protected DelayedProcess(Handler handler, Request request, Response response, Callback callback) | |
| delay | back to summary |
|---|---|
| protected abstract void delay() throws Exception | |
| getCallback | back to summary |
|---|---|
| protected Callback getCallback() | |
| getHandler | back to summary |
|---|---|
| protected Handler getHandler() | |
| getRequest | back to summary |
|---|---|
| protected Request getRequest() | |
| getResponse | back to summary |
|---|---|
| protected Response getResponse() | |
| process | back to summary |
|---|---|
| protected void process() | |
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| public void |
| UntilContentDelayedProcess | back to summary |
|---|---|
| public UntilContentDelayedProcess(Handler handler, Request request, Response response, Callback callback) | |
| delay | back to summary |
|---|---|
| protected void delay() Implements abstract org.
| |
| onContent | back to summary |
|---|---|
| public void onContent() | |
| Modifier and Type | Field and Description |
|---|---|
| private final AtomicReference |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Content. | read()
Overrides org. Implements org. Reads a chunk of content. |
| _chunk | back to summary |
|---|---|
| private final AtomicReference<Content. | |
| RewindChunkRequest | back to summary |
|---|---|
| public RewindChunkRequest(Request wrapped, Content. | |
| read | back to summary |
|---|---|
| public Content. Overrides org. Implements org. Doc from org. Reads a chunk of content. See how to use this method idiomatically. The returned chunk could be:
Once a read returns an Once a read returns a The content reader code must ultimately arrange for a call to
Additionally, prior to the ultimate call to Concurrent reads from different threads are not recommended, as they are inherently in a race condition. Reads performed outside the invocation context of a
In addition, the returned
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| private void | |
| private void |
| _charset | back to summary |
|---|---|
| private final Charset _charset | |
| UntilFormDelayedProcess | back to summary |
|---|---|
| public UntilFormDelayedProcess(Handler handler, Request wrapped, Response response, Callback callback, String contentType) | |
| delay | back to summary |
|---|---|
| protected void delay() Implements abstract org.
| |
| executeProcess | back to summary |
|---|---|
| private void executeProcess(Fields fields, Throwable x) | |
| process | back to summary |
|---|---|
| private void process(Fields fields, Throwable x) | |