Class VinciCasProcessorDeployer
- java.lang.Object
-
- org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDeployer
-
- All Implemented Interfaces:
CasProcessorDeployer
public class VinciCasProcessorDeployer extends java.lang.Object implements CasProcessorDeployer
Reference implementation ofCasProcessorDeployerThis component enables the CPE to deploy Cas Processors running as a Vinci service. Two deployment models are supported in the current implementation:- managed deployment (aka local)
- unmanaged deployment (aka remote)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONN_RETRY_COUNTstatic intDEFAULT_SERVICE_PORTstatic intDEFAULT_SERVICE_PORT_RANGEstatic java.lang.StringDEFAULT_VNS_PORTstatic java.lang.StringLOCAL_VNSstatic intMAX_WAIT_TRIESstatic intSLEEP_TIMEstatic intWAIT_TIME
-
Constructor Summary
Constructors Constructor Description VinciCasProcessorDeployer(CPEFactory aCpeFactory)Instantiaes the class and gives it access to CPE configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcessingContainerdeployCasProcessor(java.util.List aCasProcessorList, boolean redeploy)Deploys CasProcessors in a provided List.ProcessingContainerdeployCasProcessor(java.util.List aCasProcessorList, CPMEngine aEngine, boolean redeploy)Deploys integrated Cas Processor.voiddeployCasProcessor(ProcessingContainer aProcessingContainer)Deploys CasProcessor using configuration from provided container.voidundeploy()Shutdown local VNS.voidundeploy(java.net.URL aURL)
-
-
-
Field Detail
-
LOCAL_VNS
public static final java.lang.String LOCAL_VNS
- See Also:
- Constant Field Values
-
WAIT_TIME
public static final int WAIT_TIME
- See Also:
- Constant Field Values
-
MAX_WAIT_TRIES
public static final int MAX_WAIT_TRIES
- See Also:
- Constant Field Values
-
CONN_RETRY_COUNT
public static final java.lang.String CONN_RETRY_COUNT
- See Also:
- Constant Field Values
-
DEFAULT_VNS_PORT
public static final java.lang.String DEFAULT_VNS_PORT
- See Also:
- Constant Field Values
-
DEFAULT_SERVICE_PORT
public static final int DEFAULT_SERVICE_PORT
- See Also:
- Constant Field Values
-
DEFAULT_SERVICE_PORT_RANGE
public static final int DEFAULT_SERVICE_PORT_RANGE
- See Also:
- Constant Field Values
-
SLEEP_TIME
public static final int SLEEP_TIME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VinciCasProcessorDeployer
public VinciCasProcessorDeployer(CPEFactory aCpeFactory)
Instantiaes the class and gives it access to CPE configuration.- Parameters:
aCpeFactory-
-
-
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 Processorsredeploy- - true when redeploying failed Cas Processor- Returns:
- - ProcessingContainer containing pool of CasProcessors
- Throws:
ResourceConfigurationException
-
deployCasProcessor
public void deployCasProcessor(ProcessingContainer aProcessingContainer) throws ResourceConfigurationException
Deploys CasProcessor using configuration from provided container. This method is used for re-launching failed Cas Processor.- Specified by:
deployCasProcessorin interfaceCasProcessorDeployer- Parameters:
aProcessingContainer- - container for deployed CasProcessor.- Throws:
ResourceConfigurationException- - failed to deploy Cas Processor
-
deployCasProcessor
public ProcessingContainer deployCasProcessor(java.util.List aCasProcessorList, boolean redeploy) throws ResourceConfigurationException
Deploys CasProcessors in a provided List. The List contains instances of Cas Processors that are not yet bound to a vinci service. To do anything usefull, the Cas Processor must be deployed first. The process of deploying a proxy depends on the deployment mode defined in the cpe descriptor. In case of managed Cas Processor, the deployment consists of launching the vinci service and creating a connection to it. For un-managed Cas Processor the CPE establishes the connection.- Specified by:
deployCasProcessorin interfaceCasProcessorDeployer- Parameters:
aCasProcessorList- - list of CasProcessors to deployredeploy- - true if intent is to redeploy failed service- Returns:
- ProcessinContainer - instance of Container
- Throws:
ResourceConfigurationException- - failed to deploy Cas Processor
-
undeploy
public void undeploy() throws CasProcessorDeploymentExceptionShutdown local VNS.- Specified by:
undeployin interfaceCasProcessorDeployer- Throws:
CasProcessorDeploymentException
-
undeploy
public void undeploy(java.net.URL aURL) throws CasProcessorDeploymentException- Specified by:
undeployin interfaceCasProcessorDeployer- Throws:
CasProcessorDeploymentException
-
-