edu.internet2.middleware.grouper.util
Class GrouperCallable<T>

java.lang.Object
  extended by edu.internet2.middleware.grouper.util.GrouperCallable<T>
Type Parameters:
T -
All Implemented Interfaces:
Callable<T>

public abstract class GrouperCallable<T>
extends Object
implements Callable<T>


Constructor Summary
GrouperCallable(String theLogLabel)
          construct with log label, use the static session if it exists
GrouperCallable(String theLogLabel, GrouperSession theGrouperSession)
           
 
Method Summary
 T call()
           
abstract  T callLogic()
          Computes a result
 T callLogicWithSessionIfExists()
          Computes a result
 String getLogLabel()
          describes the callable
 boolean isWillRetry()
           
 void setWillRetry(boolean willRetry)
           
static void throwRuntimeException(Throwable throwable)
          convert exception
static void tryCallablesWithProblems(Collection<GrouperCallable> callablesWithProblems)
          note, call this in your grouper session, this runs in current thread
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrouperCallable

public GrouperCallable(String theLogLabel,
                       GrouperSession theGrouperSession)
Parameters:
theGrouperSession -
theLogLabel -

GrouperCallable

public GrouperCallable(String theLogLabel)
construct with log label, use the static session if it exists

Parameters:
theLogLabel -
Method Detail

getLogLabel

public String getLogLabel()
describes the callable

Returns:
the logLabel

tryCallablesWithProblems

public static void tryCallablesWithProblems(Collection<GrouperCallable> callablesWithProblems)
note, call this in your grouper session, this runs in current thread

Parameters:
callablesWithProblems -

throwRuntimeException

public static void throwRuntimeException(Throwable throwable)
convert exception

Parameters:
throwable -

isWillRetry

public boolean isWillRetry()
Returns:
the willRetry

setWillRetry

public void setWillRetry(boolean willRetry)
Parameters:
willRetry - the willRetry to set

call

public final T call()
             throws Exception
Specified by:
call in interface Callable<T>
Throws:
Exception
See Also:
Callable.call()

callLogicWithSessionIfExists

public final T callLogicWithSessionIfExists()
Computes a result

Returns:
computed result

callLogic

public abstract T callLogic()
Computes a result

Returns:
computed result