org.apache.camel.spring
Class RouteBuilderFinder

java.lang.Object
  extended by org.apache.camel.spring.RouteBuilderFinder
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware

public class RouteBuilderFinder
extends Object
implements org.springframework.context.ApplicationContextAware

A helper class which will find all RouteBuilder instances on the classpath

Version:
$Revision: 521369 $

Constructor Summary
RouteBuilderFinder(org.springframework.context.ApplicationContext applicationContext, String[] packages)
           
RouteBuilderFinder(CamelContextFactoryBean factoryBean)
           
 
Method Summary
 void appendBuilders(List<org.apache.camel.builder.RouteBuilder> list)
          Appends all the RouteBuilder instances that can be found on the classpath
 void destroy()
           
 org.springframework.context.ApplicationContext getApplicationContext()
           
 String[] getPackages()
           
protected  org.apache.camel.builder.RouteBuilder instantiateBuilder(Class type)
           
protected  boolean isValidClass(Class type)
          Returns true if the object is non-abstract and supports a zero argument constructor
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setPackages(String[] packages)
           
protected  boolean shouldIgnoreBean(Class type)
          Lets ignore beans that are not explicitly configured in the spring.xml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RouteBuilderFinder

public RouteBuilderFinder(org.springframework.context.ApplicationContext applicationContext,
                          String[] packages)

RouteBuilderFinder

public RouteBuilderFinder(CamelContextFactoryBean factoryBean)
Method Detail

getPackages

public String[] getPackages()

setPackages

public void setPackages(String[] packages)

getApplicationContext

public org.springframework.context.ApplicationContext getApplicationContext()

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

appendBuilders

public void appendBuilders(List<org.apache.camel.builder.RouteBuilder> list)
                    throws IllegalAccessException,
                           InstantiationException
Appends all the RouteBuilder instances that can be found on the classpath

Throws:
IllegalAccessException
InstantiationException

destroy

public void destroy()
             throws Exception
Throws:
Exception

shouldIgnoreBean

protected boolean shouldIgnoreBean(Class type)
Lets ignore beans that are not explicitly configured in the spring.xml


isValidClass

protected boolean isValidClass(Class type)
Returns true if the object is non-abstract and supports a zero argument constructor


instantiateBuilder

protected org.apache.camel.builder.RouteBuilder instantiateBuilder(Class type)
                                                            throws IllegalAccessException,
                                                                   InstantiationException
Throws:
IllegalAccessException
InstantiationException


Copyright © 2007 Apache Software Foundation. All Rights Reserved.