org.infinispan.remoting.rpc
Interface ResponseFilter

All Known Implementing Classes:
ClusteredGetResponseValidityFilter

public interface ResponseFilter

A mechanism of filtering RPC responses. Used with RpcManager#invokeRemotely(java.util.List, org.infinispan.commands.ReplicableCommand, ResponseMode, long, boolean, ResponseFilter)

Since:
4.0
Author:
Manik Surtani

Method Summary
 boolean isAcceptable(Response response, Address sender)
          Determines whether a response from a given sender should be added to the response list of the request
 boolean needMoreResponses()
          Right after calling isAcceptable(Response, Address), this method is called to see whether we are done with the request and can unblock the caller
 

Method Detail

isAcceptable

boolean isAcceptable(Response response,
                     Address sender)
Determines whether a response from a given sender should be added to the response list of the request

Parameters:
response - The response (usually a serializable value)
sender - The sender of response
Returns:
True if we should add the response to the response list of a request, otherwise false. In the latter case, we don't add the response to the response list.

needMoreResponses

boolean needMoreResponses()
Right after calling isAcceptable(Response, Address), this method is called to see whether we are done with the request and can unblock the caller

Returns:
False if the request is done, otherwise true

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.