org.ov4j.retry
Class RetryCaller

java.lang.Object
  extended by org.ov4j.retry.RetryCaller
All Implemented Interfaces:
java.lang.Runnable

public class RetryCaller
extends java.lang.Object
implements java.lang.Runnable

This class performs the retriable calls.

Author:
smolloy

Constructor Summary
RetryCaller(RetryableCall theCall, RetryHandler theHandler)
          Constructor.
 
Method Summary
 RetryableCall getTheCall()
           
 java.lang.Object getTheResult()
           
 void run()
          Will retry the call the specified number of times and will notify the instance when it reaches the maximum number of retries or it has a successful result.
 void setTheCall(RetryableCall theCall)
           
 void setTheResult(java.lang.Object theResult)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RetryCaller

public RetryCaller(RetryableCall theCall,
                   RetryHandler theHandler)
Constructor.

Parameters:
theCall - The call to retry.
theHandler - The RetryHandler.
Method Detail

getTheCall

public RetryableCall getTheCall()
Returns:
Returns the theCall.

getTheResult

public java.lang.Object getTheResult()
Returns:
Returns the theResult.

run

public void run()
Will retry the call the specified number of times and will notify the instance when it reaches the maximum number of retries or it has a successful result.

Specified by:
run in interface java.lang.Runnable
See Also:
Runnable.run()

setTheCall

public void setTheCall(RetryableCall theCall)
Parameters:
theCall - The theCall to set.

setTheResult

public void setTheResult(java.lang.Object theResult)
Parameters:
theResult - The theResult to set.


Copyright © 2004-2007 Steve Molloy. All Rights Reserved.