[Index]

bus:collect


A component that collects beans in a list. Additionally, this component may be used in the middle of a bus:bus so can act as a Wire Tap.

Property Summary

beans The same as list.
count Count of items collected.
keyMapper A function that will extract a key from an item.
list The collected items as list container.
map The collected items as a map container.
name The name of this component.
output An output stream that items will be written to as strings.
to The next component in a bus.
valueMapper A function that will extract a value from an item to put in the map.

Example Summary

Example 1 There are many examples elsewhere.

Property Detail

beans

AccessREAD_ONLY
RequiredRead only.

The same as list. Prefer list, will be deprecated in future versions.

count

AccessREAD_ONLY
RequiredR/O.

Count of items collected.

keyMapper

Configured ByELEMENT
AccessREAD_WRITE
RequiredNo.

A function that will extract a key from an item. If this property is set, items will be available as a map, not a list.

list

AccessREAD_ONLY
RequiredRead only.

The collected items as list container. Conversions exist so that this list property can be used as a list or the values can be accessed using an indexed accessor on the value property.

map

AccessREAD_ONLY
RequiredRead only.

The collected items as a map container. Conversions exist so that this map property can be used as a map or the values can be accessed using a mapped accessor on the value property.

name

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

The name of this component.

output

Configured ByELEMENT
AccessREAD_WRITE
RequiredNo.

An output stream that items will be written to as strings.

to

Configured ByELEMENT
AccessREAD_WRITE
RequiredNo.

The next component in a bus. Set automatically in a bus:bus.

valueMapper

Configured ByELEMENT
AccessREAD_WRITE
RequiredNo.

A function that will extract a value from an item to put in the map. If this property is set, but bus:collect is not, then it will be silently ignored.


Examples

Example 1

There are many examples elsewhere.


(c) R Gordon Ltd 2005 - Present