public interface RoleSensitiveUsed by
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
Callableso that other callable-like interfaces can reuse this.
- Kohsuke Kawaguchi
- See Also:
void checkRoles(RoleChecker checker) throws SecurityExceptionVerifies the roles expected by this callable by invoking
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, such as
NotReallyRoleSensitiveCallable, etc. 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