protected void configureAdapter ( Destination destination ) { String adapterId = StringUtils . hasText ( this . serviceAdapter ) ? this . serviceAdapter : getTargetService ( this . broker ) . getDefaultAdapter ( ) ; if ( this . beanFactory . containsBean ( adapterId ) ) { ServiceAdapter adapter = ( ServiceAdapter ) this . beanFactory . getBean ( adapterId , ServiceAdapter . class ) ; destination . setAdapter ( adapter ) ; } else if ( destination . getAdapter ( ) == null ) { destination . createAdapter ( adapterId ) ; } }
Configure the service adapter for the destination .