Class BroadleafSystemEvent

java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.broadleafcommerce.common.event.BroadleafApplicationEvent
org.broadleafcommerce.common.event.BroadleafSystemEvent
All Implemented Interfaces:
Serializable

public class BroadleafSystemEvent extends BroadleafApplicationEvent

A BroadleafApplicationEvent used so that we can communicate with the ScheduledJobsAndEvents module without having a dependency on it. By publishing a Spring Event with this detail, the ScheduledJobsAndEvents module will listen for this event and create a corresponding com.broadleafcommerce.jobsevents.domain.SystemEvent to be consumed.

To send an event, inject the ApplicationContext and publish the event:

 @Autowired
 private ApplicationContext appCtx;

 ...

 appCtx.publishEvent(new BroadleafSystemEvent("CONSUMER_TYPE", BroadleafEventScopeType.VM, BroadleafEventWorkerType.SITE, true);
 
Author:
Jay Aisenbrey (cja769)
See Also:
  • ApplicationEventPublisher.publishEvent(org.springframework.context.ApplicationEvent)
  • Serialized Form