bridgeFactoryBean.setInputChannel(previousOutputChannel);
bridgeFactoryBean.setHandler(handler);
try {
// TODO: might not be necessary to pass this context, but the FB requires non-null
bridgeFactoryBean.setBeanFactory(this.context.getBeanFactory());
bridgeFactoryBean.afterPropertiesSet();
AbstractEndpoint endpoint = bridgeFactoryBean.getObject();
endpoints.add(endpoint);
this.context.getBeanFactory().registerSingleton("bridge-" + i, endpoint);
endpoint.setComponentName("bridge-" + i);
endpoint.afterPropertiesSet();