org.apache.uima.adapter.jms.service

## 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 Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `serviceInitializationCompleted`
    `protected boolean` | `serviceInitializationException`
    `protected Object` | `serviceMonitor`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UIMA_Service()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SpringContainerDeployer` | `deploy(String[] springContextFiles)` Deploy Spring context files in a Spring Container.
    `SpringContainerDeployer` | `deploy(String[] springContextFiles, org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent> listener)`
    `protected void` | `finalize()`
    `String[]` | `initialize(String[] args)` Parse command args, run dd2spring on the deployment descriptors to generate Spring context files.
    `static void` | `main(String[] args)` The main routine for starting the deployment of a UIMA-AS instance.
    `void` | `onApplicationEvent(org.springframework.context.ApplicationEvent event)`
    `void` | `startMonitor(long samplingFrequency)` Creates an instance of a `JmxMonitor`, initializes it with the JMX Server URI and checkpoint frequency, and finally starts the monitor.
    `void` | `stopMonitor()` Creates an instance of a `JmxMonitor`, initializes it with the JMX Server URI and checkpoint frequency, and finally starts the monitor.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### serviceInitializationCompleted

          protected boolean serviceInitializationCompleted

    - #### serviceInitializationException

          protected boolean serviceInitializationException

    - #### serviceMonitor

          protected Object serviceMonitor

  - ### Constructor Detail

    - #### UIMA_Service

          public UIMA_Service()

  - ### Method Detail

    - #### 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,
                                                org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent> listener)
                                         throws Exception

      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

    - #### stopMonitor

          public void stopMonitor()
                           throws Exception

      Creates an instance of a `JmxMonitor`, initializes it with the JMX Server URI and checkpoint frequency, and finally starts the monitor.
      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` -

Copyright © 2006–2018 The Apache Software Foundation. All rights reserved.