Package jenkins.util
Class Listeners
java.lang.Object
jenkins.util.Listeners
Utilities for working with listener interfaces.
- Since:
- 2.324
-
Method Summary
-
Method Details
-
notify
Safely send a notification to all listeners of a given type.Only suitable for listener methods which do not throw checked or otherwise documented exceptions.
- Type Parameters:
L
- the type of listener- Parameters:
listenerType
- the type of listenerasSystem
- whether to impersonateACL.SYSTEM2
. For most listener methods, this should betrue
, so that listener implementations can freely perform various operations without access checks. In some cases, existing listener interfaces were implicitly assumed to pass along user authentication, because they were sometimes triggered by user actions such as configuration changes; this is an antipattern (better to pass an explicitAuthentication
argument if relevant).notification
- a listener method, perhaps with arguments- Since:
- 2.325
-