org.logicblaze.lingo
Interface ResultJoinStrategy

All Known Implementing Classes:
DefaultResultJoinStrategy

public interface ResultJoinStrategy

A Strategy pattern describing how to join multiple results together, to decide when it is safe to unblock the calling client thread and when a request can be considered to be complete.

Version:
$Revision$

Method Summary
 org.springframework.remoting.support.RemoteInvocationResult mergeResponses(org.springframework.remoting.support.RemoteInvocationResult currentResult, org.springframework.remoting.support.RemoteInvocationResult newResult, int responseCount)
          Merges the new response with the previous response object.
 boolean removeHandler(org.springframework.remoting.support.RemoteInvocationResult response, int responseCount)
          Returns true if there have been sufficient responses to remove the handler from the system.
 boolean unblockCallerThread(org.springframework.remoting.support.RemoteInvocationResult response, int responseCount)
          Returns true if the calling thread should be unblocked after calling the method and so returning the current value of the invocation result; future responses could still mutate the result object if required.
 

Method Detail

unblockCallerThread

boolean unblockCallerThread(org.springframework.remoting.support.RemoteInvocationResult response,
                            int responseCount)
Returns true if the calling thread should be unblocked after calling the method and so returning the current value of the invocation result; future responses could still mutate the result object if required. The default implementation will return true after a single response is returned.


removeHandler

boolean removeHandler(org.springframework.remoting.support.RemoteInvocationResult response,
                      int responseCount)
Returns true if there have been sufficient responses to remove the handler from the system. Typically handlers should expire after some inactivity timeout.


mergeResponses

org.springframework.remoting.support.RemoteInvocationResult mergeResponses(org.springframework.remoting.support.RemoteInvocationResult currentResult,
                                                                           org.springframework.remoting.support.RemoteInvocationResult newResult,
                                                                           int responseCount)
Merges the new response with the previous response object. The default implementation just merges collections together otherwise the first response wins.



Copyright © 2005-2006 LogicBlaze, Inc.. All Rights Reserved.