Package org.elasticsearch.http
Interface HttpServerTransport.Dispatcher
- All Known Implementing Classes:
RestController
- Enclosing interface:
- HttpServerTransport
public static interface HttpServerTransport.Dispatcher
Dispatches HTTP requests.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispatchBadRequest(RestChannel channel, ThreadContext threadContext, Throwable cause)
Dispatches a bad request.void
dispatchRequest(RestRequest request, RestChannel channel, ThreadContext threadContext)
Dispatches theRestRequest
to the relevant request handler or responds to the given rest channel directly if the request can't be handled by any request handler.
-
Method Details
-
dispatchRequest
Dispatches theRestRequest
to the relevant request handler or responds to the given rest channel directly if the request can't be handled by any request handler.- Parameters:
request
- the request to dispatchchannel
- the response channel of this requestthreadContext
- the thread context
-
dispatchBadRequest
Dispatches a bad request. For example, if a request is malformed it will be dispatched via this method with the cause of the bad request.- Parameters:
channel
- the response channel of this requestthreadContext
- the thread contextcause
- the cause of the bad request
-