public class EmbosserCatalog extends Object implements FactoryCatalog<Embosser>, EmbosserCatalogService
| Constructor and Description |
|---|
EmbosserCatalog()
Creates a new empty instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFactory(EmbosserProvider factory)
Adds a factory (intended for use by the OSGi framework)
|
Embosser |
get(String identifier)
Gets the Factory with this identifier
|
Collection<EmbosserFactoryProperties> |
listEmbossers()
Lists embossers
|
Collection<EmbosserFactoryProperties> |
listEmbossers(EmbosserFilter filter)
Lists embossers matching the specified filter
|
Embosser |
newEmbosser(String identifier)
Creates a new embosser with the specified identifier.
|
static EmbosserCatalog |
newInstance()
Creates a new EmbosserCatalog and populates it using the SPI
(java service provider interface).
|
void |
removeFactory(EmbosserProvider factory)
Removes a factory (intended for use by the OSGi framework)
|
public EmbosserCatalog()
public static EmbosserCatalog newInstance()
Creates a new EmbosserCatalog and populates it using the SPI (java service provider interface).
In an OSGi context, an instance should be retrieved using the service registry. It will be registered under the EmbosserCatalogService interface.
public void addFactory(EmbosserProvider factory)
factory - the factory to addpublic void removeFactory(EmbosserProvider factory)
factory - the factory to removepublic Embosser get(String identifier)
FactoryCatalogget in interface FactoryCatalog<Embosser>identifier - the identifier for the requested Factorypublic Embosser newEmbosser(String identifier)
EmbosserCatalogServicenewEmbosser in interface EmbosserCatalogServiceidentifier - the identifierpublic Collection<EmbosserFactoryProperties> listEmbossers()
EmbosserCatalogServicelistEmbossers in interface EmbosserCatalogServicepublic Collection<EmbosserFactoryProperties> listEmbossers(EmbosserFilter filter)
EmbosserCatalogServicelistEmbossers in interface EmbosserCatalogServicefilter - the filter