Currently I have a working solution by using the following filter. However I'm still interested in "native" camel ways to do this.
public class CamelFilter implements ApplicationContextAware {
public boolean isMyBeanNotAvailable() {
boolean notAvailable = false;
try {
notAvailable = this.applicationContext.getBean("myBean") == null;
} catch (BeanCreationNotAllowedException bcnae) {
notAvailable = true;
}
return notAvailable;
}
}
With the following route:
<route id="triggerAfterDelay">
...
<delay><constant>20000</constant></delay>
<filter>
<method ref="camelFilter" method="isMyBeanNotAvailable"/>
<stop/>
</filter>
<bean ref="myBean" method="updateAfterDelay"/>
</route>