Package jenkins.util
Class Listeners
java.lang.Object
jenkins.util.Listeners
Utilities for working with listener interfaces.
- Since:
- 2.324
- 
Method Summary
- 
Method Details- 
notifySafely 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 listener
- asSystem- whether to impersonate- ACL.SYSTEM2. For most listener methods, this should be- true, 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 explicit- Authenticationargument if relevant).
- notification- a listener method, perhaps with arguments
- Since:
- 2.325
 
 
-