Class UIMA_Service

java.lang.Object
org.apache.uima.adapter.jms.service.UIMA_Service
All Implemented Interfaces:
EventListener, org.springframework.context.ApplicationListener

public class UIMA_Service extends Object implements org.springframework.context.ApplicationListener
  • Field Details

    • serviceInitializationCompleted

      protected boolean serviceInitializationCompleted
    • serviceInitializationException

      protected boolean serviceInitializationException
    • serviceMonitor

      protected Object serviceMonitor
  • Constructor Details

    • UIMA_Service

      public UIMA_Service()
  • Method Details

    • initialize

      public String[] initialize(String[] args) throws Exception
      Parse command args, run dd2spring on the deployment descriptors to generate Spring context files.
      Parameters:
      args - - command line arguments
      Returns:
      - an array of Spring context files generated from provided deployment descriptors
      Throws:
      Exception
    • deploy

      public SpringContainerDeployer deploy(String[] springContextFiles) throws Exception
      Deploy Spring context files in a Spring Container.
      Parameters:
      springContextFiles - - array of Spring context files
      Throws:
      Exception
    • startMonitor

      public void startMonitor(long samplingFrequency) throws Exception
      Creates an instance of a JmxMonitor, initializes it with the JMX Server URI and checkpoint frequency, and finally starts the monitor.
      Parameters:
      samplingFrequency - - how often the JmxMonitor should checkpoint to fetch service metrics
      Throws:
      Exception - - error on monitor initialization or startup
    • finalize

      protected void finalize()
      Overrides:
      finalize in class Object
    • onApplicationEvent

      public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener
    • main

      public static void main(String[] args)
      The main routine for starting the deployment of a UIMA-AS instance. The args are either: 1 or more "paths" to Spring XML descriptors representing the information needed or some number of parameters, preceeded by a "-" sign. If the first arg doesn't start with a "-" it is presumed to be the first format. For the 2nd style, the arguments are: -saxonURL a-URL-to-the-saxon-jar usually starting with "file:", -xslt path-to-the-dd2spring.xsl file, -d path-to-UIMA-deployment-descriptor [-d path-to-another-dd ...] these arguments may be in any order) For the 3rd style, like #2 but with multiple dd-files following a single -dd Useful for calling from scripts.
      Parameters:
      args -