org.esa.beam.framework.gpf.internal
Class OperatorSpiRegistryImpl

java.lang.Object
  extended by org.esa.beam.framework.gpf.internal.OperatorSpiRegistryImpl
All Implemented Interfaces:
OperatorSpiRegistry

public class OperatorSpiRegistryImpl
extends Object
implements OperatorSpiRegistry

A registry for operator SPI instances.

Since:
4.1
Author:
Norman Fomferra, Marco Zühlke

Constructor Summary
OperatorSpiRegistryImpl()
          The provate singleton constructor.
 
Method Summary
 boolean addOperatorSpi(OperatorSpi operatorSpi)
          Adds the given operatorSpi to this registry.
 OperatorSpi getOperatorSpi(String operatorName)
          Gets a registrered operator SPI.
 com.bc.ceres.core.ServiceRegistry<OperatorSpi> getServiceRegistry()
          Gets the ServiceRegistry
 void loadOperatorSpis()
          Loads the SPI's defined in META-INF/services.
 boolean removeOperatorSpi(OperatorSpi operatorSpi)
          Removes the given operatorSpi this registry.
 void setAlias(String aliasName, String spiClassName)
          Sets an alias for the given SPI class name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperatorSpiRegistryImpl

public OperatorSpiRegistryImpl()
The provate singleton constructor.

Method Detail

loadOperatorSpis

public void loadOperatorSpis()
Loads the SPI's defined in META-INF/services.

Specified by:
loadOperatorSpis in interface OperatorSpiRegistry

getServiceRegistry

public com.bc.ceres.core.ServiceRegistry<OperatorSpi> getServiceRegistry()
Gets the ServiceRegistry

Specified by:
getServiceRegistry in interface OperatorSpiRegistry
Returns:
the service registry

getOperatorSpi

public OperatorSpi getOperatorSpi(String operatorName)
Gets a registrered operator SPI. The given operatorName can be either the fully qualified class name of the OperatorSpi or an alias name.

Specified by:
getOperatorSpi in interface OperatorSpiRegistry
Parameters:
operatorName - A name identifying the operator SPI.
Returns:
the operator SPI, or null

addOperatorSpi

public boolean addOperatorSpi(OperatorSpi operatorSpi)
Adds the given operatorSpi to this registry.

Specified by:
addOperatorSpi in interface OperatorSpiRegistry
Parameters:
operatorSpi - the SPI to add
Returns:
true, if the OperatorSpi could be succesfully added, otherwise false

removeOperatorSpi

public boolean removeOperatorSpi(OperatorSpi operatorSpi)
Removes the given operatorSpi this registry.

Specified by:
removeOperatorSpi in interface OperatorSpiRegistry
Parameters:
operatorSpi - the SPI to remove
Returns:
true, if the SPI could be removed, otherwise false

setAlias

public void setAlias(String aliasName,
                     String spiClassName)
Sets an alias for the given SPI class name.

Specified by:
setAlias in interface OperatorSpiRegistry
Parameters:
aliasName - the alias
spiClassName - the name of the SPI class


Copyright © 2002-2012 Brockmann Consult GmbH. All Rights Reserved.