org.apache.camel.guice
Class Main

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.impl.MainSupport
          extended by org.apache.camel.guice.Main
All Implemented Interfaces:
Service, ShutdownableService

public class Main
extends MainSupport

A command line tool for booting up a CamelContext using a Guice Injector via JNDI assuming that a valid jndi.properties is on the classpath

Version:
$Revision: 18643 $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.camel.impl.MainSupport
MainSupport.Option, MainSupport.ParameterOption
 
Field Summary
 
Fields inherited from class org.apache.camel.impl.MainSupport
aggregateDot, camelContexts, camelTemplate, completed, dotOutputDir, duration, latch, LOG, options, routeBuilders, routesOutputFile, timeUnit, trace
 
Constructor Summary
Main()
           
 
Method Summary
protected  ModelFileGenerator createModelFileGenerator()
           
protected  void doStart()
           
protected  void doStop()
           
protected  ProducerTemplate findOrCreateCamelTemplate()
           
protected  Map<String,CamelContext> getCamelContextMap()
           
protected  com.google.inject.Injector getInjector()
           
protected  com.google.inject.Injector getInjectorFromContext()
           
static Main getInstance()
          Returns the currently executing main
 String getJndiProperties()
           
static void main(String... args)
           
protected  void setInjector(com.google.inject.Injector injector)
           
 void setJndiProperties(String properties)
           
 
Methods inherited from class org.apache.camel.impl.MainSupport
addOption, addRouteBuilder, afterStart, beforeStop, completed, 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.impl.ServiceSupport
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Main

public Main()
Method Detail

setJndiProperties

public void setJndiProperties(String properties)

getJndiProperties

public String getJndiProperties()

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

setInjector

protected void setInjector(com.google.inject.Injector injector)

getInjector

protected com.google.inject.Injector getInjector()

getInjectorFromContext

protected com.google.inject.Injector getInjectorFromContext()
                                                     throws Exception
Throws:
Exception

doStart

protected void doStart()
                throws Exception
Overrides:
doStart in class MainSupport
Throws:
Exception

doStop

protected void doStop()
               throws Exception
Overrides:
doStop in class MainSupport
Throws:
Exception

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