Spring Framework ApplicationContext - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework ApplicationContext class.

This code example shows how to use the following methods:sleep
		applicationContext.stop();
	} 
 
 
	public void launchSender(ApplicationContext applicationContext) throws Exception {
		DestinationResolver<MessageChannel> channelResolver = new BeanFactoryChannelResolver(applicationContext);
		MessageChannel inputChannel = channelResolver.resolveDestination("mcInputChannel");
		if (!readyToReceive.await(30, TimeUnit.SECONDS)) {
			fail("Receiver failed to start in 30s"); 
		} 
		try { 
			testingIpText = ">>>>>>> Testing IP (multicast) " + new Date();
			inputChannel.send(new GenericMessage<String>(testingIpText));
			sentFirst.countDown();
			try { 
				Thread.sleep(hangAroundFor); // give some time for console interaction
			} 
			catch (InterruptedException e) {
				e.printStackTrace();
			} 
		} catch (MessagingException e) {
5
CodeRank