Class CardResourceProfileConfigurator.Builder
java.lang.Object
org.eclipse.keyple.core.service.resource.CardResourceProfileConfigurator.Builder
- Enclosing class:
- CardResourceProfileConfigurator
Builder of
CardResourceProfileConfigurator
.- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates a new instance ofCardResourceProfileConfigurator
using the current configuration.withPlugins
(org.eclipse.keyple.core.service.Plugin... plugins) Restricts the scope of the search during the allocation process to the provided plugins.withReaderGroupReference
(String readerGroupReference) Sets a filter to target all card having the provided specific reader group reference.withReaderNameRegex
(String readerNameRegex) Sets a filter targeting all card readers having a name matching the provided regular expression.
-
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 methodCardResourceServiceConfigurator.configure()
).- Since:
- 2.0.0
-
withReaderNameRegex
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 ofCardResourceProfileConfigurator
using the current configuration.- Returns:
- A new instance.
- Since:
- 2.0.0
-