Skip to content

Expose shouldHandle(ApplicationEvent) in ApplicationListenerMethodAdapter #31295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
odrotbohm opened this issue Sep 22, 2023 · 0 comments
Closed
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@odrotbohm
Copy link
Member

odrotbohm commented Sep 22, 2023

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.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 22, 2023
@sbrannen sbrannen changed the title Expose ApplicationListenerMethodAdapter.shouldHandle(ApplicationEvent) Expose shouldHandle(ApplicationEvent) in ApplicationListenerMethodAdapter Sep 22, 2023
@sbrannen sbrannen added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement labels Sep 22, 2023
@jhoeller jhoeller removed the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 22, 2023
@jhoeller jhoeller self-assigned this Sep 22, 2023
@jhoeller jhoeller added this to the 6.1.0-RC1 milestone Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants