Interface BroadleafApplicationListener<E extends org.springframework.context.ApplicationEvent>

Type Parameters:
ApplicationEvent -
All Superinterfaces:
org.springframework.context.ApplicationListener<E>, EventListener
All Known Implementing Classes:
AbstractBroadleafApplicationEventListener, TransactionLifecycleMonitor

public interface BroadleafApplicationListener<E extends org.springframework.context.ApplicationEvent> extends org.springframework.context.ApplicationListener<E>
Works in conjection with org.broadleafcommerce.common.event.BroadleafApplicationEventMulticaster except the event listener can indicate if the event should be run in a background thread. If no TaskExecutor is configured on the BroadleafApplicationEventMulticaster then it will be executed synchronously, regardless of of whether an event listener is configured.
Author:
Kelly Tisdell
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Indicates if this application listener should be run in a background thread if a TaskExecutor is configured.

    Methods inherited from interface org.springframework.context.ApplicationListener

    onApplicationEvent, supportsAsyncExecution
  • Method Details

    • isAsynchronous

      boolean isAsynchronous()
      Indicates if this application listener should be run in a background thread if a TaskExecutor is configured. If no TaskExecutor is configure with a bean name of "blApplicationEventMulticastTaskExecutor" then this will be run synchronously regardless. Generally, this should return false as the default implementation has no reliability guarantees associated with Asynch processing. However, for convenience this allows asynch processing for situations that don't require guaranteed processing. For example, publishing statistics or log events in a background thread would be candidates for background processing. Handling important database updates would not.
      Returns:
      See Also: