Class Main

    • Field Detail

      • instance

        protected static Main instance
    • Constructor Detail

      • Main

        public Main()
      • Main

        public Main​(Class<?>... configurationClass)
    • Method Detail

      • getInstance

        public static Main getInstance()
        Returns the currently executing main
        Returns:
        the current running instance
      • bind

        public 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.
        Parameters:
        name - the used name through which we do bind
        bean - the object to bind
      • lookup

        public Object lookup​(String name)
        Using the given name does lookup for the bean being already bound using the bind(String, Object) method.
        See Also:
        BeanRepository.lookupByName(String)
      • lookup

        public <T> T 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.
        See Also:
        BeanRepository.lookupByNameAndType(String, Class)
      • lookupByType

        public <T> Map<String,​T> lookupByType​(Class<T> type)
        Using the given type does lookup for the bean being already bound using the bind(String, Object) method.
        See Also:
        BeanRepository.findByTypeWithName(Class)
      • doInit

        protected void doInit()
                       throws Exception
        Overrides:
        doInit in class org.apache.camel.support.service.BaseService
        Throws:
        Exception