Class CPEDeployerDefaultImpl
- java.lang.Object
-
- org.apache.uima.collection.impl.cpm.container.deployer.CPEDeployerDefaultImpl
-
- All Implemented Interfaces:
CasProcessorDeployer
public class CPEDeployerDefaultImpl extends java.lang.Object implements CasProcessorDeployer
ImplementsCasProcessorDeployer
. Used to instantiate integrated Cas Processor.
-
-
Field Summary
Fields Modifier and Type Field Description private ServiceProxyPool
casProcessorPool
The cas processor pool.private CPEFactory
cpeFactory
The cpe factory.private CPMEngine
engine
The engine.
-
Constructor Summary
Constructors Constructor Description CPEDeployerDefaultImpl(CPEFactory aCpeFactory)
Initializes this instance with a reference to the CPE configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcessingContainer
deployCasProcessor(java.util.List aCasProcessorList, boolean redeploy)
Deploys integrated Cas Processor.ProcessingContainer
deployCasProcessor(java.util.List aCasProcessorList, CPMEngine aEngine, boolean redeploy)
Deploys integrated Cas Processor.void
deployCasProcessor(ProcessingContainer aProcessingContainer)
Deploys integrated Cas Processor using configuration available in a given Container.private CasProcessor
produceIntegratedCasProcessor(java.net.URL aDescriptor)
Creates an instance of integrated Cas Processor from a given descriptor.void
undeploy()
void
undeploy(java.net.URL aURL)
-
-
-
Field Detail
-
casProcessorPool
private ServiceProxyPool casProcessorPool
The cas processor pool.
-
cpeFactory
private CPEFactory cpeFactory
The cpe factory.
-
engine
private CPMEngine engine
The engine.
-
-
Constructor Detail
-
CPEDeployerDefaultImpl
public CPEDeployerDefaultImpl(CPEFactory aCpeFactory)
Initializes this instance with a reference to the CPE configuration.- Parameters:
aCpeFactory
- - reference to CPE configuration
-
-
Method Detail
-
deployCasProcessor
public ProcessingContainer deployCasProcessor(java.util.List aCasProcessorList, CPMEngine aEngine, boolean redeploy) throws ResourceConfigurationException
Deploys integrated Cas Processor. Number of instances this routine actually deploys depends on number of processing threads defined in the CPE descriptor. There is one instance per processing thread created here. The aCasProcessorList contains instantiated Cas Processors. These are instantiated by the CPEFactory.- Parameters:
aCasProcessorList
- - list containing instantiated Cas ProcessorsaEngine
- the CPM engineredeploy
- - true when redeploying failed Cas Processor- Returns:
- - ProcessingContainer containing pool of CasProcessors
- Throws:
ResourceConfigurationException
- the resource configuration exception
-
deployCasProcessor
public ProcessingContainer deployCasProcessor(java.util.List aCasProcessorList, boolean redeploy) throws ResourceConfigurationException
Deploys integrated Cas Processor. Number of instances this routine actually deploys depends on number of processing threads defined in the CPE descriptor. There is one instance per processing thread created here. The aCasProcessorList contains instantiated Cas Processors. These are instantiated by the CPEFactory.- Specified by:
deployCasProcessor
in interfaceCasProcessorDeployer
- Parameters:
aCasProcessorList
- - list containing instantiated Cas Processorsredeploy
- - true when redeploying failed Cas Processor- Returns:
- - ProcessingContainer containing pool of CasProcessors
- Throws:
ResourceConfigurationException
- the resource configuration exception
-
deployCasProcessor
public void deployCasProcessor(ProcessingContainer aProcessingContainer) throws ResourceConfigurationException
Deploys integrated Cas Processor using configuration available in a given Container. This routine is called when the CasProcessor fails and needs to be restarted.- Specified by:
deployCasProcessor
in interfaceCasProcessorDeployer
- Parameters:
aProcessingContainer
- - container managing Cas Processor- Throws:
ResourceConfigurationException
- the resource configuration exception
-
produceIntegratedCasProcessor
private CasProcessor produceIntegratedCasProcessor(java.net.URL aDescriptor) throws ResourceConfigurationException
Creates an instance of integrated Cas Processor from a given descriptor.- Parameters:
aDescriptor
- - Cas Processor descriptor- Returns:
- - instantiated CasProcessor
- Throws:
ResourceConfigurationException
- wraps Exception
-
undeploy
public void undeploy() throws CasProcessorDeploymentException
- Specified by:
undeploy
in interfaceCasProcessorDeployer
- Throws:
CasProcessorDeploymentException
-
undeploy
public void undeploy(java.net.URL aURL) throws CasProcessorDeploymentException
- Specified by:
undeploy
in interfaceCasProcessorDeployer
- Throws:
CasProcessorDeploymentException
-
-