Class CardResourceProfileConfigurator.Builder

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

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

    • withPlugins

      public CardResourceProfileConfigurator.Builder withPlugins(org.eclipse.keyple.core.service.Plugin... plugins)
      Restricts the scope of the search during the allocation process to the provided plugins.

      If this setter is not invoked, all global configured plugins will be used as search domain during the allocation process.

      Note: The order of the plugins is important because it will be kept during the allocation process, but the pool plugins allocation strategy is defined by PoolPluginsConfigurator.

      Parameters:
      plugins - An ordered list of plugins.
      Returns:
      The current builder instance.
      Throws:
      IllegalArgumentException - If one or more plugin are null or empty.
      IllegalStateException - If one or more plugins are not previously configured (performed by the method CardResourceServiceConfigurator.configure()).
      Since:
      2.0.0
    • withReaderNameRegex

      public CardResourceProfileConfigurator.Builder withReaderNameRegex(String readerNameRegex)
      Sets a filter targeting all card readers having a name matching the provided regular expression.

      This filter is useful for readers associated to "regular" plugins only.

      Parameters:
      readerNameRegex - A regular expression.
      Returns:
      The current builder instance.
      Throws:
      IllegalArgumentException - If the readerNameRegex is null, empty or invalid.
      IllegalStateException - If the filter has already been set.
      Since:
      2.0.0
    • withReaderGroupReference

      public CardResourceProfileConfigurator.Builder withReaderGroupReference(String readerGroupReference)
      Sets a filter to target all card having the provided specific reader group reference.

      * This filter is useful for readers associated to "pool" plugins only.

      Parameters:
      readerGroupReference - A reader group reference.
      Returns:
      The current builder instance.
      Throws:
      IllegalArgumentException - If the readerGroupReference is null or empty.
      IllegalStateException - If the filter has already been set.
      Since:
      2.0.0
    • build

      Creates a new instance of CardResourceProfileConfigurator using the current configuration.
      Returns:
      A new instance.
      Since:
      2.0.0