Interface Controller.CustomMessageHandler<REQUEST,RESPONSE>
- Type Parameters:
REQUEST
- The type of request message.RESPONSE
- The type of the response message.
- Enclosing interface:
- Controller
public static interface Controller.CustomMessageHandler<REQUEST,RESPONSE>
Defines how the Controller should handle custom messages. Implementations need to be threadsafe.
-
Method Summary
Modifier and TypeMethodDescriptionHandle an incoming message.
-
Method Details
-
onMessage
Controller.CustomResponse<RESPONSE> onMessage(REQUEST pBody, DrillBuf dBody) throws UserRpcException Handle an incoming message.- Parameters:
pBody
- The protobuf body message object of type REQUEST that was sent.dBody
- An optional byte body that was sent along with the structured message.- Returns:
- The response that should be sent to the message sender.
- Throws:
UserRpcException
- throw this exception if there is an RPC failure that should be communicated to the sender.
-