Class SocketCasProcessorDeployer
- java.lang.Object
-
- org.apache.uima.collection.impl.cpm.container.deployer.socket.SocketCasProcessorDeployer
-
- All Implemented Interfaces:
CasProcessorDeployer
public class SocketCasProcessorDeployer extends java.lang.Object implements CasProcessorDeployer
Reference implementation of theCasProcessorDeployer
component responsible for launch and termination of the fenced CasProcessor. It uses a plug-inProcessControllerAdapter
object to delegate launch requests from the CPM to the external application.
-
-
Field Summary
Fields Modifier and Type Field Description private ProcessControllerAdapter
controller
The controller.private CPEFactory
cpeFactory
The cpe factory.private java.net.URL[]
serviceUrls
The service urls.
-
Constructor Summary
Constructors Constructor Description SocketCasProcessorDeployer(ProcessControllerAdapter aController)
Instantiates a new socket cas processor deployer.SocketCasProcessorDeployer(ProcessControllerAdapter aController, CPEFactory aCpeFactory)
Instantiates a new socket cas processor deployer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcessingContainer
deployCasProcessor(java.util.List aCasProcessorList, boolean redeploy)
Uses ProcessControllerAdapter instance to launch fenced CasProcessor.ProcessingContainer
deployCasProcessor(java.util.List aCasProcessorList, CPMEngine aEngine, boolean redeploy)
Deploys integrated Cas Processor.void
deployCasProcessor(ProcessingContainer aProcessingContainer)
Uses ProcessControllerAdapter instance to launch fenced CasProcessor.void
undeploy()
void
undeploy(java.net.URL aURL)
-
-
-
Field Detail
-
cpeFactory
private CPEFactory cpeFactory
The cpe factory.
-
serviceUrls
private java.net.URL[] serviceUrls
The service urls.
-
controller
private ProcessControllerAdapter controller
The controller.
-
-
Constructor Detail
-
SocketCasProcessorDeployer
public SocketCasProcessorDeployer(ProcessControllerAdapter aController, CPEFactory aCpeFactory)
Instantiates a new socket cas processor deployer.- Parameters:
aController
- the a controlleraCpeFactory
- the a cpe factory
-
SocketCasProcessorDeployer
public SocketCasProcessorDeployer(ProcessControllerAdapter aController)
Instantiates a new socket cas processor deployer.- Parameters:
aController
- the a controller
-
-
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 a 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
Uses ProcessControllerAdapter instance to launch fenced CasProcessor.- Specified by:
deployCasProcessor
in interfaceCasProcessorDeployer
- Parameters:
aCasProcessorList
- the a cas processor listredeploy
- the redeploy- Returns:
- the processing container
- Throws:
ResourceConfigurationException
- the resource configuration exception
-
deployCasProcessor
public void deployCasProcessor(ProcessingContainer aProcessingContainer) throws ResourceConfigurationException
Uses ProcessControllerAdapter instance to launch fenced CasProcessor.- Specified by:
deployCasProcessor
in interfaceCasProcessorDeployer
- Parameters:
aProcessingContainer
- the a processing container- Throws:
ResourceConfigurationException
- the resource configuration exception
-
undeploy
public void undeploy(java.net.URL aURL) throws CasProcessorDeploymentException
- Specified by:
undeploy
in interfaceCasProcessorDeployer
- Throws:
CasProcessorDeploymentException
-
undeploy
public void undeploy() throws CasProcessorDeploymentException
- Specified by:
undeploy
in interfaceCasProcessorDeployer
- Throws:
CasProcessorDeploymentException
-
-