Class HttpMethodChecker

java.lang.Object
org.jolokia.server.core.restrictor.policy.AbstractChecker<HttpMethod>
org.jolokia.server.core.restrictor.policy.HttpMethodChecker

public class HttpMethodChecker extends AbstractChecker<HttpMethod>
Checker, which extracts http elements from the policy document which in turn declares the allowed HTTP methods ("get" or "post").

Example for allowing only post calls:

     <http>
        <method>post</method>
     </http>
 
Since:
02.09.11
Author:
roland
  • Constructor Details

    • HttpMethodChecker

      public HttpMethodChecker(Document pPolicy)
      Create a checker which checks for certain HTTP methods
      Parameters:
      pPolicy - policy document
  • Method Details

    • check

      public boolean check(HttpMethod pMethod)
      Description copied from class: AbstractChecker
      Check whether for the given argument access is allowed
      Specified by:
      check in class AbstractChecker<HttpMethod>
      Parameters:
      pMethod - argument (specific to each subclass)
      Returns:
      true if access is allowed, false otherwise