| Modifier and Type | Field and Description |
|---|---|
| private ByteBuffer | |
| private final HttpField | |
| private final long | |
| private boolean | |
| private boolean | |
| private static final Logger |
| 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)Implements org. Invoked to handle the passed HTTP request and response. |
| private void | |
| public boolean | |
| public boolean | |
| public void | setServeFavIcon(boolean
true if the handle can server the jetty favicon.ico serveFavIcon)Set true if the handle can server the jetty favicon.ico. |
| public void | setServer(Server
the server)Server to associate to this HandlerOverrides org. Implements org. Server to associate to this Handler.
|
| public void | |
| public String | toString()
Overrides org. |
| _favicon | back to summary |
|---|---|
| private ByteBuffer _favicon | |
| _faviconModified | back to summary |
|---|---|
| private final HttpField _faviconModified | |
| _faviconModifiedMs | back to summary |
|---|---|
| private final long _faviconModifiedMs | |
| _serveFavIcon | back to summary |
|---|---|
| private boolean _serveFavIcon | |
| _showContexts | back to summary |
|---|---|
| private boolean _showContexts | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| DefaultHandler | back to summary |
|---|---|
| public DefaultHandler() | |
| DefaultHandler | back to summary |
|---|---|
| public DefaultHandler(boolean serveFavIcon, boolean showContexts) | |
| handle | back to summary |
|---|---|
| public boolean handle(Request request, Response response, Callback callback) throws Exception 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;
}
| |
| initFavIcon | back to summary |
|---|---|
| private void initFavIcon() | |
| isServeFavIcon | back to summary |
|---|---|
public boolean isServeFavIcon()
| |
| isShowContexts | back to summary |
|---|---|
public boolean isShowContexts()
| |
| setServeFavIcon | back to summary |
|---|---|
| public void setServeFavIcon(boolean serveFavIcon) Set true if the handle can server the jetty favicon.ico.
| |
| setServer | back to summary |
|---|---|
| public void setServer(Server server) Overrides org. Implements org. Doc from org. Set the | |
| setShowContexts | back to summary |
|---|---|
| public void setShowContexts(boolean show) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object. | |