Package net.sf.eBus.client
Interface CancelRequestCallback
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface CancelRequestCallbackA class implementingEReplieris not required to overrideEReplier.cancelRequest(EReplyFeed.ERequest, boolean). Instead, a Java lambda expression forCancelRequestCallbackmay be passed toEReplyFeed.Builder.cancelRequestCallback(CancelRequestCallback)and the lambda expression code will be executed when a request is canceled.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcall(EReplyFeed.ERequest request, boolean mayRespond)With eBus release 5.6.0 a second, parameter is added:mayRespond.
-
-
-
Method Detail
-
call
void call(EReplyFeed.ERequest request, boolean mayRespond)
With eBus release 5.6.0 a second, parameter is added:mayRespond. Iftruethe replier accepts the cancel request, the replier should respond with an appropriatereply message(note that a newEReplyMessage.ReplyStatushas been added:CANCELED). If the replier rejects this cancel request then it may respond with aEReplyMessagewith a status ofCANCEL_REJECTand a reason for the reject. does nothing and continues to work the request.if
mayRespondisfalsethen this is a unilateral request cancellation. The request is shut down and no further replies will be accepted. However, in-flight replies posted prior to cancellation may still be delivered.requestmatches the replier's open and advertisedfeed. The associatedEReplyFeedmay be retrieved by callingEReplyFeed.ERequest.replier().- Parameters:
request- cancel this request.mayRespond- set totrueif replier is allowed to respond to the cancel request. This allows the replier to accept or reject the request cancellation.
-
-