Class 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.
    • Field Detail

      • actionOnMaxError

        private java.lang.String actionOnMaxError
      • actionOnMaxRestarts

        private java.lang.String actionOnMaxRestarts
      • name

        private java.lang.String name
      • deploymentType

        private java.lang.String deploymentType
      • filterString

        private java.lang.String filterString
      • errorSampleSize

        private long errorSampleSize
      • timeOut

        private long timeOut
      • errorRate

        private int errorRate
      • maxErrorThreshold

        private int maxErrorThreshold
      • maxRestartThreshold

        private int maxRestartThreshold
      • maxRetryThreshold

        private int maxRetryThreshold
      • batchSize

        private int batchSize
      • runInSeparateProcess

        private boolean runInSeparateProcess
      • isJavaProcess

        private boolean isJavaProcess
      • deploymentParameters

        private java.util.List deploymentParameters
      • waitTimeBetweenRestarts

        private int waitTimeBetweenRestarts
      • parallelizable

        private boolean parallelizable
      • readOnly

        private boolean readOnly
    • Constructor Detail

      • CasProcessorConfigurationJAXBImpl

        public CasProcessorConfigurationJAXBImpl​(CpeCasProcessor aCasProcessorConfig,
                                                 ResourceManager aResourceManager)
                                          throws ResourceConfigurationException
        Initializes instance and copies configuation from cpe descriptor.
        Parameters:
        aCasProcessorConfig - - configuration object containing Cas Processor configuration
        aResourceManager - - needed to resolve import by name
        Throws:
        ResourceConfigurationException - if descriptor error
    • Method Detail

      • 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
      • addRunInSeparateProcess

        private void addRunInSeparateProcess​(CpeCasProcessor aCasProcessorConfig)
        Copies runtime information
        Parameters:
        aJaxbCasProcessorConfig - - configuration object containing Cas Processor configuration
      • addIsJavaProcess

        private void addIsJavaProcess​(CpeCasProcessor aCasProcessorConfig)
        Determines if this Cas Processor should run in java jvm.
        Parameters:
        aJaxbCasProcessorConfig - - configuration object containing Cas Processor configuration
      • addDeploymentParameters

        private void addDeploymentParameters​(CpeCasProcessor aCasProcessorConfig)
                                      throws ResourceConfigurationException
        Copies deployment parameters associated with this Cas Processor These parameters are used to construct appropriate command line for launching the Cas Processor in external process
        Parameters:
        aJaxbCasProcessorConfig - - configuration object containing Cas Processor configuration
        Throws:
        ResourceConfigurationException
      • validActionOnError

        private boolean validActionOnError​(java.lang.String aActionOnError)
        Varifies action String. It must any of the three possible values:

      • continue
      • terminate
      • disable
      • kill-pipeline
Parameters:
aActionOnError - - action string to verify
Returns:
- true if action is valid, false otherwise