public static enum NotificationListener.Type extends java.lang.Enum<NotificationListener.Type> implements UsesCustomNull
ReadWriteListener.ReadWriteEvent
- read, write, poll, etc.Enum Constant and Description |
---|
DISABLING_NOTIFICATION
Opposite of
ENABLING_NOTIFICATION . |
ENABLING_NOTIFICATION
Associated with
BleDevice.enableNotify(UUID, ReadWriteListener) and called when enabling the notification completes by writing to the
Descriptor of the given UUID . |
INDICATION
Similar to
NOTIFICATION , kicked off from BleDevice.enableNotify(UUID, ReadWriteListener) , but
under the hood this is treated slightly differently. |
NOTIFICATION
Associated with
BleDevice.enableNotify(UUID, ReadWriteListener) when we actually get a notification. |
NULL
As of now, only used for
DeviceReconnectFilter.ConnectFailEvent.txnFailReason() in some cases. |
PSEUDO_NOTIFICATION
Associated with
BleDevice.startChangeTrackingPoll(UUID, Interval, ReadWriteListener)
or BleDevice.enableNotify(UUID, Interval, ReadWriteListener) where a force-read timeout is invoked. |
Modifier and Type | Method and Description |
---|---|
boolean |
isNativeNotification()
|
boolean |
isNull()
Returns
true if the object's state represents what would otherwise be Java's built-in null . |
BleNodeConfig.HistoricalDataLogFilter.Source |
toHistoricalDataSource()
Returns the
BleNodeConfig.HistoricalDataLogFilter.Source equivalent
for this NotificationListener.Type , or BleNodeConfig.HistoricalDataLogFilter.Source.NULL . |
static NotificationListener.Type |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static NotificationListener.Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NotificationListener.Type NULL
DeviceReconnectFilter.ConnectFailEvent.txnFailReason()
in some cases.public static final NotificationListener.Type NOTIFICATION
BleDevice.enableNotify(UUID, ReadWriteListener)
when we actually get a notification.public static final NotificationListener.Type INDICATION
NOTIFICATION
, kicked off from BleDevice.enableNotify(UUID, ReadWriteListener)
, but
under the hood this is treated slightly differently.public static final NotificationListener.Type PSEUDO_NOTIFICATION
BleDevice.startChangeTrackingPoll(UUID, Interval, ReadWriteListener)
or BleDevice.enableNotify(UUID, Interval, ReadWriteListener)
where a force-read timeout is invoked.public static final NotificationListener.Type ENABLING_NOTIFICATION
BleDevice.enableNotify(UUID, ReadWriteListener)
and called when enabling the notification completes by writing to the
Descriptor of the given UUID
. ReadWriteListener.Status.SUCCESS
doesn't necessarily mean that notifications will
definitely now work (there may be other issues in the underlying stack), but it's a reasonable guarantee.public static final NotificationListener.Type DISABLING_NOTIFICATION
ENABLING_NOTIFICATION
.public static NotificationListener.Type[] values()
for (NotificationListener.Type c : NotificationListener.Type.values()) System.out.println(c);
public static NotificationListener.Type valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean isNativeNotification()
true
only for NOTIFICATION
and INDICATION
, i.e. only
notifications whose origin is an *actual* notification (or indication) sent from the remote BLE device (as opposed to
a PSEUDO_NOTIFICATION
).public BleNodeConfig.HistoricalDataLogFilter.Source toHistoricalDataSource()
BleNodeConfig.HistoricalDataLogFilter.Source
equivalent
for this NotificationListener.Type
, or BleNodeConfig.HistoricalDataLogFilter.Source.NULL
.public boolean isNull()
UsesCustomNull
true
if the object's state represents what would otherwise be Java's built-in null
.isNull
in interface UsesCustomNull