Class RestrictorFactory
java.lang.Object
org.jolokia.server.core.restrictor.RestrictorFactory
Factory for obtaining the proper
Restrictor- Since:
- Jul 28, 2009
- Author:
- roland
-
Method Summary
Modifier and TypeMethodDescriptionstatic RestrictorcreateRestrictor(Configuration pConfig, LogHandler log) Create a restrictor to use.static PolicyRestrictorlookupPolicyRestrictor(String pLocation) Lookup a restrictor based on a URL.
-
Method Details
-
createRestrictor
Create a restrictor to use. By default, a policy file is looked up (with the URL given by the init parameterConfigKey.POLICY_LOCATIONor "/jolokia-access.xml" by default) and if not found anAllowAllRestrictoris used by default.- Parameters:
pConfig- location from where to lookup the policy restrictorlog- handle for doing the logs- Returns:
- the restrictor to use.
-
lookupPolicyRestrictor
Lookup a restrictor based on a URL.- Parameters:
pLocation- classpath or URL representing the location of the policy restrictor- Returns:
- the restrictor created or
nullif none could be found. - Throws:
IOException- if reading of the policy stream failed
-