Class UimacppServiceController

  • All Implemented Interfaces:
    AnalysisEngineController, ControllerLifecycle, org.springframework.beans.factory.DisposableBean

    public class UimacppServiceController
    extends AnalysisEngineControllerAdapter
    implements ControllerLifecycle, org.springframework.beans.factory.DisposableBean
    This bean functions as a proxy for a Uima C++ service. It starts the Uima C++ service given a UIMA descriptor, the input queue name, and environment settings required for the specific annotator and the Uima C++ runtime. On start up a socket connection is established between this instance of the proxy and the service. This connection is used for routing log message from the C++ service to the UIMA framework logger and to allow the proxy to send JMX and administrative requests such as shutdown.
    • Field Detail

      • server

        protected java.net.ServerSocket server
      • uimacppProcess

        protected java.lang.Process uimacppProcess
    • Constructor Detail

      • UimacppServiceController

        public UimacppServiceController​(java.lang.String aeDescriptorFileName,
                                        java.lang.String queueName,
                                        java.lang.String brokerURL,
                                        int numInstances,
                                        int prefetchSize,
                                        java.util.Map<java.lang.String,​java.lang.String> envVarMap,
                                        int processCasErrorThreshhold,
                                        int processCasErrorWindow,
                                        boolean terminateOnCPCError,
                                        int initialFsHeapSize)
                                 throws org.apache.uima.resource.ResourceInitializationException
        Configure and start a Uima C++ service that connects to an ActiveMQ queue broker. This class initializes the process environment and starts a process to deploy the C++ service. Communication via sockets is established between this Controller and the C++ service through which logging, JMX and administrative messages are transmitted.
        Parameters:
        aeDescriptorFileName - - UIMA analysis engine descriptor file.
        queueName - - input queue name
        brokerURL - - queue broker URL
        numInstances - - number of instance of AEs to start in the service.
        prefetchSize - - number of message to prefetch
        envVarMap - - enviroment variables to be set. These settings are valid only for the new process in which C++ service will run.
        Throws:
        org.apache.uima.UIMAException
        org.apache.uima.resource.ResourceInitializationException
      • UimacppServiceController

        public UimacppServiceController​(java.lang.String aeDescriptorFileName,
                                        java.lang.String queueName,
                                        java.lang.String brokerURL,
                                        int numInstances,
                                        int prefetchSize,
                                        java.util.Map<java.lang.String,​java.lang.String> envVarMap,
                                        int processCasErrorThreshhold,
                                        int processCasErrorWindow,
                                        boolean terminateOnCPCError)
                                 throws org.apache.uima.resource.ResourceInitializationException
        Throws:
        org.apache.uima.resource.ResourceInitializationException
      • UimacppServiceController

        public UimacppServiceController​(org.apache.uima.util.Logger uimaLogger,
                                        java.lang.String aeDescriptorFileName,
                                        java.lang.String queueName,
                                        java.lang.String mqHostName,
                                        int mqPort,
                                        java.lang.String mqChannel,
                                        java.lang.String mqQueueMgr,
                                        int numInstances,
                                        java.util.Map<java.lang.String,​java.lang.String> envVarMap,
                                        int processCasErrorThreshhold,
                                        int processCasErrorWindow,
                                        boolean terminateOnCPCError,
                                        JmxManagement jmxManagement,
                                        int initialFsHeapSize)
                                 throws org.apache.uima.resource.ResourceInitializationException
        Configure and start a Uima C++ service that connects to an WebSphereMQ queue broker. This class initializes the process environment and starts a process to deploy the C++ service. Communication via sockets is established between this Controller and the C++ service through which logging, JMX and administrative messages are transmitted.
        Parameters:
        uimaLogger -
        aeDescriptorFileName -
        mqQueueName -
        mqHostName -
        mqPort -
        mqChannel -
        mqQueueMgr -
        numInstances -
        envVarMap -
        processCasErrorThreshhold -
        processCasErrorWindow -
        terminateOnCPCError -
        mBeanServer -
        Throws:
        org.apache.uima.resource.ResourceInitializationException
      • UimacppServiceController

        public UimacppServiceController​(org.apache.uima.util.Logger uimaLogger,
                                        java.lang.String aeDescriptorFileName,
                                        java.lang.String queueName,
                                        java.lang.String mqHostName,
                                        int mqPort,
                                        java.lang.String mqChannel,
                                        java.lang.String mqQueueMgr,
                                        int numInstances,
                                        java.util.Map<java.lang.String,​java.lang.String> envVarMap,
                                        int processCasErrorThreshhold,
                                        int processCasErrorWindow,
                                        boolean terminateOnCPCError,
                                        JmxManagement jmxManagement)
                                 throws org.apache.uima.resource.ResourceInitializationException
        Throws:
        org.apache.uima.resource.ResourceInitializationException