One JSON-RPC 2.0 message from the server: an answer to a call (a result or an error), a notification, or (not supported, ignored by the connection) a request of the server.
More...
|
|
Type | getType () |
| |
|
Long | getId () |
| | The id of an answer (or request); null when it has none or none we could have made.
|
| |
|
String | getMethod () |
| | The method of a notification or request; null for an answer.
|
| |
|
JSONObject | getParams () |
| | The parameters of a notification or request; an empty object when there are none, null for an answer.
|
| |
|
JSONObject | getResult () |
| | The result of an answer; an empty object when the server sent something else; null for the other types.
|
| |
|
SnapcastException | getError () |
| | The error of an answer, or null.
|
| |
One JSON-RPC 2.0 message from the server: an answer to a call (a result or an error), a notification, or (not supported, ignored by the connection) a request of the server.
A line holds one message or a batch of them.
◆ parseLine()
Reads one line: a message, or a batch of at most maxBatch messages.
Elements of a batch that are no messages are skipped; a line without a single message is an error.
- Exceptions
-
| SnapcastException | of kind MALFORMED (not JSON, not a message, empty batch) or LIMIT (too long, too big a batch, too deep, too many tokens) |
The documentation for this class was generated from the following file:
- /github/workspace/yaacc/src/main/java/de/yaacc/snapcast/control/SnapcastMessage.java