-
public class ValueChangedCallback
-
-
Field Summary
Fields Modifier and Type Field Description private CallbackHandlerhandler
-
Method Summary
Modifier and Type Method Description ValueChangedCallbacksetHandler(@Nullable() Handler handler)ValueChangedCallbackwith(@NonNull() DataReceivedCallback callback)Sets the asynchronous data callback that will be called whenever a notification oran indication is received on given characteristic. ValueChangedCallbackfilter(@NonNull() DataFilter filter)Sets a filter which allows to skip some incoming data. ValueChangedCallbackfilterPacket(@NonNull() PacketFilter filter)Sets a packet filter which allows to ignore the complete packet. ValueChangedCallbackmerge(@NonNull() DataMerger merger)Adds a merger that will be used to merge multiple packets into a single Data.The merger may modify each packet if necessary. ValueChangedCallbackmerge(@NonNull() DataMerger merger, @NonNull() ReadProgressCallback callback)Adds a merger that will be used to merge multiple packets into a single Data.The merger may modify each packet if necessary. ValueChangedCallbackthen(@NonNull() ClosedCallback callback)Sets a callback that will be executed when the device services were invalidated (i.e. -
-
Method Detail
-
setHandler
@NonNull() ValueChangedCallback setHandler(@Nullable() Handler handler)
-
with
@NonNull() ValueChangedCallback with(@NonNull() DataReceivedCallback callback)
Sets the asynchronous data callback that will be called whenever a notification oran indication is received on given characteristic.
- Parameters:
callback- the data callback.
-
filter
@NonNull() ValueChangedCallback filter(@NonNull() DataFilter filter)
Sets a filter which allows to skip some incoming data.
This filter filters each received packet before they are given to the data merger.To filter the complete packet after merging, use filterPacket instead.
- Parameters:
filter- the data filter.
-
filterPacket
@NonNull() ValueChangedCallback filterPacket(@NonNull() PacketFilter filter)
Sets a packet filter which allows to ignore the complete packet.
This filter differs from the filter, as it checks the completepacket, after it has been merged. If there is not merger set, this does the same asthe data filter.
- Parameters:
filter- the packet filter.
-
merge
@NonNull() ValueChangedCallback merge(@NonNull() DataMerger merger)
Adds a merger that will be used to merge multiple packets into a single Data.The merger may modify each packet if necessary.
-
merge
@NonNull() ValueChangedCallback merge(@NonNull() DataMerger merger, @NonNull() ReadProgressCallback callback)
Adds a merger that will be used to merge multiple packets into a single Data.The merger may modify each packet if necessary.
-
then
@NonNull() ValueChangedCallback then(@NonNull() ClosedCallback callback)
Sets a callback that will be executed when the device services were invalidated (i.e. ondisconnection) or the callback has been unregistered and it can release resources.
- Parameters:
callback- the callback.
-
-
-
-