org.apache.uima.adapter.jms.service
Class UIMA_Service
java.lang.Object
org.apache.uima.adapter.jms.service.UIMA_Service
- All Implemented Interfaces:
- java.util.EventListener, org.springframework.context.ApplicationListener
public class UIMA_Service
- extends java.lang.Object
- implements org.springframework.context.ApplicationListener
Method Summary |
SpringContainerDeployer |
deploy(java.lang.String[] springContextFiles)
Deploy Spring context files in a Spring Container. |
protected void |
finalize()
|
java.lang.String[] |
initialize(java.lang.String[] args)
Parse command args, run dd2spring on the deployment descriptors to generate Spring context
files. |
static void |
main(java.lang.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. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serviceInitializationCompleted
protected boolean serviceInitializationCompleted
serviceInitializationException
protected boolean serviceInitializationException
serviceMonitor
protected java.lang.Object serviceMonitor
UIMA_Service
public UIMA_Service()
initialize
public java.lang.String[] initialize(java.lang.String[] args)
throws java.lang.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:
java.lang.Exception
deploy
public SpringContainerDeployer deploy(java.lang.String[] springContextFiles)
throws java.lang.Exception
- Deploy Spring context files in a Spring Container.
- Parameters:
springContextFiles
- - array of Spring context files
- Throws:
java.lang.Exception
startMonitor
public void startMonitor(long samplingFrequency)
throws java.lang.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:
java.lang.Exception
- - error on monitor initialization or startup
finalize
protected void finalize()
- Overrides:
finalize
in class java.lang.Object
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
- Specified by:
onApplicationEvent
in interface org.springframework.context.ApplicationListener
main
public static void main(java.lang.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 © 2011. All Rights Reserved.