public class AylaLanMessage
extends java.lang.Object
The getPayload(AylaEncryption)
method can be used to decrypt and verify a received
encrypted message.
The static fromSession(NanoHTTPD.IHTTPSession, AylaDevice)
method can be used
to construct an AylaLanMessage object from an HTTP session. This is used by AylaLanModule
when processing incoming messages for property updates or commands from the
module.
Modifier and Type | Class and Description |
---|---|
static class |
AylaLanMessage.Payload |
Constructor and Description |
---|
AylaLanMessage() |
Modifier and Type | Method and Description |
---|---|
static AylaLanMessage |
fromSession(fi.iki.elonen.NanoHTTPD.IHTTPSession session,
AylaDevice device)
Creates an AylaLanMessage object from an HTTP session.
|
AylaLanMessage.Payload |
getPayload(com.aylanetworks.aylasdk.lan.AylaEncryption encryption)
Returns the decrypted message portion of the LanMessage object.
|
public static AylaLanMessage fromSession(fi.iki.elonen.NanoHTTPD.IHTTPSession session, AylaDevice device) throws PreconditionError, InternalError
session
- HTTP session containing the message datadevice
- Device this message is intended forPreconditionError
- if the device is not in LAN mode,InternalError
- if no data is found in the HTTP session input streampublic AylaLanMessage.Payload getPayload(com.aylanetworks.aylasdk.lan.AylaEncryption encryption) throws AylaError
encryption
- AylaEncryption object used to perform the decryptionAylaError
- if an error occurred. Errors can include: