|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.support.ServiceSupport org.apache.camel.main.MainSupport org.apache.camel.main.Main
public class Main
A command line tool for booting up a CamelContext
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.camel.main.MainSupport |
---|
MainSupport.Option, MainSupport.ParameterOption |
Field Summary | |
---|---|
protected static Main |
instance
|
protected SimpleRegistry |
registry
|
Fields inherited from class org.apache.camel.main.MainSupport |
---|
aggregateDot, camelContexts, camelTemplate, completed, dotOutputDir, duration, latch, LOG, options, routeBuilders, routesOutputFile, timeUnit, trace |
Fields inherited from class org.apache.camel.support.ServiceSupport |
---|
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
Constructor Summary | |
---|---|
Main()
|
Method Summary | ||
---|---|---|
void |
bind(String name,
Object bean)
Binds the given name to the bean object, so
that it can be looked up inside the CamelContext this command line tool
runs with. |
|
protected CamelContext |
createContext()
|
|
protected ModelFileGenerator |
createModelFileGenerator()
|
|
protected void |
doStart()
Implementations override this method to support customized start/stop. |
|
protected void |
doStop()
Implementations override this method to support customized start/stop. |
|
protected ProducerTemplate |
findOrCreateCamelTemplate()
|
|
protected Map<String,CamelContext> |
getCamelContextMap()
|
|
static Main |
getInstance()
Returns the currently executing main |
|
Object |
lookup(String name)
Using the given name does lookup for the bean being already
bound using the bind(String, Object) method. |
|
|
lookup(String name,
Class<T> type)
Using the given name and type does lookup for
the bean being already bound using the bind(String, Object)
method. |
|
|
lookupByType(Class<T> type)
Using the given type does lookup for the bean being already
bound using the bind(String, Object) method. |
|
static void |
main(String... args)
|
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 |
Field Detail |
---|
protected static Main instance
protected final SimpleRegistry registry
Constructor Detail |
---|
public Main()
Method Detail |
---|
public static void main(String... args) throws Exception
Exception
public static Main getInstance()
public void bind(String name, Object bean)
name
to the bean
object, so
that it can be looked up inside the CamelContext this command line tool
runs with.
name
- the used name through which we do bindbean
- the object to bindpublic Object lookup(String name)
name
does lookup for the bean being already
bound using the bind(String, Object)
method.
Registry.lookup(String)
public <T> T lookup(String name, Class<T> type)
name
and type
does lookup for
the bean being already bound using the bind(String, Object)
method.
Registry.lookup(String, Class)
public <T> Map<String,T> lookupByType(Class<T> type)
type
does lookup for the bean being already
bound using the bind(String, Object)
method.
Registry.lookupByType(Class)
protected void doStart() throws Exception
ServiceSupport
ServiceSupport.doStop()
for more details.
doStart
in class MainSupport
Exception
ServiceSupport.doStop()
protected void doStop() throws Exception
ServiceSupport
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.
doStop
in class MainSupport
Exception
ServiceSupport.doStart()
protected ProducerTemplate findOrCreateCamelTemplate()
findOrCreateCamelTemplate
in class MainSupport
protected Map<String,CamelContext> getCamelContextMap()
getCamelContextMap
in class MainSupport
protected CamelContext createContext()
protected ModelFileGenerator createModelFileGenerator() throws JAXBException
createModelFileGenerator
in class MainSupport
JAXBException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |