Class RequestTypeChecker

java.lang.Object
org.jolokia.server.core.restrictor.policy.AbstractChecker<RequestType>
org.jolokia.server.core.restrictor.policy.RequestTypeChecker

public class RequestTypeChecker extends AbstractChecker<RequestType>
Checks for a certain requst type which are specified within a <commands> section. If no such section is present, then all commands are allowed, otherwise only the given type is allowed by this checker.

Allowed types are the names as defined in RequestType.

Example:

 <commands>
   <command>read</command>
   <command>list</command>
 </commands>
 
Since:
02.09.11
Author:
roland
  • Constructor Details

    • RequestTypeChecker

      public RequestTypeChecker(Document pDoc)
      Checker for requests types
      Parameters:
      pDoc - document to examine for declared restrictions
  • Method Details

    • check

      public boolean check(RequestType pType)
      Return true if either no <commands> section was in the policy or the given type was mentioned as allowed command
      Specified by:
      check in class AbstractChecker<RequestType>
      Parameters:
      pType - the type to check
      Returns:
      true if the condition above is true