Class CPEDeployerDefaultImpl
java.lang.Object
org.apache.uima.collection.impl.cpm.container.deployer.CPEDeployerDefaultImpl
- All Implemented Interfaces:
CasProcessorDeployer
Implements
CasProcessorDeployer. Used to instantiate integrated Cas Processor.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ServiceProxyPoolThe cas processor pool.private CPEFactoryThe cpe factory.private CPMEngineThe engine. -
Constructor Summary
ConstructorsConstructorDescriptionCPEDeployerDefaultImpl(CPEFactory aCpeFactory) Initializes this instance with a reference to the CPE configuration. -
Method Summary
Modifier and TypeMethodDescriptiondeployCasProcessor(List aCasProcessorList, boolean redeploy) Deploys integrated Cas Processor.deployCasProcessor(List aCasProcessorList, CPMEngine aEngine, boolean redeploy) Deploys integrated Cas Processor.voiddeployCasProcessor(ProcessingContainer aProcessingContainer) Deploys integrated Cas Processor using configuration available in a given Container.private CasProcessorproduceIntegratedCasProcessor(URL aDescriptor) Creates an instance of integrated Cas Processor from a given descriptor.voidundeploy()void
-
Field Details
-
casProcessorPool
The cas processor pool. -
cpeFactory
The cpe factory. -
engine
The engine.
-
-
Constructor Details
-
CPEDeployerDefaultImpl
Initializes this instance with a reference to the CPE configuration.- Parameters:
aCpeFactory- - reference to CPE configuration
-
-
Method Details
-
deployCasProcessor
public ProcessingContainer deployCasProcessor(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(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:
deployCasProcessorin 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:
deployCasProcessorin interfaceCasProcessorDeployer- Parameters:
aProcessingContainer- - container managing Cas Processor- Throws:
ResourceConfigurationException- the resource configuration exception
-
produceIntegratedCasProcessor
private CasProcessor produceIntegratedCasProcessor(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
- Specified by:
undeployin interfaceCasProcessorDeployer- Throws:
CasProcessorDeploymentException
-
undeploy
- Specified by:
undeployin interfaceCasProcessorDeployer- Throws:
CasProcessorDeploymentException
-