public static enum ExchangeListener.Type extends java.lang.Enum<ExchangeListener.Type>
Enum Constant and Description |
---|
INDICATION
Only for
BleServer.sendIndication(String, UUID, byte[]) or overloads. |
NOTIFICATION
Only for
BleServer.sendNotification(String, UUID, byte[]) or overloads. |
PREPARED_WRITE
The client is requesting acceptance of a prepared write.
|
READ
The client is requesting a read of some data from us, the server.
|
WRITE
The client is requesting acceptance of a write.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isNotificationOrIndication()
Shorthand for checking if this equals
NOTIFICATION or INDICATION . |
boolean |
isRead()
Shorthand for checking if this equals
READ . |
boolean |
isWrite()
Shorthand for checking if this equals
WRITE or PREPARED_WRITE . |
static ExchangeListener.Type |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ExchangeListener.Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ExchangeListener.Type READ
public static final ExchangeListener.Type WRITE
public static final ExchangeListener.Type PREPARED_WRITE
public static final ExchangeListener.Type NOTIFICATION
BleServer.sendNotification(String, UUID, byte[])
or overloads.public static final ExchangeListener.Type INDICATION
BleServer.sendIndication(String, UUID, byte[])
or overloads.public static ExchangeListener.Type[] values()
for (ExchangeListener.Type c : ExchangeListener.Type.values()) System.out.println(c);
public static ExchangeListener.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 final boolean isRead()
READ
.public final boolean isNotificationOrIndication()
NOTIFICATION
or INDICATION
.public final boolean isWrite()
WRITE
or PREPARED_WRITE
.