org.equilibriums.aop.utils.interceptor.composite.handlers
Class BooleanReturnValueHandler

java.lang.Object
  extended by org.equilibriums.aop.utils.interceptor.composite.handlers.BooleanReturnValueHandler
All Implemented Interfaces:
ReturnValueHandler

public class BooleanReturnValueHandler
extends Object
implements ReturnValueHandler

Assumes returnType is of Boolean type.

Depending on BooleanOperator will return result of only "AND" or "OR" operation across all return values.

Author:
Tsolak Petrosian

Nested Class Summary
static class BooleanReturnValueHandler.BooleanOperator
           
 
Constructor Summary
BooleanReturnValueHandler()
           
 
Method Summary
 BooleanReturnValueHandler.BooleanOperator getBooleanOperator()
           
 Object getReturnValue(Class<? extends Object> returnType, Object[] returnValues)
           
 void setBooleanOperator(BooleanReturnValueHandler.BooleanOperator booleanOperator)
           
 boolean supports(Class<? extends Object> returnType, Object[] returnValues)
          Called by CompositeDelegateInterceptor after all delegates are invoked with their retun values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanReturnValueHandler

public BooleanReturnValueHandler()
Method Detail

getBooleanOperator

public BooleanReturnValueHandler.BooleanOperator getBooleanOperator()

setBooleanOperator

public void setBooleanOperator(BooleanReturnValueHandler.BooleanOperator booleanOperator)

supports

public boolean supports(Class<? extends Object> returnType,
                        Object[] returnValues)
Description copied from interface: ReturnValueHandler
Called by CompositeDelegateInterceptor after all delegates are invoked with their retun values.

Specified by:
supports in interface ReturnValueHandler
Returns:
If true than getReturnValue will be called with same returnType and returnValues.

getReturnValue

public Object getReturnValue(Class<? extends Object> returnType,
                             Object[] returnValues)
Specified by:
getReturnValue in interface ReturnValueHandler


Copyright © 2011. All Rights Reserved.