Class NetworkChecker

java.lang.Object
org.jolokia.server.core.restrictor.policy.AbstractChecker<String[]>
org.jolokia.server.core.restrictor.policy.NetworkChecker

public class NetworkChecker extends AbstractChecker<String[]>
Check whether a host is allowed to access the agent. The restriction can be specified in the policy file with the <remote> tag. Either plain host or subnet (in the CIDR notation) can be specified
Example:
 <remote>
   <host>planck</host>
   <host>10.0.11.125</host>
   <host>11.0.0.0/16</host>
   <host>192.168.15.3/255.255.255.0</host>
 </remote>
 
Since:
02.09.11
Author:
roland
  • Constructor Details

    • NetworkChecker

      public NetworkChecker(Document pDoc)
      Construct this checker from a given document
      Parameters:
      pDoc - document to examine for <remote> tags.
  • Method Details

    • check

      public boolean check(String[] pHostOrAddresses)
      Check for one or more hosts.
      Specified by:
      check in class AbstractChecker<String[]>
      Parameters:
      pHostOrAddresses - array of host names or IP addresses
      Returns:
      true if one of the given name passes this checker.