Package net.shibboleth.ext.spring.util
Class SpringExpressionConsumer<T>
- java.lang.Object
-
- net.shibboleth.ext.spring.util.AbstractSpringExpressionEvaluatorEx
-
- net.shibboleth.ext.spring.util.SpringExpressionConsumer<T>
-
- Type Parameters:
T- type of input
- All Implemented Interfaces:
Consumer<T>
public class SpringExpressionConsumer<T> extends AbstractSpringExpressionEvaluatorEx implements Consumer<T>
Predicate whose condition is defined by an Spring EL expression.- Since:
- 6.1.0
-
-
Field Summary
Fields Modifier and Type Field Description private Class<T>inputTypeClassInput type.private org.slf4j.LoggerlogClass logger.
-
Constructor Summary
Constructors Constructor Description SpringExpressionConsumer(String expression)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(T input)Class<T>getInputType()Get the input type to be enforced.protected voidprepareContext(EvaluationContext context, Object... input)Pre-process the script context before execution.voidsetInputType(Class<T> type)Set the input type to be enforced.-
Methods inherited from class net.shibboleth.ext.spring.util.AbstractSpringExpressionEvaluatorEx
evaluate, getCustomObject, getOutputType, getReturnOnError, setCustomObject, setHideExceptions, setOutputType, setReturnOnError
-
-
-
-
Constructor Detail
-
SpringExpressionConsumer
public SpringExpressionConsumer(@Nonnull @NotEmpty @ParameterName(name="expression") String expression)
Constructor.- Parameters:
expression- the expression to evaluate
-
-
Method Detail
-
getInputType
@Nullable public Class<T> getInputType()
Get the input type to be enforced.- Returns:
- input type
- Since:
- 6.1.0
-
setInputType
public void setInputType(@Nullable Class<T> type)Set the input type to be enforced.- Parameters:
type- input type- Since:
- 6.1.0
-
prepareContext
protected void prepareContext(@Nonnull EvaluationContext context, @Nullable Object... input)Pre-process the script context before execution.- Specified by:
prepareContextin classAbstractSpringExpressionEvaluatorEx- Parameters:
context- the expression contextinput- the inputs
-
-