com.jscape.inet.mft.security

## Class IPAccessRule

- java.lang.Object
- - com.jscape.inet.mft.security.IPAccessRule

- All Implemented Interfaces:
    java.io.Serializable

      public class IPAccessRule
      extends java.lang.Object
      implements java.io.Serializable

  IP access rule. Contains information about allowed or denied IP's.
  Author:
    Alex
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IPAccessRule()` Creates a new rule instance.
    `IPAccessRule(IPAccessRule that)`
    `IPAccessRule(com.jscape.inet.mft.MaskIPAccessVerifier.IPMask base, boolean artificial)` Creates a new rule instance.
    `IPAccessRule(java.lang.String mask, java.lang.String reason, boolean allowed)` Creates a new rule instance.
    `IPAccessRule(java.lang.String mask, java.lang.String reason, boolean allowed, boolean artificial)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object o)`
    `java.lang.String` | `getAddressMask()` Returns IP address mask.
    `java.lang.String` | `getReason()` Return rule reason.
    `int` | `hashCode()`
    `boolean` | `isAllowed()` Returns rule allowed flag.
    `boolean` | `isArtificial()`
    `boolean` | `matches(java.net.InetAddress address)` Checks if specified address matches to the current rule.
    `void` | `setAddressMask(java.lang.String mask)` Sets IP address mask.
    `void` | `setAllowed(boolean value)` Sets rule allowed flag.
    `void` | `setArtificial(boolean value)`
    `void` | `setReason(java.lang.String value)` Sets rule reason.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### IPAccessRule

          public IPAccessRule(com.jscape.inet.mft.MaskIPAccessVerifier.IPMask base,
                              boolean artificial)

      Creates a new rule instance.
      Parameters:
        `base` - the base mask

    - #### IPAccessRule

          public IPAccessRule(java.lang.String mask,
                              java.lang.String reason,
                              boolean allowed,
                              boolean artificial)

    - #### IPAccessRule

          public IPAccessRule(java.lang.String mask,
                              java.lang.String reason,
                              boolean allowed)

      Creates a new rule instance.
      Parameters:
        `mask` - the IP address mask
        `reason` - the rule reason
        `allowed` - if `true` IP will be marked as allowed

    - #### IPAccessRule

          public IPAccessRule()

      Creates a new rule instance.

    - #### IPAccessRule

          public IPAccessRule(IPAccessRule that)

  - ### Method Detail

    - #### getAddressMask

          public java.lang.String getAddressMask()

      Returns IP address mask.
      Returns:
        IP address mask

    - #### setAddressMask

          public void setAddressMask(java.lang.String mask)

      Sets IP address mask.
      Parameters:
        `mask` - the IP address mask

    - #### getReason

          public java.lang.String getReason()

      Return rule reason.

    - #### setReason

          public void setReason(java.lang.String value)

      Sets rule reason.
      Parameters:
        `value` - the rule reason

    - #### isAllowed

          public boolean isAllowed()

      Returns rule allowed flag.
      Returns:
        IP address mask

    - #### setAllowed

          public void setAllowed(boolean value)

      Sets rule allowed flag.
      Parameters:
        `value` - if `true` the current rule will be marked as allowed.

    - #### isArtificial

          public boolean isArtificial()

    - #### setArtificial

          public void setArtificial(boolean value)

    - #### matches

          public boolean matches(java.net.InetAddress address)

      Checks if specified address matches to the current rule.
      Parameters:
        `address` - the address to check
      Returns:
        `true` if the specified address matches the current rule; `false` otherwise

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © JSCAPE LLC. 1999-2019. All Rights Reserved