public static class IncomingListener.Please
extends java.lang.Object
IncomingListener.onEvent(IncomingEvent)
.
Use the static constructor methods to create instances.public static IncomingListener.Please doNotRespond()
IncomingListener.onEvent(IncomingEvent)
when ExchangeListener.ExchangeEvent.responseNeeded()
is true
.public static IncomingListener.Please doNotRespond(OutgoingListener listener)
doNotRespond()
but allows you to provide a listener specific to this (non-)response.
Your OutgoingListener.onEvent(OutgoingListener.OutgoingEvent)
will simply be called
with OutgoingListener.Status.NO_RESPONSE_ATTEMPTED
.public static IncomingListener.Please respondWithSuccess(FutureData futureData)
respondWithSuccess(byte[])
- see FutureData
for why/when you would want to use this.public static IncomingListener.Please respondWithSuccess(FutureData futureData, OutgoingListener listener)
respondWithSuccess(byte[], OutgoingListener)
- see FutureData
for why/when you would want to use this.public static IncomingListener.Please respondWithSuccess(byte[] data)
IncomingListener.onEvent(IncomingEvent)
when
ExchangeListener.ExchangeEvent.type()
ExchangeListener.Type.isRead()
is true
and you can respect
the read request and respond with data.public static IncomingListener.Please respondWithSuccess(byte[] data, OutgoingListener listener)
respondWithSuccess(byte[])
but allows you to provide a listener specific to this response.public static IncomingListener.Please respondWithSuccess()
IncomingListener.onEvent(IncomingEvent)
when ExchangeListener.ExchangeEvent.responseNeeded()
is true
and ExchangeListener.ExchangeEvent.type()
ExchangeListener.Type.isWrite()
is true
and you consider the write successful.public static IncomingListener.Please respondWithSuccess(OutgoingListener listener)
respondWithSuccess()
but allows you to provide a listener specific to this response.public static IncomingListener.Please respondWithError(int gattStatus)
static final int
members of BleStatuses
starting with GATT_ for possible values.public static IncomingListener.Please respondWithError(int gattStatus, OutgoingListener listener)
respondWithError(int)
but allows you to provide a listener specific to this response.