Skip to content

Expose shouldHandle(ApplicationEvent) in ApplicationListenerMethodAdapter #31295

@odrotbohm

Description

@odrotbohm

It would be nice if ApplicationListenerMethodAdapter exposed a variant of its already existing but private shouldHandle(ApplicationEvent, Object[]) to inspect whether a listener is actually interested in an event instance. This would allow finding out whether, for example, a condition defined in @(Transactional)EventListener will ultimately cause the event instance not being handled, even though the listener might be generally interested in events of a particular type.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions