org.ow2.cmi.lb.decision
Class BasicDecisionManager<ReturnType>

java.lang.Object
  extended by org.ow2.cmi.lb.decision.BasicDecisionManager<ReturnType>
Type Parameters:
ReturnType - the type of the returned value (can be Void)
All Implemented Interfaces:
org.ow2.cmi.lb.decision.DecisionManager<ReturnType>

@Immutable
public final class BasicDecisionManager<ReturnType>
extends java.lang.Object
implements org.ow2.cmi.lb.decision.DecisionManager<ReturnType>

Encapsulates a decision and an eventually returned value.

Author:
The new CMI team

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.ow2.cmi.lb.decision.DecisionManager
org.ow2.cmi.lb.decision.DecisionManager.Decision
 
Method Summary
static BasicDecisionManager<java.lang.Void> doRetry()
          Creates a RETRY decision.
static
<ReturnType>
BasicDecisionManager<ReturnType>
doReturn(ReturnType retVal)
          Creates a RETURN decision.
static BasicDecisionManager<java.lang.Void> doThrow(java.lang.Throwable throwable)
          Creates a THROW decision.
 org.ow2.cmi.lb.decision.DecisionManager.Decision getDecision()
           
 ReturnType getRetVal()
           
 java.lang.Throwable getThrowable()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

doRetry

public static BasicDecisionManager<java.lang.Void> doRetry()
Creates a RETRY decision.

Returns:
RETRY

doThrow

public static BasicDecisionManager<java.lang.Void> doThrow(java.lang.Throwable throwable)
Creates a THROW decision.

Parameters:
throwable - an exception to throw
Returns:
THROW

doReturn

public static <ReturnType> BasicDecisionManager<ReturnType> doReturn(ReturnType retVal)
Creates a RETURN decision.

Type Parameters:
ReturnType - the type of the returned value (can be Void)
Parameters:
retVal - the value to return
Returns:
RETURN

getDecision

public org.ow2.cmi.lb.decision.DecisionManager.Decision getDecision()
Specified by:
getDecision in interface org.ow2.cmi.lb.decision.DecisionManager<ReturnType>
Returns:
the decision

getRetVal

public ReturnType getRetVal()
Specified by:
getRetVal in interface org.ow2.cmi.lb.decision.DecisionManager<ReturnType>
Returns:
the returned value

getThrowable

public java.lang.Throwable getThrowable()
Specified by:
getThrowable in interface org.ow2.cmi.lb.decision.DecisionManager<ReturnType>
Returns:
an exception to throw


Copyright © 2009 OW2 Consortium. All Rights Reserved.