Class CardResourceProfileConfigurator.Builder
- java.lang.Object
-
- org.eclipse.keyple.core.service.resource.CardResourceProfileConfigurator.Builder
-
- Enclosing class:
- CardResourceProfileConfigurator
public static final class CardResourceProfileConfigurator.Builder extends java.lang.Object
Builder ofCardResourceProfileConfigurator
.- Since:
- 2.0.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CardResourceProfileConfigurator
build()
Creates a new instance ofCardResourceProfileConfigurator
using the current configuration.CardResourceProfileConfigurator.Builder
withPlugins(org.eclipse.keyple.core.service.Plugin... plugins)
Restricts the scope of the search during the allocation process to the provided plugins.CardResourceProfileConfigurator.Builder
withReaderGroupReference(java.lang.String readerGroupReference)
Sets a filter to target all card having the provided specific reader group reference.CardResourceProfileConfigurator.Builder
withReaderNameRegex(java.lang.String readerNameRegex)
Sets a filter targeting all card readers having a name matching the provided regular expression.
-
-
-
Method Detail
-
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:
java.lang.IllegalArgumentException
- If one or more plugin are null or empty.java.lang.IllegalStateException
- If one or more plugins are not previously configured (performed by the methodCardResourceServiceConfigurator.configure()
).- Since:
- 2.0.0
-
withReaderNameRegex
public CardResourceProfileConfigurator.Builder withReaderNameRegex(java.lang.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:
java.lang.IllegalArgumentException
- If the readerNameRegex is null, empty or invalid.java.lang.IllegalStateException
- If the filter has already been set.- Since:
- 2.0.0
-
withReaderGroupReference
public CardResourceProfileConfigurator.Builder withReaderGroupReference(java.lang.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:
java.lang.IllegalArgumentException
- If the readerGroupReference is null or empty.java.lang.IllegalStateException
- If the filter has already been set.- Since:
- 2.0.0
-
build
public CardResourceProfileConfigurator build()
Creates a new instance ofCardResourceProfileConfigurator
using the current configuration.- Returns:
- A new instance.
- Since:
- 2.0.0
-
-