public final class CoapTranslator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static CoAP.ResponseCode |
STATUS_FIELD_MALFORMED
Property file containing the mappings between coap messages and http
messages.
|
static CoAP.ResponseCode |
STATUS_TIMEOUT |
static CoAP.ResponseCode |
STATUS_TRANSLATION_ERROR |
Modifier and Type | Method and Description |
---|---|
static Request |
getRequest(Request incomingRequest)
Starting from an external CoAP request, the method fills a new request
for the internal CaAP nodes.
|
static Response |
getResponse(Response incomingResponse)
Fills the new response with the response received from the internal CoAP
node.
|
public static final CoAP.ResponseCode STATUS_FIELD_MALFORMED
public static final CoAP.ResponseCode STATUS_TIMEOUT
public static final CoAP.ResponseCode STATUS_TRANSLATION_ERROR
public static Request getRequest(Request incomingRequest) throws TranslationException
incomingRequest
- the original requestTranslationException
- the translation exceptionpublic static Response getResponse(Response incomingResponse)
incomingResponse
- the forwarded request