public interface RequestHandler
Modifier and Type | Method and Description |
---|---|
Object |
handle(Message msg)
Processes a request synchronously, ie.
|
default void |
handle(Message request,
Response response)
Processes a request asynchronously.
|
Object handle(Message msg) throws Exception
msg
- the message containing the requestException
default void handle(Message request, Response response) throws Exception
Response.send(Object,boolean)
should
be called.request
- The requestresponse
- The response implementation. Contains information needed to send the reply (e.g. a request ID).
If no response is required, e.g. because this is an asynchronous RPC, then response will be null.Exception
- If an exception is thrown (e.g. in case of an issue submitting the request to a thread pool,
the exception will be taken as return value and will be sent as a response. In this case,
Response.send(Object,boolean)
must not be calledCopyright © 2018 JBoss, a division of Red Hat. All rights reserved.