org.eclipse.californium.core.coap.Request.newDelete()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(248)

本文整理了Java中org.eclipse.californium.core.coap.Request.newDelete方法的一些代码示例,展示了Request.newDelete的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.newDelete方法的具体详情如下:
包路径:org.eclipse.californium.core.coap.Request
类名称:Request
方法名:newDelete

Request.newDelete介绍

[英]Convenience factory method to construct a DELETE request and equivalent to new Request(Code.DELETE);
[中]构造删除请求的便利工厂方法,相当于new Request(Code.DELETE);

代码示例

代码示例来源:origin: org.opendaylight.iotdm/onem2mbenchmark-impl

public OdlOnem2mCoapRequestPrimitiveBuilder setOperationDelete() {
  onem2mRequest.coapRequest = Request.newDelete();
  return this;
}
public OdlOnem2mCoapRequestPrimitiveBuilder setTo(String value) {

代码示例来源:origin: eclipse/californium

public CC02(String serverURI) {
  super(CC02.class.getSimpleName());
  // create the request
  Request request = Request.newDelete();
  // set the parameters and execute the request
  executeRequest(request, serverURI, RESOURCE_URI);
}

代码示例来源:origin: eclipse/californium

private Request newDelete() {
  return applyRequestType(Request.newDelete());
}

代码示例来源:origin: eclipse/californium

public CC06(String serverURI) {
  super(CC06.class.getSimpleName());
  // create the request
  Request request = Request.newDelete();
  request.setConfirmable(false);
  // set the parameters and execute the request
  executeRequest(request, serverURI, RESOURCE_URI);
}

代码示例来源:origin: org.eclipse.californium/californium-core

/**
 * Sends a DELETE request and waits for the response.
 *
 * @return the CoAP response
 */
public CoapResponse delete() {
  return synchronous(Request.newDelete().setURI(uri));
}

代码示例来源:origin: org.eclipse.leshan/leshan-server-cf

@Override
public void visit(DeleteRequest request) {
  coapRequest = Request.newDelete();
  setTarget(coapRequest, destination, request.getPath());
}

代码示例来源:origin: org.eclipse.leshan/leshan-client

@Override
public void visit(final DeregisterRequest request) {
  coapRequest = Request.newDelete();
  buildRequestSettings(request);
  buildLocationPath(request);
  parametersValid = true;
}

代码示例来源:origin: eclipse/leshan

@Override
public void visit(DeleteRequest request) {
  coapRequest = Request.newDelete();
  setTarget(coapRequest, request.getPath());
}

代码示例来源:origin: org.eclipse.californium/californium-core

/**
 * Sends a DELETE request and invokes the specified handler when a response
 * arrives.
 *
 * @param handler the response handler
 */
public void delete(CoapHandler handler) {
  asynchronous(Request.newDelete().setURI(uri), handler);
}

代码示例来源:origin: org.github.leshan/leshan-client

@Override
public void visit(final DeregisterRequest request) {
  coapRequest = Request.newDelete();
  buildRequestSettings(request);
  buildLocationPath(request);
  parametersValid = true;
}

代码示例来源:origin: eclipse/californium.tools

private static Request newRequest(String method) {
  if (method.equals("GET")) {
    return Request.newGet();
  } else if (method.equals("POST")) {
    return Request.newPost();
  } else if (method.equals("PUT")) {
    return Request.newPut();
  } else if (method.equals("DELETE")) {
    return Request.newDelete();
  } else if (method.equals("DISCOVER")) {
    return Request.newGet();
  } else if (method.equals("OBSERVE")) {
    Request request = Request.newGet();
    request.setObserve();
    loop = true;
    return request;
  } else {
    System.err.println("Unknown method: " + method);
    System.exit(ERR_UNKNOWN_METHOD);
    return null;
  }
}

代码示例来源:origin: eclipse/leshan

@Override
public void visit(DeregisterRequest request) {
  coapRequest = Request.newDelete();
  buildRequestSettings();
  coapRequest.getOptions().setUriPath(request.getRegistrationId());
}

代码示例来源:origin: eclipse/leshan

@Override
public void visit(BootstrapDeleteRequest request) {
  coapRequest = Request.newDelete();
  coapRequest.setConfirmable(true);
  EndpointContext context = EndpointContextUtil.extractContext(destination);
  coapRequest.setDestinationContext(context);
  setTarget(coapRequest, request.getPath());
}

代码示例来源:origin: org.opendaylight.iotdm/onem2m-protocol-coap

break;
case Onem2m.Operation.DELETE:
  request = Request.newDelete();
  break;
default:

代码示例来源:origin: org.eclipse.leshan/leshan-server-cf

Request deleteAll = Request.newDelete();
deleteAll.getOptions().addUriPath("/");
deleteAll.setConfirmable(true);

相关文章