public class AttributeUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addQueryParam(List<QueryParamAttribute> list,
String parameterString)
Add query parameter string with optional value to multiMap.
|
static List<OtherOptionAttribute> |
createOthers(List<org.eclipse.californium.core.coap.Option> otherCoapOptions)
Create other option attributes.
|
static org.eclipse.californium.core.coap.CoAP.Type |
toMessageType(CoapMessageType type)
Translate to Cf message type..
|
static CoapMessageType |
toMessageTypeAttribute(org.eclipse.californium.core.coap.CoAP.Type type)
Translate Cf message type to messageType attribute.
|
static org.eclipse.californium.core.coap.CoAP.Code |
toRequestCode(CoapRequestCode requestCodeAttribute)
Translate requestCode attribute to Cf request Code.
|
static CoapRequestCode |
toRequestCodeAttribute(org.eclipse.californium.core.coap.CoAP.Code code)
Translate Cf request Code to requestCode attribute value.
|
static org.eclipse.californium.core.coap.CoAP.ResponseCode |
toResponseCode(CoapResponseCode reponseCodeAttribute)
Translate responseCode attribute to Cf ResponseCode.
|
static org.eclipse.californium.core.coap.CoAP.ResponseCode |
toResponseCode(CoapResponseCode reponseCodeAttribute,
CoapResponseCode defaultResponseCodeAttribute)
Translate responseCode attribute to Cf ResponseCode with default value.
|
static CoapResponseCode |
toResponseCodeAttribute(org.eclipse.californium.core.coap.CoAP.ResponseCode reponseCode)
Translate Cf Response to CoderesponseCode attribute.
|
static Result |
toResult(org.eclipse.californium.core.coap.CoAP.ResponseCode code)
Translate response code to result.
|
public static org.eclipse.californium.core.coap.CoAP.Type toMessageType(CoapMessageType type) throws InternalInvalidMessageTypeException
type - to convertInternalInvalidRequestCodeException - when requestCode cannot be convertedInternalInvalidMessageTypeExceptionpublic static CoapMessageType toMessageTypeAttribute(org.eclipse.californium.core.coap.CoAP.Type type) throws InternalInvalidMessageTypeException
type - to convertInternalInvalidRequestCodeException - when requestCode cannot be convertedInternalInvalidMessageTypeExceptionpublic static org.eclipse.californium.core.coap.CoAP.Code toRequestCode(CoapRequestCode requestCodeAttribute) throws InternalInvalidRequestCodeException
requestCodeAttribute - to convertInternalInvalidRequestCodeException - when requestCode cannot be convertedpublic static CoapRequestCode toRequestCodeAttribute(org.eclipse.californium.core.coap.CoAP.Code code) throws InternalInvalidRequestCodeException
code - to convertInternalInvalidRequestCodeException - when requestCode cannot be convertedpublic static org.eclipse.californium.core.coap.CoAP.ResponseCode toResponseCode(CoapResponseCode reponseCodeAttribute, CoapResponseCode defaultResponseCodeAttribute) throws InternalInvalidResponseCodeException
reponseCodeAttribute - to be converteddefaultResponseCodeAttribute - is the responseCode to use when input is emptyInternalInvalidResponseCodeExceptionpublic static org.eclipse.californium.core.coap.CoAP.ResponseCode toResponseCode(CoapResponseCode reponseCodeAttribute) throws InternalInvalidResponseCodeException
reponseCodeAttribute - the code to convertInternalInvalidResponseCodeExceptionpublic static CoapResponseCode toResponseCodeAttribute(org.eclipse.californium.core.coap.CoAP.ResponseCode reponseCode) throws InternalInvalidResponseCodeException
reponseCode - the code to convertInternalInvalidResponseCodeExceptionpublic static void addQueryParam(List<QueryParamAttribute> list, String parameterString)
list - The list to add the parameter to.parameterString - The string containing the key and optional value.public static List<OtherOptionAttribute> createOthers(List<org.eclipse.californium.core.coap.Option> otherCoapOptions)
otherCoapOptions - The received other coap options.public static Result toResult(org.eclipse.californium.core.coap.CoAP.ResponseCode code)
code - The response code to translate.Copyright © 2019–2024 Teslanet.nl. All rights reserved.