Package com.zeroc.Ice

Class NativePropertiesAdmin

java.lang.Object
com.zeroc.Ice.NativePropertiesAdmin
All Implemented Interfaces:
Object, PropertiesAdmin

public class NativePropertiesAdmin extends Object implements PropertiesAdmin
The default implementation of the "Properties" admin facet.
  • Method Details

    • getProperty

      public String getProperty(String name, Current current)
      Description copied from interface: PropertiesAdmin
      Gets a property by key.
      Specified by:
      getProperty in interface PropertiesAdmin
      Parameters:
      name - The property key.
      current - The Current object of the incoming request.
      Returns:
      The property value. This value is empty if the property is not set.
    • getPropertiesForPrefix

      public TreeMap<String,String> getPropertiesForPrefix(String name, Current current)
      Description copied from interface: PropertiesAdmin
      Gets all properties whose keys begin with prefix. If prefix is the empty string then all properties are returned.
      Specified by:
      getPropertiesForPrefix in interface PropertiesAdmin
      Parameters:
      name - The prefix to search for. May be empty.
      current - The Current object of the incoming request.
      Returns:
      The matching property set.
    • setProperties

      public void setProperties(Map<String,String> props, Current current)
      Description copied from interface: PropertiesAdmin
      Updates the communicator's properties with the given property set. If an entry in newProperties matches the name of an existing property, that property's value is replaced with the new value. If the new value is the empty string, the property is removed. Existing properties that are not modified or removed by the entries in newProperties are not affected by this update.
      Specified by:
      setProperties in interface PropertiesAdmin
      Parameters:
      props - Properties to add, change, or remove.
      current - The Current object of the incoming request.
    • addUpdateCallback

      public void addUpdateCallback(Consumer<Map<String,String>> cb)
      Adds a new update callback. The callback receives the updated properties each time the properties are updated.
      Parameters:
      cb - The new callback.
    • removeUpdateCallback

      public void removeUpdateCallback(Consumer<Map<String,String>> cb)
      Removes a previously registered update callback.
      Parameters:
      cb - The callback to remove.