|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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, routeBuilderClasses, 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.support.ServiceSupport |
|---|
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, 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
Exceptionpublic 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.lookupByName(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.lookupByNameAndType(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.findByTypeWithName(Class)
protected void doStart()
throws Exception
ServiceSupportServiceSupport.doStop() for more details.
doStart in class MainSupportExceptionServiceSupport.doStop()
protected void doStop()
throws Exception
ServiceSupportServiceSupport.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 MainSupportExceptionServiceSupport.doStart()protected ProducerTemplate findOrCreateCamelTemplate()
findOrCreateCamelTemplate in class MainSupportprotected Map<String,CamelContext> getCamelContextMap()
getCamelContextMap in class MainSupportprotected CamelContext createContext()
protected ModelFileGenerator createModelFileGenerator()
throws JAXBException
createModelFileGenerator in class MainSupportJAXBException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||