Interface ServiceProperty<T>
-
- Type Parameters:
T- the type of the value for this property
- All Known Implementing Classes:
DefaultFunctionalServiceProperty,DefaultJsonServiceProperty,DefaultModifiableServiceProperty
public interface ServiceProperty<T>This class helps getting/modifying properties inServiceInfoSnapshots.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull java.util.Optional<T>get(@NotNull ServiceInfoSnapshot serviceInfoSnapshot)Gets a property out of the properties of the givenServiceInfoSnapshot.voidset(@NotNull ServiceInfoSnapshot serviceInfoSnapshot, T value)Sets a property into the properties of the givenServiceInfoSnapshot.
-
-
-
Method Detail
-
get
@NotNull @NotNull java.util.Optional<T> get(@NotNull @NotNull ServiceInfoSnapshot serviceInfoSnapshot)
Gets a property out of the properties of the givenServiceInfoSnapshot.- 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 givenServiceInfoSnapshot. Some properties might not support this. An update of the service might be necessary.- Parameters:
serviceInfoSnapshot- the serviceInfoSnapshot to modify the property invalue- the value to set or null to remove the property
-
-