# ApplicationContextEvent constructor

const ApplicationContextEvent(

1. ApplicationContext source

)

A base class for all events that are published within the context of an ApplicationContext.

This class is an extension of ApplicationEvent that ensures the source of the event is always an ApplicationContext. It is intended to be subclassed for specific types of application context lifecycle events such as context refresh, close, or start.

### Example:

    class ContextRefreshedEvent extends ApplicationContextEvent {
      ContextRefreshedEvent(ApplicationContext source) : super(source);
    }

    void handle(ContextRefreshedEvent event) {
      final context = event.getSource();
      print("Application context refreshed: $context");
    }

This abstraction allows for strongly typed event listeners specific to the lifecycle of the JetLeaf application context.

## Implementation

    const ApplicationContextEvent(ApplicationContext super.source);