Class CpeDescriptorFactory


  • public class CpeDescriptorFactory
    extends java.lang.Object
    Factory class for creating CpeDescriptors and their constituent objects.
    • Constructor Detail

      • CpeDescriptorFactory

        public CpeDescriptorFactory()
        Instantiates a new cpe descriptor factory.
    • Method Detail

      • produceDescriptor

        public static CpeDescription produceDescriptor()
        Produce a new CpeDescription from scratch. This CpeDescription will contain no components and will have default settings.
        Returns:
        An empty CpeDescription object with default settings
      • produceDescriptor

        public static CpeDescription produceDescriptor​(XMLInputSource aInput)
                                                throws InvalidXMLException
        Parse a CpeDescription from a descriptor file.
        Parameters:
        aInput - identifies the input file
        Returns:
        The CpeDescription object parsed from the input
        Throws:
        InvalidXMLException - if the descriptor is invalid
      • produceDescriptor

        public static CpeDescription produceDescriptor​(java.io.InputStream aInput)
                                                throws InvalidXMLException
        Parse a CpeDescription from a given input stream.
        Parameters:
        aInput - identifies the input stream
        Returns:
        The CpeDescription object parsed from the input
        Throws:
        InvalidXMLException - if the descriptor is invalid
      • produceCollectionReader

        public static CpeCollectionReader produceCollectionReader​(java.lang.String aCollectionReaderDescriptorPath,
                                                                  CpeDescription aDescriptor)
                                                           throws CpeDescriptorException
        Produce collection reader.
        Parameters:
        aCollectionReaderDescriptorPath - a path to the collection reader descriptor
        aDescriptor - the descriptor to associate the collection reader with
        Returns:
        the CPE Collection Reader
        Throws:
        CpeDescriptorException - if there is a failure
      • produceCollectionReader

        public static CpeCollectionReader produceCollectionReader​(java.lang.String aCollectionReaderDescriptorPath)
                                                           throws CpeDescriptorException
        Produce collection reader.
        Parameters:
        aCollectionReaderDescriptorPath - the a collection reader descriptor path
        Returns:
        the cpe collection reader
        Throws:
        CpeDescriptorException - the cpe descriptor exception
      • produceCollectionReaderCasInitializer

        @Deprecated
        public static CpeCollectionReaderCasInitializer produceCollectionReaderCasInitializer​(java.lang.String aPath,
                                                                                              CpeDescription aDescriptor)
                                                                                       throws CpeDescriptorException
        Deprecated.
        As of v2.0, CAS Initializers are deprecated.
        Produce collection reader cas initializer.
        Parameters:
        aPath - don't use
        aDescriptor - don't use
        Returns:
        a CPE Collection Reader CAS Initializer
        Throws:
        CpeDescriptorException - passed thru
      • produceCollectionReaderCasInitializer

        @Deprecated
        protected static CpeCollectionReaderCasInitializer produceCollectionReaderCasInitializer​(java.lang.String aInitializerDescriptorPath)
        Deprecated.
        As of v2.0, CAS Initializers are deprecated.
        Produce collection reader cas initializer.
        Parameters:
        aInitializerDescriptorPath - path to the initializer descriptor
        Returns:
        CPE Collection Reader CAS Initializer
      • produceComponentDescriptor

        public static CpeComponentDescriptor produceComponentDescriptor​(java.lang.String aPath)
        Produce component descriptor.
        Parameters:
        aPath - The path to the the CPE component Descriptor
        Returns:
        the CPE Component Description
      • produceRuntimeEnvParam

        public static CasProcessorRuntimeEnvParam produceRuntimeEnvParam()
        Produce runtime env param.
        Returns:
        the cas processor runtime env param
      • produceDeployParams

        public static CasProcessorDeploymentParams produceDeployParams()
        Produce deploy params.
        Returns:
        the cas processor deployment params
      • produceDeployParam

        public static CasProcessorDeploymentParam produceDeployParam()
        Produce deploy param.
        Returns:
        the cas processor deployment param
      • produceComponentDescriptorInclude

        public static CpeInclude produceComponentDescriptorInclude()
        Produce component descriptor include.
        Returns:
        the cpe include
      • produceCasProcessors

        public static CpeCasProcessors produceCasProcessors​(int aInputQSize,
                                                            int aOutputQSize,
                                                            int aPuCount,
                                                            CpeDescription aDescriptor)
                                                     throws CpeDescriptorException
        Produce cas processors.
        Parameters:
        aInputQSize - the input queue size
        aOutputQSize - the output queue size
        aPuCount - the number of processing units
        aDescriptor - the CPE descriptor
        Returns:
        CPE CAS Processors
        Throws:
        CpeDescriptorException - if an error occurs
      • produceCasProcessor

        public static CpeIntegratedCasProcessor produceCasProcessor​(java.lang.String aName)
        Produce cas processor.
        Parameters:
        aName - the a name
        Returns:
        the cpe integrated cas processor
      • produceLocalCasProcessor

        public static CpeLocalCasProcessor produceLocalCasProcessor​(java.lang.String aName,
                                                                    java.lang.String aSoFa)
                                                             throws CpeDescriptorException
        Produce local cas processor.
        Parameters:
        aName - the processor name
        aSoFa - the processor SofA
        Returns:
        CPE Local CAS Processor
        Throws:
        CpeDescriptorException - if an error occurs
      • produceCpeTimer

        public static CpeTimer produceCpeTimer​(java.lang.String aTimerClass)
        Produce cpe timer.
        Parameters:
        aTimerClass - the a timer class
        Returns:
        the cpe timer
      • produceResourceManagerConfiguration

        public static CpeResourceManagerConfiguration produceResourceManagerConfiguration​(java.lang.String aResourceMgrConfigurationPath,
                                                                                          CpeDescription aDescriptor)
                                                                                   throws CpeDescriptorException
        Produce resource manager configuration.
        Parameters:
        aResourceMgrConfigurationPath - the a resource mgr configuration path
        aDescriptor - the a descriptor
        Returns:
        the cpe resource manager configuration
        Throws:
        CpeDescriptorException - the cpe descriptor exception
      • produceResourceManagerConfiguration

        public static CpeResourceManagerConfiguration produceResourceManagerConfiguration​(java.lang.String aResourceMgrConfigurationPath)
                                                                                   throws CpeDescriptorException
        Produce resource manager configuration.
        Parameters:
        aResourceMgrConfigurationPath - the a resource mgr configuration path
        Returns:
        the cpe resource manager configuration
        Throws:
        CpeDescriptorException - the cpe descriptor exception
      • produceCasProcessorTimeout

        public static CasProcessorTimeout produceCasProcessorTimeout()
        Produce cas processor timeout.
        Returns:
        the cas processor timeout
      • produceCasProcessorMaxRestarts

        public static CasProcessorMaxRestarts produceCasProcessorMaxRestarts()
        Produce cas processor max restarts.
        Returns:
        the cas processor max restarts
      • produceCasProcessorErrorRateThreshold

        public static CasProcessorErrorRateThreshold produceCasProcessorErrorRateThreshold()
        Produce cas processor error rate threshold.
        Returns:
        the cas processor error rate threshold
      • produceCasProcessorFilter

        public static CasProcessorFilter produceCasProcessorFilter​(java.lang.String aFilter)
        Produce cas processor filter.
        Parameters:
        aFilter - the filter string
        Returns:
        a CAS Processor Filter
      • produceCasProcessorErrorHandling

        public static CasProcessorErrorHandling produceCasProcessorErrorHandling()
        Produce cas processor error handling.
        Returns:
        the cas processor error handling
      • produceCpeCheckpoint

        public static CpeCheckpoint produceCpeCheckpoint()
        Produce cpe checkpoint.
        Returns:
        the cpe checkpoint
      • produceCasProcessorDeploymentParams

        public static CasProcessorDeploymentParams produceCasProcessorDeploymentParams()
        Produce cas processor deployment params.
        Returns:
        the cas processor deployment params
      • produceCasProcessorExecArg

        public static CasProcessorExecArg produceCasProcessorExecArg()
        Produce cas processor exec arg.
        Returns:
        the cas processor exec arg
      • produceCasProcessorExecutable

        public static CasProcessorExecutable produceCasProcessorExecutable()
        Produce cas processor executable.
        Returns:
        the cas processor executable
      • produceRunInSeperateProcess

        public static CasProcessorRunInSeperateProcess produceRunInSeperateProcess()
        Produce run in seperate process.
        Returns:
        the cas processor run in seperate process
      • produceCasProcessorConfigurationParameterSettings

        public static CasProcessorConfigurationParameterSettings produceCasProcessorConfigurationParameterSettings()
        Produce cas processor configuration parameter settings.
        Returns:
        the cas processor configuration parameter settings
      • produceNameValuePair

        public static NameValuePair produceNameValuePair()
        Produce name value pair.
        Returns:
        the name value pair
      • produceSofaMapping

        public static CpeSofaMapping produceSofaMapping()
        Produce sofa mapping.
        Returns:
        the cpe sofa mapping
      • produceSofaMappings

        public static CpeSofaMappings produceSofaMappings()
        Produce sofa mappings.
        Returns:
        the cpe sofa mappings