Class UpsamplerSpiRegistryImpl
- java.lang.Object
-
- org.esa.snap.core.gpf.common.resample.UpsamplerSpiRegistryImpl
-
- All Implemented Interfaces:
UpsamplerSpiRegistry
public class UpsamplerSpiRegistryImpl extends Object implements UpsamplerSpiRegistry
Created by obarrile on 11/04/2019.
-
-
Constructor Summary
Constructors Constructor Description UpsamplerSpiRegistryImpl(ServiceRegistry<UpsamplerSpi> serviceRegistry)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addUpsamplerSpi(String alias, UpsamplerSpi upsamplerSpi)
Adds the givenupsamplerSpi
to this registry.boolean
addUpsamplerSpi(UpsamplerSpi upsamplerSpi)
Adds the givenoperatorSpi
to this registry.Set<String>
getAliases()
Gets the set of all aliases.ServiceRegistry<UpsamplerSpi>
getServiceRegistry()
Gets theServiceRegistry
UpsamplerSpi
getUpsamplerSpi(String alias)
Gets a registered upsampler SPI.Set<UpsamplerSpi>
getUpsamplerSpis()
void
loadUpsamplerSpis()
Loads the SPIs defined inMETA-INF/services
.boolean
removeUpsamplerSpi(UpsamplerSpi upsamplerSpi)
Removes the givenupsamplerSpi
this registry.
-
-
-
Constructor Detail
-
UpsamplerSpiRegistryImpl
public UpsamplerSpiRegistryImpl(ServiceRegistry<UpsamplerSpi> serviceRegistry)
The constructor.- Parameters:
serviceRegistry
- The underlying service registry used by this instance.
-
-
Method Detail
-
loadUpsamplerSpis
public void loadUpsamplerSpis()
Loads the SPIs defined inMETA-INF/services
.- Specified by:
loadUpsamplerSpis
in interfaceUpsamplerSpiRegistry
-
getUpsamplerSpis
public Set<UpsamplerSpi> getUpsamplerSpis()
- Specified by:
getUpsamplerSpis
in interfaceUpsamplerSpiRegistry
- Returns:
- The set of all registered operator SPIs.
-
getServiceRegistry
public ServiceRegistry<UpsamplerSpi> getServiceRegistry()
Gets theServiceRegistry
- Specified by:
getServiceRegistry
in interfaceUpsamplerSpiRegistry
- Returns:
- the
service registry
-
getUpsamplerSpi
public UpsamplerSpi getUpsamplerSpi(String alias)
Gets a registered upsampler SPI.- Specified by:
getUpsamplerSpi
in interfaceUpsamplerSpiRegistry
- Parameters:
alias
- A name identifying the upsampler SPI.- Returns:
- the upsampler SPI, or
null
-
addUpsamplerSpi
public boolean addUpsamplerSpi(UpsamplerSpi upsamplerSpi)
Adds the givenoperatorSpi
to this registry.- Specified by:
addUpsamplerSpi
in interfaceUpsamplerSpiRegistry
- Parameters:
upsamplerSpi
- the SPI to add- Returns:
true
, if theUpsamplerSpi
could be successfully added, otherwisefalse
-
addUpsamplerSpi
public boolean addUpsamplerSpi(String alias, UpsamplerSpi upsamplerSpi)
Adds the givenupsamplerSpi
to this registry.- Specified by:
addUpsamplerSpi
in interfaceUpsamplerSpiRegistry
- Parameters:
upsamplerSpi
- the SPI to add- Returns:
true
, if theUpsamplerSpi
could be successfully added, otherwisefalse
-
removeUpsamplerSpi
public boolean removeUpsamplerSpi(UpsamplerSpi upsamplerSpi)
Removes the givenupsamplerSpi
this registry.- Specified by:
removeUpsamplerSpi
in interfaceUpsamplerSpiRegistry
- Parameters:
upsamplerSpi
- the SPI to remove- Returns:
true
, if the SPI could be removed, otherwisefalse
-
getAliases
public Set<String> getAliases()
Gets the set of all aliases.- Specified by:
getAliases
in interfaceUpsamplerSpiRegistry
- Returns:
- the set of alias names.
-
-