@Test public void configureCamelContextAware() throws Exception { domain.setProperty(CamelContextConfigurator.CAMEL_CONTEXT_CONFIG, MyCustomContextAware.class.getName()); CamelContextConfigurator.configure(context, domain); Assert.assertNotNull(context.getProperty("abc")); Assert.assertEquals("xyz", context.getProperty("abc")); }
private static void configureCamelContextAware(CamelContext context, Object value) throws Exception { Class<?> contextAwareClass = Classes.forName(value.toString()); CamelContextAware contextAware = (CamelContextAware)contextAwareClass.newInstance(); contextAware.setCamelContext(context); }
CamelContextConfigurator { private static void configureCamelContextAware(CamelContext context, Object value) throws Exception { Class<?> contextAwareClass = Classes.forName(value.toString()); CamelContextAware contextAware = (CamelContextAware)contextAwareClass.newInstance(); contextAware.setCamelContext(context); } }
CamelContextConfigurator { private static void configureCamelContextAware(CamelContext context, Object value) throws Exception { Class<?> contextAwareClass = Classes.forName(value.toString()); CamelContextAware contextAware = (CamelContextAware)contextAwareClass.newInstance(); contextAware.setCamelContext(context); } private  CamelContextConfigurator(); }
CamelContextConfigurator { private static void configureCamelContextAware(CamelContext context, Object value) throws Exception { Class<?> contextAwareClass = Classes.forName(value.toString()); CamelContextAware contextAware = (CamelContextAware)contextAwareClass.newInstance(); contextAware.setCamelContext(context); } private  CamelContextConfigurator(); static final void configure(CamelContext context, ServiceDomain domain); static final void configure(CamelContext context, Map<String, Object> properties); static final void configure(CamelContext context, String name, Object value); }
CamelContextConfigurator { private static void configureCamelContextAware(CamelContext context, Object value) throws Exception { Class<?> contextAwareClass = Classes.forName(value.toString()); CamelContextAware contextAware = (CamelContextAware)contextAwareClass.newInstance(); contextAware.setCamelContext(context); } private  CamelContextConfigurator(); static final void configure(CamelContext context, ServiceDomain domain); static final void configure(CamelContext context, Map<String, Object> properties); static final void configure(CamelContext context, String name, Object value); static final String SHUTDOWN_TIMEOUT; static final String PERFORMANCE_STATISTICS; static final String CAMEL_CONTEXT_CONFIG; }