Class ServicePropertyAccessor

java.lang.Object
org.forgerock.openidm.core.ServicePropertyAccessor
All Implemented Interfaces:
PropertyAccessor

public class ServicePropertyAccessor extends Object implements PropertyAccessor
A ServicePropertyAccessor tracks services with ServiceTracker<Map<String, Object>, Map<String, Object>> and gets the Properties.
  • Constructor Details

  • Method Details

    • getProperty

      public <T> T getProperty(String key, T defaultValue, Class<T> expected)
      Returns the value of the specified property. If the key is not found in the tracked services, the delegate is then requested. The method returns null if the property is not found.
      Specified by:
      getProperty in interface PropertyAccessor
      Type Parameters:
      T - The type of the expected property.
      Parameters:
      key - The name of the requested property.
      defaultValue - The value to return if the property is not found.
      expected - The type of the expected value.
      Returns:
      The value of the requested property, or null if the property is undefined.
      Throws:
      SecurityException - If the caller does not have the appropriate PropertyPermission to read the property, and the Java Runtime Environment supports permissions.