Message Properties

Message-processor that issue requests use the Mule-message payload as CoAP request payload. Likewise the payload of CoAP responses is returned as payload of the returned Mule-message.

The CoAP protocol has a number op options defined that can be set in the header of CoAP messages. CoAP options can be added to a CoAP request by adding outbound-properties to the Mule-message. Message-processors process options contained in CoAP responses by placing the option contents in inbound-properties of the returned Mule-message.

The tables below describes the properties used in inbound and/or outbound scope..

Table 2.  properties describing the request

nametypedescription
coap.request.codeStringrequest method used, possible values "GET", "PUT", "POST", "DELETE"
coap.request.uriStringuri of the CoAP resource the request was issued on

Table 3. properties describing the response

nametypedescription
coap.response.codeStringthe response code received from server, only present when a response is received within timeout.
coap.response.successBooleanis true when server has responded within timeout and the response code indicates a successful processing of the request, otherwise false

Table 4. option properties

nametypedescription
coap.opt.if_match.list(Collection of) Byte[] 
coap.opt.uri_hostString 
coap.opt.etag.list(Collection of) Byte[] / (Collection of) EtagMay also be an Etag object or Collection of Etag objects.
coap.opt.if_none_matchBoolean 
coap.opt.uri_portInteger 
coap.opt.location_path.listCollection of String  
coap.opt.location_pathString 
coap.opt.uri_path.listCollection of String  
coap.opt.uri_pathString 
coap.opt.content_formatInteger 
coap.opt.max_ageLong 
coap.opt.uri_query.listCollection of String  
coap.opt.uri_queryString 
coap.opt.acceptInteger 
coap.opt.location_query.listCollection of String  
coap.opt.location_queryString 
coap.opt.proxy_uriString 
coap.opt.proxy_schemeString 
coap.opt.block1.szxInteger 
coap.opt.block1.sizeInteger 
coap.opt.block1.numInteger 
coap.opt.block1.mBoolean 
coap.opt.block2.szxInteger 
coap.opt.block2.sizeInteger 
coap.opt.block2.numInteger 
coap.opt.block2.mBoolean 
coap.opt.size1Integer 
coap.opt.size2Integer 
coap.opt.observeInteger 
coap.opt.other.xxByte[] or Stringnon-standard option ( xx is the number of the option)
coap.opt.other.xx.criticalBooleannon-standard option is critical and must be recognised ( xx is the number of the option, only inbound)
coap.opt.other.xx.no_cache_keyBooleannon-standard option must not be part of a cache key ( xx is the number of the option, only inbound)
coap.opt.other.xx.unsafeBooleannon-standard option is unsafe to forward ( xx is the number of the option, only inbound)