Class PoolPluginsConfigurator.Builder
- java.lang.Object
-
- org.eclipse.keyple.core.service.resource.PoolPluginsConfigurator.Builder
-
- Enclosing class:
- PoolPluginsConfigurator
public static class PoolPluginsConfigurator.Builder extends java.lang.Object
Builder ofPoolPluginsConfigurator
.- Since:
- 2.0.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PoolPluginsConfigurator.Builder
addPoolPlugin(org.eclipse.keyple.core.service.PoolPlugin poolPlugin)
Adds aPoolPlugin
to the default list of all card profiles.PoolPluginsConfigurator
build()
Creates a new instance ofPoolPluginsConfigurator
using the current configuration.PoolPluginsConfigurator.Builder
usePoolFirst()
Configures the card resource service to search for available cards in pool plugins before regular plugins.
-
-
-
Method Detail
-
usePoolFirst
public PoolPluginsConfigurator.Builder usePoolFirst()
Configures the card resource service to search for available cards in pool plugins before regular plugins.Default value: pool last
- Returns:
- The current builder instance.
- Throws:
java.lang.IllegalStateException
- If the setting has already been configured.- Since:
- 2.0.0
-
addPoolPlugin
public PoolPluginsConfigurator.Builder addPoolPlugin(org.eclipse.keyple.core.service.PoolPlugin poolPlugin)
Adds aPoolPlugin
to the default list of all card profiles.Note: The order of the plugins is important because it will be kept during the allocation process unless redefined by card profiles.
- Parameters:
poolPlugin
- The pool plugin to add.- Returns:
- The current builder instance.
- Throws:
java.lang.IllegalArgumentException
- If the provided pool plugin is null.java.lang.IllegalStateException
- If the pool plugin has already been configured.- Since:
- 2.0.0
-
build
public PoolPluginsConfigurator build()
Creates a new instance ofPoolPluginsConfigurator
using the current configuration.- Returns:
- A new instance.
- Throws:
java.lang.IllegalStateException
- If no pool plugin has been configured.- Since:
- 2.0.0
-
-