Instances of {@link de.uniluebeck.itm.ncoap.message.CoapResponse} are created by an instance of{@link de.uniluebeck.itm.ncoap.application.server.webservice.Webservice} to answer requests.
Note: The given {@link MessageType.Name} (one of{@link de.uniluebeck.itm.ncoap.message.MessageType.Name#CON} or{@link de.uniluebeck.itm.ncoap.message.MessageType.Name#NON}) may be changed by the framework before it is sent to the other CoAP endpoints. Such a change might e.g. happen if this {@link de.uniluebeck.itm.ncoap.message.CoapResponse} was created with{@link de.uniluebeck.itm.ncoap.message.MessageType.Name#CON} to answer a{@link de.uniluebeck.itm.ncoap.message.CoapRequest} with{@link de.uniluebeck.itm.ncoap.message.MessageType.Name#CON} and the framework did not yet send an empty{@link de.uniluebeck.itm.ncoap.message.CoapMessage} with {@link MessageType.Name#ACK}. Then the framework will ensure the {@link de.uniluebeck.itm.ncoap.message.MessageType} of this{@link de.uniluebeck.itm.ncoap.message.CoapResponse} to be set to{@link de.uniluebeck.itm.ncoap.message.MessageType.Name#ACK} to make it a piggy-backed response.
@author Oliver Kleine
|
|