close method is called.
The ZCLCommandResponseStream is used to process a stream of responses
from a ZigBee network. Responses are consumed by registering a handler with
forEach(Predicate). Responses received before a handler is
registered are buffered until a handler is registered, or until the close
method is called.
A handler consumes events returning true to continue delivery.
At some point the ZigBee service invocation will terminate event delivery by
sending a close event (a ZCLCommandResponse which returns
true from ZCLCommandResponse#isEnd(). After a close
event the handler function will be dereferenced.
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | forEach(Predicate<? super ZCLCommandResponse>
A handler to process ZCLCommandResponse objects handler)Registers a handler that will be called for each of the received responses. |
| close | back to summary |
|---|---|
| public void close() Closes this response, indicating that no further responses are needed. Any buffered responses will be discarded, and a close event will be sent to a handler if it is registered. | |
| forEach | back to summary |
|---|---|
| public void forEach(Predicate<? super ZCLCommandResponse> handler) Registers a handler that will be called for each of the received
responses. Only one handler may be registered. Any responses that arrive
before a handler is registered will be buffered and pushed into the
handler when it is registered.
If the handler returns
| |