org.apache.geode.security

## Class SpySecurityManager

- java.lang.Object
- - org.apache.geode.security.SimpleTestSecurityManager
  - - org.apache.geode.security.SpySecurityManager

- All Implemented Interfaces:
    SecurityManager

      public class SpySecurityManager
      extends SimpleTestSecurityManager

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SpySecurityManager()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `authorize(java.lang.Object principal, ResourcePermission permission)` Authorize the ResourcePermission for a given Principal
    `void` | `close()` Close any resources used by the SecurityManager, called when a cache is closed.
    `int` | `getCloseInvocationCount()`
    `int` | `getInitInvocationCount()`
    `void` | `init(java.util.Properties securityProps)` Initialize the SecurityManager.

    - ### Methods inherited from class org.apache.geode.security.SimpleTestSecurityManager

      `authenticate`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SpySecurityManager

          public SpySecurityManager()

  - ### Method Detail

    - #### init

          public void init(java.util.Properties securityProps)

      Description copied from interface: `SecurityManager`
      Initialize the SecurityManager. This is invoked when a cache is created
      Specified by:
        `init` in interface `SecurityManager`
      Overrides:
        `init` in class `SimpleTestSecurityManager`
      Parameters:
        `securityProps` - the security properties obtained using a call to `DistributedSystem.getSecurityProperties()`

    - #### authorize

          public boolean authorize(java.lang.Object principal,
                                   ResourcePermission permission)

      Description copied from interface: `SecurityManager`
      Authorize the ResourcePermission for a given Principal
      Specified by:
        `authorize` in interface `SecurityManager`
      Overrides:
        `authorize` in class `SimpleTestSecurityManager`
      Parameters:
        `principal` - The principal that's requesting the permission
        `permission` - The permission requested
      Returns:
        true if authorized, false if not

    - #### close

          public void close()

      Description copied from interface: `SecurityManager`
      Close any resources used by the SecurityManager, called when a cache is closed.
      Specified by:
        `close` in interface `SecurityManager`
      Overrides:
        `close` in class `SimpleTestSecurityManager`

    - #### getInitInvocationCount

          public int getInitInvocationCount()

    - #### getCloseInvocationCount

          public int getCloseInvocationCount()