|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.logicblaze.lingo.DefaultResultJoinStrategy
public class DefaultResultJoinStrategy
A default implementation of ResultJoinStrategy
which will add
together collection results, unblock the calling thread when there is a
single result and let the handler timeout with whatever the default handler
timeout policy is.
Constructor Summary | |
---|---|
DefaultResultJoinStrategy()
|
Method Summary | |
---|---|
int |
getMaximumResults()
|
int |
getMinimumResults()
|
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. |
void |
setMaximumResults(int maximumResults)
|
void |
setMinimumResults(int minimiumResults)
|
boolean |
unblockAfterTimeout(org.springframework.remoting.support.RemoteInvocationResult currentResult,
long waitSoFarMillis)
After we timeout in the ResultJoinHandler waiting for responses this method is called to see if we should stop processing and return the results we have (or null if none). |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultResultJoinStrategy()
Method Detail |
---|
public boolean unblockCallerThread(org.springframework.remoting.support.RemoteInvocationResult response, int responseCount)
ResultJoinStrategy
unblockCallerThread
in interface ResultJoinStrategy
public boolean removeHandler(org.springframework.remoting.support.RemoteInvocationResult response, int responseCount)
ResultJoinStrategy
removeHandler
in interface ResultJoinStrategy
public org.springframework.remoting.support.RemoteInvocationResult mergeResponses(org.springframework.remoting.support.RemoteInvocationResult currentResult, org.springframework.remoting.support.RemoteInvocationResult newResult, int responseCount)
ResultJoinStrategy
mergeResponses
in interface ResultJoinStrategy
public boolean unblockAfterTimeout(org.springframework.remoting.support.RemoteInvocationResult currentResult, long waitSoFarMillis)
ResultJoinStrategy
unblockAfterTimeout
in interface ResultJoinStrategy
public int getMaximumResults()
public void setMaximumResults(int maximumResults)
public int getMinimumResults()
public void setMinimumResults(int minimiumResults)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |