Interface ServiceProperty<T>

    • Method Detail

      • get

        @NotNull
        @NotNull java.util.Optional<T> get​(@NotNull
                                           @NotNull ServiceInfoSnapshot serviceInfoSnapshot)
        Gets a property out of the properties of the given ServiceInfoSnapshot.
        Parameters:
        serviceInfoSnapshot - the serviceInfoSnapshot to get the property
        Returns:
        an optional with the value, might be empty
      • set

        void set​(@NotNull
                 @NotNull ServiceInfoSnapshot serviceInfoSnapshot,
                 @Nullable
                 T value)
        Sets a property into the properties of the given ServiceInfoSnapshot. Some properties might not support this. An update of the service might be necessary.
        Parameters:
        serviceInfoSnapshot - the serviceInfoSnapshot to modify the property in
        value - the value to set or null to remove the property