org.apache.camel.main
Class Main
java.lang.Object
org.apache.camel.support.ServiceSupport
org.apache.camel.main.MainSupport
org.apache.camel.main.Main
- All Implemented Interfaces:
- Service, ShutdownableService, StatefulService, SuspendableService
- Direct Known Subclasses:
- Main
public class Main
- extends MainSupport
A command line tool for booting up a CamelContext
- Version:
Fields inherited from class org.apache.camel.main.MainSupport |
aggregateDot, camelContexts, camelTemplate, completed, dotOutputDir, duration, latch, LOG, options, routeBuilders, routesOutputFile, timeUnit, trace |
Constructor Summary |
Main()
|
Methods inherited from class org.apache.camel.main.MainSupport |
addOption, addRouteBuilder, afterStart, beforeStop, completed, enableHangupSupport, enableTrace, generateDot, getCamelContexts, getCamelTemplate, getDotOutputDir, getDuration, getRouteBuilders, getRouteDefinitions, getRoutesOutputFile, getTimeUnit, isAggregateDot, isTrace, outputRoutesToFile, parseArguments, postProcessCamelContext, postProcessContext, run, run, setAggregateDot, setDotOutputDir, setDuration, setRouteBuilders, setRoutesOutputFile, setTimeUnit, showOptions, showOptionsHeader, waitUntilCompleted |
Methods inherited from class org.apache.camel.support.ServiceSupport |
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
protected static Main instance
Main
public Main()
main
public static void main(String... args)
throws Exception
- Throws:
Exception
getInstance
public static Main getInstance()
- Returns the currently executing main
- Returns:
- the current running instance
doStart
protected void doStart()
throws Exception
- Description copied from class:
ServiceSupport
- Implementations override this method to support customized start/stop.
Important: See
ServiceSupport.doStop()
for more details.
- Overrides:
doStart
in class MainSupport
- Throws:
Exception
- See Also:
ServiceSupport.doStop()
doStop
protected void doStop()
throws Exception
- Description copied from class:
ServiceSupport
- Implementations override this method to support customized start/stop.
Important: Camel will invoke this
ServiceSupport.doStop()
method when
the service is being stopped. This method will also be invoked
if the service is still in uninitialized state (eg has not
been started). The method is always called to allow the service
to do custom logic when the service is being stopped, such as when
CamelContext
is shutting down.
- Overrides:
doStop
in class MainSupport
- Throws:
Exception
- See Also:
ServiceSupport.doStart()
findOrCreateCamelTemplate
protected ProducerTemplate findOrCreateCamelTemplate()
- Specified by:
findOrCreateCamelTemplate
in class MainSupport
getCamelContextMap
protected Map<String,CamelContext> getCamelContextMap()
- Specified by:
getCamelContextMap
in class MainSupport
createModelFileGenerator
protected ModelFileGenerator createModelFileGenerator()
throws JAXBException
- Specified by:
createModelFileGenerator
in class MainSupport
- Throws:
JAXBException
Apache CAMEL