mirror of
https://github.com/deavmi/doap
synced 2024-07-04 13:50:51 +02:00
CoapRequestBuilder
- You can now call `con()` to make the message confirmable - You can now call `non()` to make the message non-confirmable - Messages are now by default confirmable
This commit is contained in:
parent
c1be1b39cf
commit
05557fc63c
|
@ -130,6 +130,11 @@ package class CoapRequestBuilder
|
||||||
*/
|
*/
|
||||||
package Code requestCode;
|
package Code requestCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The message type
|
||||||
|
*/
|
||||||
|
package MessageType type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The payload
|
* The payload
|
||||||
*/
|
*/
|
||||||
|
@ -154,6 +159,7 @@ package class CoapRequestBuilder
|
||||||
{
|
{
|
||||||
this.client = client;
|
this.client = client;
|
||||||
this.requestCode = Code.GET;
|
this.requestCode = Code.GET;
|
||||||
|
this.type = MessageType.CONFIRMABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -187,6 +193,28 @@ package class CoapRequestBuilder
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets this message as confirmable
|
||||||
|
*
|
||||||
|
* Returns: this builder
|
||||||
|
*/
|
||||||
|
public CoapRequestBuilder con()
|
||||||
|
{
|
||||||
|
this.type = MessageType.CONFIRMABLE;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets this message as non-confirmable
|
||||||
|
*
|
||||||
|
* Returns: this builder
|
||||||
|
*/
|
||||||
|
public CoapRequestBuilder non()
|
||||||
|
{
|
||||||
|
this.type = MessageType.NON_CONFIRMABLE;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build the request, set it in flight
|
* Build the request, set it in flight
|
||||||
* and return the future handle to it.
|
* and return the future handle to it.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user