Object
MessageResponse
Response message sent to the client
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn error handler if anyMessage responseboolean
Return whetherwithCloseOnResponse()
is set or notboolean
Return whetherwithIgnoreNextRequest()
is set or notClose the connection after response is sent.withErrorHandler
(Consumer<Throwable> errorHandler) Set up error handler which will be called in case of an error delivering the message response to the client.By default every time your service provides a *response* message, ICE sends it back to the client and waits for the next *request* message from it (see ICE looper description).
-
Constructor Details
-
MessageResponse
- Parameters:
message
- message to be sent to the client
-
-
Method Details
-
withCloseOnResponse
Close the connection after response is sent. -
withIgnoreNextRequest
By default every time your service provides a *response* message, ICE sends it back to the client and waits for the next *request* message from it (see ICE looper description).With this flag set ICE will not wait for next request from the client instead it will proceed to
MessageService
for another message which needs to be send to the client.You may want to use it when you need your service to send stream of messages.
-
withErrorHandler
Set up error handler which will be called in case of an error delivering the message response to the client. -
getMessage
Message response -
shouldCloseOnResponse
public boolean shouldCloseOnResponse()Return whetherwithCloseOnResponse()
is set or not -
shouldIgnoreNextRequest
public boolean shouldIgnoreNextRequest()Return whetherwithIgnoreNextRequest()
is set or not -
getErrorHandler
Return error handler if any
-