List of usage examples for org.springframework.context ApplicationEvent getSource
public Object getSource()
From source file:com.ling.spring.event.LisiListener.java
@Override public void onApplicationEvent(ApplicationEvent event) { System.out.println("?" + event.getSource()); }
From source file:com.ling.spring.event.WangwuListener.java
@Override public void onApplicationEvent(ApplicationEvent event) { System.out.println("" + event.getSource()); }
From source file:org.trpr.platform.core.impl.event.AbstractEndpointEventConsumerImpl.java
/** * Interface method implementation. Just logs the message * @see org.springframework.context.ApplicationListener#onApplicationEvent(org.springframework.context.ApplicationEvent) *///from w w w . java 2 s .co m public void onApplicationEvent(ApplicationEvent springEvent) { if (springEvent.getSource() instanceof PlatformEvent) { handlePlatformEvent((PlatformEvent) springEvent.getSource()); } }
From source file:com.sishuok.hello.SunliuListener.java
@Override public void onApplicationEvent(final ApplicationEvent event) { System.out.println("" + event.getSource()); }
From source file:com.sishuok.hello.WangwuListener.java
@Override public void onApplicationEvent(final ApplicationEvent event) { System.out.println("" + event.getSource()); throw new RuntimeException("error"); }
From source file:com.herion.hello.SunliuListener.java
@Override public void onApplicationEvent(final ApplicationEvent event) { System.out.println("?" + event.getSource()); }
From source file:com.herion.hello.WangwuListener.java
@Override public void onApplicationEvent(final ApplicationEvent event) { System.out.println("?" + event.getSource()); }
From source file:org.trpr.platform.runtime.impl.event.BootstrapProgressMonitor.java
/** * Interface method implementation. Handles ApplicationEvent only of type {@link PlatformApplicationEvent} where the source is * {@link PlatformEvent} and of type {@link ServerConstants#BOOTSTRAPMONITOREDEVENT}. Wakes up any waiting threads that are awaiting * bootstrap completion. Also updates the internal bootstrap progress state maintained by this class * @see org.springframework.context.ApplicationListener#onApplicationEvent(org.springframework.context.ApplicationEvent) *///ww w . j a v a 2 s. c o m public void onApplicationEvent(ApplicationEvent event) { if (event.getSource() instanceof PlatformEvent) { PlatformEvent platformEvent = (PlatformEvent) event.getSource(); if (platformEvent.getEventType() != null && platformEvent.getEventType().equalsIgnoreCase(RuntimeConstants.BOOTSTRAPMONITOREDEVENT)) { synchronized (BootstrapProgressMonitor.class) { if (platformEvent.getEventStatus() != null && platformEvent.getEventStatus() .equalsIgnoreCase(RuntimeConstants.BOOTSTRAP_START_STATE)) { BootstrapProgressMonitor.bootstrapState = BootstrapProgressMonitor.BOOTSTRAP_COMPLETE; BootstrapProgressMonitor.class.notifyAll(); } else if (platformEvent.getEventStatus() != null && platformEvent.getEventStatus() .equalsIgnoreCase(RuntimeConstants.BOOTSTRAP_STOP_STATE)) { BootstrapProgressMonitor.bootstrapState = BootstrapProgressMonitor.BOOTSTRAP_IN_PROGRESS; } } } } }
From source file:com.sishuok.hello.LisiListener.java
@Override public void onApplicationEvent(final ApplicationEvent event) { if (event instanceof ContentEvent) { System.out.println("" + event.getSource()); }/*from www.j a va2 s .c om*/ }
From source file:com.herion.hello.LisiListener.java
@Override public void onApplicationEvent(final ApplicationEvent event) { if (event instanceof ContentEvent) { System.out.println("?" + event.getSource()); }//ww w . j a v a 2s . com }