another option would be to have separate registerInputChannel and registerOutputChannel methods and to have the beanName check occur within the instanceof if-block in postProcessAfterInitialization(..)