| Modifier and Type | Field and Description |
|---|---|
| private final DateCache | |
| private OutputStream | |
| private PrintStream |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | doStart()
Overrides org. |
| protected void | doStop()
Stops the managed lifecycle beans in the reverse order they were added.
|
| public OutputStream | |
| 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. |
| public void | |
| public void | |
| private void | |
| public void |
| _date | back to summary |
|---|---|
| private final DateCache _date | |
| _out | back to summary |
|---|---|
| private OutputStream _out | |
| _print | back to summary |
|---|---|
| private PrintStream _print | |
| DebugHandler | back to summary |
|---|---|
| public DebugHandler() | |
| DebugHandler | back to summary |
|---|---|
| public DebugHandler(Handler handler) | |
| doStart | back to summary |
|---|---|
| protected void doStart() throws Exception Overrides org. Doc from org. Starts the managed lifecycle beans in the order they were added.
| |
| doStop | back to summary |
|---|---|
| protected void doStop() throws Exception Overrides org. Doc from org. Stops the managed lifecycle beans in the reverse order they were added.
| |
| getOutputStream | back to summary |
|---|---|
| public OutputStream getOutputStream() Get the out.
| |
| 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;
}
| |
| onClosed | back to summary |
|---|---|
| public void onClosed(Connection connection) Overrides default org.
| |
| onOpened | back to summary |
|---|---|
| public void onOpened(Connection connection) Overrides default org.
| |
| back to summary | |
|---|---|
| private void print(String name, String message) | |
| setOutputStream | back to summary |
|---|---|
| public void setOutputStream(OutputStream out) Set the out to set.
| |