org.flexiblepower.observation.ext
T
- The type of the observations that the generated SimpleObservationProvider
can send.public static class SimpleObservationProvider.Builder<T> extends java.lang.Object
SimpleObservationProvider.Builder
is a helper class to create SimpleObservationProvider
. You can create an instance of
this object using the SimpleObservationProvider.create(Object, Class)
method and you should end with the
build()
method to finally create it.
This object used the ObservationProviderRegistrationHelper
to make sure that the generated object is
registered in the service repository with the right properties.Modifier and Type | Method and Description |
---|---|
SimpleObservationProvider<T> |
build()
Creates the
SimpleObservationProvider and registers this object with all of the set properties in the
service registry. |
SimpleObservationProvider.Builder<T> |
observationOf(java.lang.String observationOf)
Sets the observationOf property.
|
SimpleObservationProvider.Builder<T> |
setProperty(java.lang.String key,
java.lang.Object value)
Set a custom property.
|
public SimpleObservationProvider.Builder<T> observationOf(java.lang.String observationOf)
observationOf
- A short description of the thing that is being observed. Usually this is the resource identifier.public SimpleObservationProvider.Builder<T> setProperty(java.lang.String key, java.lang.Object value)
key
- The key of the property.value
- The value of the property.public SimpleObservationProvider<T> build()
SimpleObservationProvider
and registers this object with all of the set properties in the
service registry.