Spring Framework SimpleApplicationEventMulticaster - 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 SimpleApplicationEventMulticaster class.

This code example shows how to use the following methods:
		super.testEvents(); 
		assertEquals(1, TestApplicationEventMulticaster.counter);
	} 
 
 
	public static class TestApplicationEventMulticaster extends SimpleApplicationEventMulticaster {
 
		private static int counter = 0;
 
		@Override 
		public void multicastEvent(ApplicationEvent event) {
			super.multicastEvent(event);
			counter++;
		} 
	} 
 
} 
6
CodeRank
This code example shows how to use the following methods:
	} 
	 
	public static EventStream getStream(String eventNode) { 
		EventStream eventStream = eventStreams.get(eventNode); 
		if (eventStream==null) 
			eventStream = new EventStream(eventNode, new SimpleApplicationEventMulticaster()); 
		 
		return eventStream; 
	} 
} 
5
CodeRank
This code example shows how to use the following methods:
			try { 
				List<String> nodeList = ps.discoItems(pubsubService, null); // TODO only root nodes
				if (!nodeList.contains(node))
					ps.ownerCreate(pubsubService, node);
				ps.subscriberSubscribe(pubsubService, node, this);
				pesi = new PubsubEventStreamImpl(pubsubService, node, new SimpleApplicationEventMulticaster(), ps);
				psStreamMap.put(s, pesi);
			} catch (XMPPError e) {
				LOG.error("XMPPError while creating event stream", e);
			} catch (CommunicationException e) {
				LOG.error("CommunicationException while creating event stream", e);
			} 
		} 
		return pesi;
	} 
 
	@Override 
	public void pubsubEvent(IIdentity pubsubService, String node, String itemId,
			Object item) {
		Subscription s = new Subscription(pubsubService, localIdentity, node, null);
5
CodeRank
This code example shows how to use the following methods:setTaskExecutor
@ComponentScan(basePackages = { "ch.rasc.pubsub.spring" }) 
public class SpringConfig { 
 
	@Bean 
	public ApplicationEventMulticaster applicationEventMulticaster() {
		SimpleApplicationEventMulticaster multicaster = new SimpleApplicationEventMulticaster();
		multicaster.setTaskExecutor(Executors.newFixedThreadPool(10));
		return multicaster;
	} 
 
} 
5
CodeRank
This code example shows how to use the following methods:multicastEvent
 
    /** 
     * Multicast only if this instance was the first created. 
     */ 
    public void multicastEvent(ApplicationEvent arg0) { 
        _em.multicastEvent(arg0);
    } 
 
    public void removeAllListeners() { 
        _em.removeAllListeners();
    } 
 
    public void removeApplicationListener(ApplicationListener arg0) {
        _em.removeApplicationListener(arg0);
    } 
 
    public void addApplicationListenerBean(String arg0) {
        // Disabling since our use of the context causes 
        // duplicate entries now with 3.0 
        //_em.addApplicationListenerBean(arg0); 
5
CodeRank
See Code Examples for Spring Framework SimpleApplicationEventMulticaster Methods: