Class RestrictorFactory

java.lang.Object
org.jolokia.server.core.restrictor.RestrictorFactory

public final class RestrictorFactory extends Object
Factory for obtaining the proper Restrictor
Since:
Jul 28, 2009
Author:
roland
  • Method Details

    • createRestrictor

      public static Restrictor createRestrictor(Configuration pConfig, LogHandler log)
      Create a restrictor to use. By default, a policy file is looked up (with the URL given by the init parameter ConfigKey.POLICY_LOCATION or "/jolokia-access.xml" by default) and if not found an AllowAllRestrictor is used by default.
      Parameters:
      pConfig - location from where to lookup the policy restrictor
      log - handle for doing the logs
      Returns:
      the restrictor to use.
    • lookupPolicyRestrictor

      public static PolicyRestrictor lookupPolicyRestrictor(String pLocation) throws IOException
      Lookup a restrictor based on a URL.
      Parameters:
      pLocation - classpath or URL representing the location of the policy restrictor
      Returns:
      the restrictor created or null if none could be found.
      Throws:
      IOException - if reading of the policy stream failed