public interface RoleSensitive
Callable-like objects to designate the intended recipient of the callable, to help verify callables are running in JVMs that it is intended to run.
This interface is defined separately from
Callable so that other callable-like interfaces
can reuse this.
void checkRoles(RoleChecker checker) throws SecurityException
RoleChecker.check(RoleSensitive, Collection)method (or its variants), to provide an opportunity for
RoleCheckerto reject this object.
Do not implement this method unless you know what you are doing.
If you have a Jenkins
FileCallable, use the standard abstract base classes instead,
See this document for details.
If the method returns normally, the check has passed.
SecurityException- If there's a mismatch in the expected roles and the actual roles that should prevent the execution of this callable.
AbstractMethodError- In the history of this library, this interface was added rather later, so there's lots of
Callables out there that do not implement this method. For this reason, code that calls this method should be prepared to receive
AbstractMethodError, and treat that as if the invocation of
Copyright © 2004–2021. All rights reserved.