public class BroadleafApplicationEventMulticaster
This class is a simple extension to Spring's SimpleApplicationEventMulticaster. The difference is
that this allows the EventListener to indicate whether it should be asynchronous or not, assuming that a
TaskExecutor has been configured.
Asynchronous execution should be used with care. Events are not durable with this implementation.
In addition, this implementation does not broadcast or multicast events to systems outside of the
running JVM, although an event listener could be configured to do just that.
public void multicastEvent(org.springframework.context.ApplicationEvent event)
Take care when specifying that event or application listener should be executed asynchronously.
If there is no TaskExecutor configured, this
will execute synchronously, regardless. If there is a TaskExecutor configured, then if the
listener is a BroadleafApplicationListener and its
isAsynchronous() method returns true then the event will fire asynchronously.
Be aware that the events are not durable in this case. Events that are executed asynchronously
should be used with caution, where a loss of event due to error or shutdown of the VM is not a major
multicastEvent in interface org.springframework.context.event.ApplicationEventMulticaster
multicastEvent in class org.springframework.context.event.SimpleApplicationEventMulticaster
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext in interface org.springframework.context.ApplicationContextAware