C# Класс CoAP.Request

This class describes the functionality of a CoAP Request as a subclass of a CoAP Message. It provides: 1. operations to answer a request by a response using respond() 2. different ways to handle incoming responses: receiveResponse() or Responsed event
Наследование: Message
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetParameter ( String name ) : String

Gets the value of a query parameter as a String, or null if the parameter does not exist.

MarkObserve ( ) : Request

Sets CoAP's observe option. If the target resource of this request responds with a success code and also sets the observe option, it will send more responses in the future whenever the resource's state changes.

MarkObserveCancel ( ) : Request

Sets CoAP's observe option to the value of 1 to proactively cancel.

NewDelete ( ) : Request

Construct a DELETE request.

NewGet ( ) : Request

Construct a GET request.

NewPost ( ) : Request

Construct a POST request.

NewPut ( ) : Request

Construct a PUT request.

Request ( Method method ) : System

Initializes a request message.

Request ( Method method, System.Boolean confirmable ) : System

Initializes a request message.

Send ( ) : Request

Sends this message.

Send ( IEndPoint endpoint ) : Request

Sends the request over the specified endpoint.

SetUri ( String uri ) : Request
WaitForResponse ( ) : Response

Wait for a response.

WaitForResponse ( Int32 millisecondsTimeout ) : Response

Wait for a response.

Защищенные методы

Метод Описание
OnCanceled ( ) : void
OnRejected ( ) : void
OnTimedOut ( ) : void

Приватные методы

Метод Описание
CopyEventHandler ( Message src ) : void
Execute ( ) : void
FireReregister ( Request refresh ) : void
FireRespond ( Response response ) : void
FireResponding ( Response response ) : void
NotifyResponse ( ) : void
ValidateBeforeSending ( ) : void

Описание методов

GetParameter() публичный Метод

Gets the value of a query parameter as a String, or null if the parameter does not exist.
public GetParameter ( String name ) : String
name String a String specifying the name of the parameter
Результат String

MarkObserve() публичный Метод

Sets CoAP's observe option. If the target resource of this request responds with a success code and also sets the observe option, it will send more responses in the future whenever the resource's state changes.
public MarkObserve ( ) : Request
Результат Request

MarkObserveCancel() публичный Метод

Sets CoAP's observe option to the value of 1 to proactively cancel.
public MarkObserveCancel ( ) : Request
Результат Request

NewDelete() публичный статический Метод

Construct a DELETE request.
public static NewDelete ( ) : Request
Результат Request

NewGet() публичный статический Метод

Construct a GET request.
public static NewGet ( ) : Request
Результат Request

NewPost() публичный статический Метод

Construct a POST request.
public static NewPost ( ) : Request
Результат Request

NewPut() публичный статический Метод

Construct a PUT request.
public static NewPut ( ) : Request
Результат Request

OnCanceled() защищенный Метод

protected OnCanceled ( ) : void
Результат void

OnRejected() защищенный Метод

protected OnRejected ( ) : void
Результат void

OnTimedOut() защищенный Метод

protected OnTimedOut ( ) : void
Результат void

Request() публичный Метод

Initializes a request message.
public Request ( Method method ) : System
method Method
Результат System

Request() публичный Метод

Initializes a request message.
public Request ( Method method, System.Boolean confirmable ) : System
method Method The method code of the message
confirmable System.Boolean True if the request is Confirmable
Результат System

Send() публичный Метод

Sends this message.
public Send ( ) : Request
Результат Request

Send() публичный Метод

Sends the request over the specified endpoint.
public Send ( IEndPoint endpoint ) : Request
endpoint IEndPoint
Результат Request

SetUri() публичный Метод

public SetUri ( String uri ) : Request
uri String
Результат Request

WaitForResponse() публичный Метод

Wait for a response.
public WaitForResponse ( ) : Response
Результат Response

WaitForResponse() публичный Метод

Wait for a response.
public WaitForResponse ( Int32 millisecondsTimeout ) : Response
millisecondsTimeout System.Int32 the maximum time to wait in milliseconds
Результат Response