Selector

From DocDataFlow
Jump to: navigation, search

A selector is a composite adapter.

It manages a group of two or more 'sub-adapters'.

When it receives a granule through its input connection, it will use the granule acceptance mechanism to decide which the most appropriate target adapter is, and it will send the granule to one (and only one) of its sub-adapters.

The output connection of the selector serves as the 'default option': if none of the sub-adapters is prepared to accept a particular granule, then the granule is routed through the output connection of the selector.

Selector.png

The sub-adapters are in a sequential list; the position of a sub-adapter in the list is important.

The sub-adapters are tried out in sequence: the first adapter willing to accept a particular granule will be the one selected. Any subsequent adapters in the selector's sub-adapter list don't even get to 'see' the granule once it's routed to the selected sub-adapter.