src/main/java/healthcheck/util/BusController.java
/**
	 * 
	 * utility function to stop ProducerTemplate
	 * @param result
	 * @param template
	 */
utility function to stop ProducerTemplate
@param result
@param template
utility function to stop ProducerTemplate @param result @param template
private void waitAndStopForTemplate(Future<Exchange> result, FluentProducerTemplate template) {
		while (true) {			
			if (result.isDone()) {
				try {
					template.stop();
					template.clearAll();
					template.cleanUp();
					break;
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
			try {
				Thread.sleep( 5000 );
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}
private void waitAndStopForTemplate ( Future < Exchange > result , FluentProducerTemplate template ) { while ( true ) { if ( result . isDone ( ) ) { try { template . stop ( ) ; template . clearAll ( ) ; template . cleanUp ( ) ; break ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } try { Thread . sleep ( 5000 ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } }
utility function to stop ProducerTemplate
 @param result
 @param template
utility function to stop ProducerTemplate @param result @param template
//logger.info( "waitAndStopForTemplate: " + template.toString() + " [STOPPED]"); // TODO Auto-generated catch block //logger.info( "waitAndStopForTemplate: " + template.toString() + " [WAITING...]"); // TODO Auto-generated catch block