org.apache.uima.collection.impl.cpm.container.deployer.socket
Class SocketCasProcessorDeployer

java.lang.Object
  extended by 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 the CasProcessorDeployer component responsible for launch and termination of the fenced CasProcessor. It uses a plug-in ProcessControllerAdapter object to delegate launch requests from the CPM to the external application.


Constructor Summary
SocketCasProcessorDeployer(ProcessControllerAdapter aController)
           
SocketCasProcessorDeployer(ProcessControllerAdapter aController, CPEFactory aCpeFactory)
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketCasProcessorDeployer

public SocketCasProcessorDeployer(ProcessControllerAdapter aController,
                                  CPEFactory aCpeFactory)

SocketCasProcessorDeployer

public SocketCasProcessorDeployer(ProcessControllerAdapter aController)
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 Processors
Returns:
- ProcessingContainer containing pool of CasProcessors
Throws:
ResourceConfigurationException

deployCasProcessor

public ProcessingContainer deployCasProcessor(java.util.List aCasProcessorList,
                                              boolean redeploy)
                                       throws ResourceConfigurationException
Uses ProcessControllerAdapter instance to launch fenced CasProcessor.

Specified by:
deployCasProcessor in interface CasProcessorDeployer
Parameters:
aCasProcessorList - - list of Cas Processors to deploy
redeploy - - true if the Cas Processor is being redeployed as part of the recovery, false otherwise
Returns:
ProcessingContainer managing deployed Cas Processors
Throws:
ResourceConfigurationException - - failed to deploy Cas Processor

deployCasProcessor

public void deployCasProcessor(ProcessingContainer aProcessingContainer)
                        throws ResourceConfigurationException
Uses ProcessControllerAdapter instance to launch fenced CasProcessor.

Specified by:
deployCasProcessor in interface CasProcessorDeployer
Parameters:
aProcessingContainer - - ProcessingContainer managing deployed Cas Processor to redeploy
Throws:
ResourceConfigurationException - - failed to deploy Cas Processor

undeploy

public void undeploy(java.net.URL aURL)
              throws CasProcessorDeploymentException
Specified by:
undeploy in interface CasProcessorDeployer
Throws:
CasProcessorDeploymentException

undeploy

public void undeploy()
              throws CasProcessorDeploymentException
Specified by:
undeploy in interface CasProcessorDeployer
Throws:
CasProcessorDeploymentException


Copyright © 2010 The Apache Software Foundation. All Rights Reserved.