public interface StrategyBuilder
StrategyRegistry, implementing a version of the Gang of Four Strategy pattern. The constructed service is configured with a number of adapters (that implement the same service interface). Method invocations on the service are routed to one of the adapters. The first parameter of each method is used to select the appropriate adapter. The ideal interface for use with this builder has only one method.
|Modifier and Type||Method and Description|
Given a number of adapters implementing the service interface, builds a "dispatcher" implementations that delegates to the one of the adapters.
<S> S build(StrategyRegistry<S> registry)
S- the service interface type
registry- defines the adapters based on parameter type (of the first parameter)
5.6.1 - Copyright © 2003-2020 The Apache Software Foundation.