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 theCasProcessorDeployercomponent responsible for launch and termination of the fenced CasProcessor. It uses a plug-inProcessControllerAdapterobject to delegate launch requests from the CPM to the external application.
-
-
Field Summary
Fields Modifier and Type Field Description private ProcessControllerAdaptercontrollerThe controller.private CPEFactorycpeFactoryThe cpe factory.private java.net.URL[]serviceUrlsThe 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 ProcessingContainerdeployCasProcessor(java.util.List aCasProcessorList, boolean redeploy)Uses ProcessControllerAdapter instance to launch fenced CasProcessor.ProcessingContainerdeployCasProcessor(java.util.List aCasProcessorList, CPMEngine aEngine, boolean redeploy)Deploys integrated Cas Processor.voiddeployCasProcessor(ProcessingContainer aProcessingContainer)Uses ProcessControllerAdapter instance to launch fenced CasProcessor.voidundeploy()voidundeploy(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:
deployCasProcessorin 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:
deployCasProcessorin 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:
undeployin interfaceCasProcessorDeployer- Throws:
CasProcessorDeploymentException
-
undeploy
public void undeploy() throws CasProcessorDeploymentException- Specified by:
undeployin interfaceCasProcessorDeployer- Throws:
CasProcessorDeploymentException
-
-