Class PoolPluginsConfigurator.Builder

java.lang.Object
org.eclipse.keyple.core.service.resource.PoolPluginsConfigurator.Builder
Enclosing class:
PoolPluginsConfigurator

public static final class PoolPluginsConfigurator.Builder extends Object
Since:
2.0.0
  • Method Details

    • 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:
      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 a PoolPlugin 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:
      IllegalArgumentException - If the provided pool plugin is null.
      IllegalStateException - If the pool plugin has already been configured.
      Since:
      2.0.0
    • build

      public PoolPluginsConfigurator build()
      Creates a new instance of PoolPluginsConfigurator using the current configuration.
      Returns:
      A new instance.
      Throws:
      IllegalStateException - If no pool plugin has been configured.
      Since:
      2.0.0