public class JSONCommunicator extends Communicator
radio| Constructor and Description |
|---|
JSONCommunicator(Radio radio)
Handle required injections.
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
makeCall(String uniqueId,
String action,
Object payload) |
protected Object |
makeCallError(String uniqueId,
String action,
String errorCode,
String errorDescription) |
protected Object |
makeCallResult(String uniqueId,
String action,
Object payload) |
Object |
packPayload(Object payload) |
protected Message |
parse(Object json) |
<T> T |
unpackPayload(Object payload,
Class<T> type) |
accept, connect, disconnect, sendCall, sendCallError, sendCallResultpublic <T> T unpackPayload(Object payload, Class<T> type) throws Exception
unpackPayload in class CommunicatorExceptionpublic Object packPayload(Object payload)
packPayload in class Communicatorprotected Object makeCallResult(String uniqueId, String action, Object payload)
makeCallResult in class Communicatorprotected Object makeCall(String uniqueId, String action, Object payload)
makeCall in class Communicatorprotected Object makeCallError(String uniqueId, String action, String errorCode, String errorDescription)
makeCallError in class Communicatorprotected Message parse(Object json)
parse in class CommunicatorCopyright © 2022. All rights reserved.