org.apache.uima.collection.impl.cpm.container
Class CasProcessorConfigurationJAXBImpl

java.lang.Object
  extended by org.apache.uima.collection.impl.cpm.container.CasProcessorConfigurationJAXBImpl
All Implemented Interfaces:
CasProcessorConfiguration

public class CasProcessorConfigurationJAXBImpl
extends java.lang.Object
implements CasProcessorConfiguration

A wrapper containing Cas Processor configuration. An instance of this class is associated with each Cas Processor.


Constructor Summary
CasProcessorConfigurationJAXBImpl(CpeCasProcessor aCasProcessorConfig, ResourceManager aResourceManager)
          Initializes instance and copies configuation from cpe descriptor.
 
Method Summary
 java.lang.String getActionOnError()
          Returns an action as String to identify an action to take in case of excessive Cas Processor errors.
 java.lang.String getActionOnMaxRestart()
          Returns an action as String to identify an action to take in case of excessive Cas Processor restarts.
 int getBatchSize()
          Returns configured batch size setup for this Cas Processor
 java.lang.String getDeploymentParameter(java.lang.String aDeployParameter)
          Returns a value for a given deployment parameter
 java.util.List getDeploymentParameters()
          Returns a list of deployment parameters ssociated with this Cas Processor
 java.lang.String getDeploymentType()
          Returns deployment type associated with this Cas Processor
 java.net.URL getDescriptorUrl()
          Returns descriptor associated with this Cas Processor
 int getErrorRate()
           
 long getErrorSampleSize()
           
 Execute getExecSpec()
          Returns executable section of the Cas Processor configuration.
 java.util.LinkedList getFilter()
          Returns parsed filter expressions as List.
 java.lang.String getFilterString()
          Returns unparsed filter expression
 java.lang.String[] getKeysToDrop()
          Returns an array of types that should not be sent to Cas Processor.
 int getMaxErrorCount()
          Returns max number of tolerated errors
 int getMaxRestartCount()
          Returns max number of Cas Processor restarts
 int getMaxRetryCount()
          Returns max number of tries to process each bundle of Cas
 int getMaxTimeToWaitBetweenRetries()
          Returns how long to wait between resending CAS after failure
 java.lang.String getName()
          Returns Cas Processor name
 long getTimeout()
          Returns the max amount of time the CPE will wait for Cas Processor reponse.
 boolean isJavaProcess()
          Returns true it the Cas Processor is written in java and will be run with java jvm.
 boolean isParallelizable()
          Returns if the Cas Processor is able to run in parallel
 boolean readOnly()
          Returns if the Cas Processor is read only
 boolean runInSeparateProcess()
          Returns true if this Cas Processor will run in its own process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CasProcessorConfigurationJAXBImpl

public CasProcessorConfigurationJAXBImpl(CpeCasProcessor aCasProcessorConfig,
                                         ResourceManager aResourceManager)
                                  throws ResourceConfigurationException
Initializes instance and copies configuation from cpe descriptor.

Parameters:
aJaxbCasProcessorConfig - - - configuration object containing Cas Processor configuration
aResourceManager - - needed to resolve import by name
Throws:
ResourceConfigurationException
Method Detail

getMaxTimeToWaitBetweenRetries

public int getMaxTimeToWaitBetweenRetries()
Returns how long to wait between resending CAS after failure

Specified by:
getMaxTimeToWaitBetweenRetries in interface CasProcessorConfiguration

isParallelizable

public boolean isParallelizable()
Returns if the Cas Processor is able to run in parallel

Returns:
- true if the component can run in parallel, false otherwise

readOnly

public boolean readOnly()
Returns if the Cas Processor is read only

Returns:
- true if read only, false otherwise

getActionOnError

public java.lang.String getActionOnError()
Returns an action as String to identify an action to take in case of excessive Cas Processor errors.

  • continue
  • terminate
  • disable
  • Specified by:
    getActionOnError in interface CasProcessorConfiguration
    Returns:
    - action

    getActionOnMaxRestart

    public java.lang.String getActionOnMaxRestart()
    Returns an action as String to identify an action to take in case of excessive Cas Processor restarts.

  • continue
  • terminate
  • disable
  • Specified by:
    getActionOnMaxRestart in interface CasProcessorConfiguration
    Returns:
    - action

    getErrorRate

    public int getErrorRate()
    Specified by:
    getErrorRate in interface CasProcessorConfiguration

    getErrorSampleSize

    public long getErrorSampleSize()
    Specified by:
    getErrorSampleSize in interface CasProcessorConfiguration

    getMaxErrorCount

    public int getMaxErrorCount()
    Returns max number of tolerated errors

    Specified by:
    getMaxErrorCount in interface CasProcessorConfiguration
    Returns:
    - max number of allowed errors

    getMaxRestartCount

    public int getMaxRestartCount()
    Returns max number of Cas Processor restarts

    Specified by:
    getMaxRestartCount in interface CasProcessorConfiguration
    Returns:
    - max number of restarts

    getMaxRetryCount

    public int getMaxRetryCount()
    Returns max number of tries to process each bundle of Cas

    Specified by:
    getMaxRetryCount in interface CasProcessorConfiguration
    Returns:
    - max retry count

    getName

    public java.lang.String getName()
    Returns Cas Processor name

    Specified by:
    getName in interface CasProcessorConfiguration
    Returns:
    - Name

    getTimeout

    public long getTimeout()
    Returns the max amount of time the CPE will wait for Cas Processor reponse.

    Specified by:
    getTimeout in interface CasProcessorConfiguration
    Returns:
    - value for timeout

    getDeploymentParameters

    public java.util.List getDeploymentParameters()
    Returns a list of deployment parameters ssociated with this Cas Processor

    Specified by:
    getDeploymentParameters in interface CasProcessorConfiguration
    Returns:
    - deployment paramaters as List

    getDeploymentType

    public java.lang.String getDeploymentType()
    Returns deployment type associated with this Cas Processor

  • integrated
  • local
  • remote
  • Specified by:
    getDeploymentType in interface CasProcessorConfiguration
    Returns:
    - deployment type

    getFilterString

    public java.lang.String getFilterString()
    Returns unparsed filter expression

    Specified by:
    getFilterString in interface CasProcessorConfiguration
    Returns:
    - fliter String

    getFilter

    public java.util.LinkedList getFilter()
                                   throws ResourceConfigurationException
    Returns parsed filter expressions as List.

    Specified by:
    getFilter in interface CasProcessorConfiguration
    Throws:
    ResourceConfigurationException

    getKeysToDrop

    public java.lang.String[] getKeysToDrop()
                                     throws ResourceConfigurationException
    Returns an array of types that should not be sent to Cas Processor. The drop types are defined in the cpe descriptor.

    Specified by:
    getKeysToDrop in interface CasProcessorConfiguration
    Throws:
    ResourceConfigurationException

    getBatchSize

    public int getBatchSize()
    Returns configured batch size setup for this Cas Processor

    Specified by:
    getBatchSize in interface CasProcessorConfiguration
    Returns:
    - batch size

    getDescriptorUrl

    public java.net.URL getDescriptorUrl()
                                  throws ResourceConfigurationException
    Returns descriptor associated with this Cas Processor

    Specified by:
    getDescriptorUrl in interface CasProcessorConfiguration
    Returns:
    object that identifies location of descriptor
    Throws:
    ResourceConfigurationException - if an import could not be resolved

    getDeploymentParameter

    public java.lang.String getDeploymentParameter(java.lang.String aDeployParameter)
    Returns a value for a given deployment parameter

    Specified by:
    getDeploymentParameter in interface CasProcessorConfiguration
    Parameters:
    - - aDeployParameter - name of the parameter
    Returns:
    - value for parameter name

    runInSeparateProcess

    public boolean runInSeparateProcess()
    Returns true if this Cas Processor will run in its own process

    Specified by:
    runInSeparateProcess in interface CasProcessorConfiguration
    Returns:
    - true if running in seperate process

    isJavaProcess

    public boolean isJavaProcess()
    Returns true it the Cas Processor is written in java and will be run with java jvm.

    Specified by:
    isJavaProcess in interface CasProcessorConfiguration

    getExecSpec

    public Execute getExecSpec()
    Returns executable section of the Cas Processor configuration. It contains the name of executable program to be used when launching a seperate process with Cas Processor running as vinci service.

    Specified by:
    getExecSpec in interface CasProcessorConfiguration
    Returns:
    - Execute object


    Copyright © 2012. All Rights Reserved.