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
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanserviceInitializationCompletedprotected booleanserviceInitializationExceptionprotected java.lang.ObjectserviceMonitor
-
Constructor Summary
Constructors Constructor Description UIMA_Service()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SpringContainerDeployerdeploy(java.lang.String[] springContextFiles)Deploy Spring context files in a Spring Container.protected voidfinalize()java.lang.String[]initialize(java.lang.String[] args)Parse command args, run dd2spring on the deployment descriptors to generate Spring context files.static voidmain(java.lang.String[] args)The main routine for starting the deployment of a UIMA-AS instance.voidonApplicationEvent(org.springframework.context.ApplicationEvent event)voidstartMonitor(long samplingFrequency)Creates an instance of aJmxMonitor, initializes it with the JMX Server URI and checkpoint frequency, and finally starts the monitor.
-
-
-
Method Detail
-
initialize
public java.lang.String[] initialize(java.lang.String[] args) throws java.lang.ExceptionParse 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.ExceptionCreates an instance of aJmxMonitor, 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:
finalizein classjava.lang.Object
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
- Specified by:
onApplicationEventin interfaceorg.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-
-
-