Interface PermissionMiddleware

  • All Superinterfaces:
    Middleware, TimeProviderMiddleware

    public interface PermissionMiddleware
    extends TimeProviderMiddleware
    Permission middleware allows to check whether some permission is there for a given job,

    If the given job does not have the right permission than this job would be released back to pool for other consumers.

    NOTE: User's role was changed between and the said is no longer be able to perform some action

    • Method Detail

      • hasPermission

        boolean hasPermission​(Job job)
        Checks whether given job has enough permission to execute
        Parameters:
        job - job that's going to be executed
        Returns:
        true/false
      • handle

        default void handle​(Job job,
                            java.util.concurrent.Callable<java.lang.Void> next)
                     throws java.lang.Exception
        Description copied from interface: Middleware
        Middleware handles that would be called
        Specified by:
        handle in interface Middleware
        Parameters:
        job - job object
        next - next middleware in chain
        Throws:
        java.lang.Exception - any exception