# registerListeners method

1. @protected

Future<void> registerListeners()

Registers all ApplicationEventListener pods in the ConfigurableListablePodFactory.

This enables Jetleaf components annotated as listeners to receive published application events automatically.

This is part of Jetleaf – a framework which developers can use to build web applications.

## Implementation

    @protected
    Future<void> registerListeners() async {
      // Register ApplicationListener pods
      final al = Class<ApplicationEventListener>(null, PackageNames.CORE);

      final names = await getPodNames(al);
      for (final listenerName in names) {
        final listener = await getPod(listenerName);
        _applicationEventBus?.addApplicationListener(listener: listener, podName: listenerName);
      }

      return Future.value();
    }