ExpressionConsumer

The bean named shibboleth.Consumers.Expression executes a Spring Expression Language (SpEL) expression to implement an arbitrary Consumer signature.

The bean named shibboleth.BiConsumers.Expression executes a Spring Expression Language (SpEL) expression to implement an arbitrary BiConsumer signature.

An Expression Consumer is instantiated by supplying a string argument that contains a SpEL expression to evaluate.

Example

<bean id="MyConsumer" parent="shibboleth.Consumers.Expression" c:expression="#input.doSomething()" />

Reference

The  following additional bean properties are available:

PropertyName

Type

Default

Description

PropertyName

Type

Default

Description

customObject

Bean/Reference



An object to make available to the script via a variable named custom

hideExceptions

boolean

false

If true, then any exception raised is masked

inputType

(Consumer variant)

Class<?>



Adds type checking against the input to the consumer to enforce type safety

inputTypes

(BiConsumer variant)

Pair<Class<?>,Class<?>>



Adds type checking against the input to the consumer to enforce type safety

For the Consumer variant, the expression environment will have these variables populated:

  • input - the input

  • custom - the object set via the customObject property, if any

For the BiConsumer variant, the expression environment will have these variables populated:

  • input1 - the first input

  • input2 - the second input

  • custom - the object set via the customObject property, if any

Â