Class FlowController_ImplBase

    • Constructor Detail

      • FlowController_ImplBase

        public FlowController_ImplBase()
    • Method Detail

      • initialize

        public void initialize​(FlowControllerContext aContext)
                        throws ResourceInitializationException
        Description copied from interface: FlowController
        Performs any startup tasks required by this component. The framework calls this method only once, just after the FlowController has been instantiated.

        The framework supplies this FlowController with a reference to the FlowControllerContext that it will use, for example to access configuration settings or resources. This FlowController should store a reference to this Context for later use.

        Specified by:
        initialize in interface FlowController
        Parameters:
        aContext - Provides access to services and resources managed by the framework. This includes configuration parameters, logging, and access to external resources. Also provides the FlowController with the metadata of all of the AnalysisEngines that are possible targets for routing CASes.
        Throws:
        ResourceInitializationException - if the FlowController cannot initialize successfully.
      • reconfigure

        public void reconfigure()
                         throws ResourceInitializationException,
                                ResourceConfigurationException
        Description copied from interface: FlowController
        Alerts this FlowController that the values of its configuration parameters or external resources have changed. This FlowController should re-read its configuration from the UimaContext and take appropriate action to reconfigure itself.

        In the abstract base classes provided by the framework, this is generally implemented by calling destroy followed by initialize. If a more efficient implementation is needed, you can override that implementation.

        Specified by:
        reconfigure in interface FlowController
        Throws:
        ResourceInitializationException - if this component encounters a problem in reinitializing itself from the new configuration
        ResourceConfigurationException - if the new configuration is invalid
      • batchProcessComplete

        public void batchProcessComplete()
                                  throws AnalysisEngineProcessException
        Description copied from interface: FlowController
        Completes the processing of a batch of CASes. The size of a batch is determined based on configuration provided by the application that is using this component. The purpose of batchProcessComplete is to give this component the change to flush information from memory to persistent storage. In the event of an error, this allows the processing to be restarted from the end of the last completed batch.

        If this component's descriptor declares that it is recoverable, then this component is required to be restartable from the end of the last completed batch.

        Specified by:
        batchProcessComplete in interface FlowController
        Throws:
        AnalysisEngineProcessException - if this component encounters a problem in flushing its state to persistent storage
      • destroy

        public void destroy()
        Description copied from interface: FlowController
        Frees all resources held by this FlowController. The framework calls this method only once, when it is finished using this component.
        Specified by:
        destroy in interface FlowController
      • getContext

        protected FlowControllerContext getContext()
        Gets the FlowControllerContext for this FlowController. This provides access to configuration parameters, resources, and also to metadata for each AnalysisEngine that is available for this FlowController to route CASes to.
        Returns:
        the FlowControllerContext for this FlowController