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

x33g5p2x  于2022-01-26 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(55)

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

OptionSet.hasProxyUri介绍

[英]Checks if the Proxy-Uri option is present.
[中]检查代理Uri选项是否存在。

代码示例

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

protected void responseProduced(Request request, Response response) {
    // check if the proxy-uri is defined
    if (request.getOptions().hasProxyUri()) {
        LOGGER.info("Cache response");
      // insert the response in the cache
      cacheResource.cacheResponse(request, response);
    } else {
        LOGGER.info("Do not cache response");
    }
  }    
}

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

protected void responseProduced(Request request, Response response) {
  // check if the proxy-uri is defined
  if (request.getOptions().hasProxyUri()) {
      LOGGER.info("Cache response");
    // insert the response in the cache
    cacheResource.cacheResponse(request, response);
  } else {
      LOGGER.info("Do not cache response");
  }
}

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

if (!incomingRequest.getOptions().hasProxyUri()) {
  LOGGER.warning("Proxy-uri option not set.");
  return new Response(ResponseCode.BAD_OPTION);

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

if (!incomingCoapRequest.getOptions().hasProxyUri()) {
  LOGGER.warning("Proxy-uri option not set.");
  return new Response(ResponseCode.BAD_OPTION);

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

if (!incomingCoapRequest.getOptions().hasProxyUri()) {
  LOGGER.warning("Proxy-uri option not set.");
  return new Response(ResponseCode.BAD_OPTION);

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

if (!incomingRequest.getOptions().hasProxyUri()) {
  LOGGER.warning("Proxy-uri option not set.");
  return new Response(ResponseCode.BAD_OPTION);

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

&& request.getOptions().hasProxyUri()) {
if (request.getOptions().hasProxyUri()) {
  try {
    manageProxyUriRequest(request);

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

if (location_query_list != null) for (String str:location_query_list)
  options.add(new Option(OptionNumberRegistry.LOCATION_QUERY, str));
if (hasProxyUri())
  options.add(new Option(OptionNumberRegistry.PROXY_URI, getProxyUri()));
if (hasProxyScheme())

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

if (location_query_list != null) for (String str:location_query_list)
  options.add(new Option(OptionNumberRegistry.LOCATION_QUERY, str));
if (hasProxyUri())
  options.add(new Option(OptionNumberRegistry.PROXY_URI, getProxyUri()));
if (hasProxyScheme())

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

&& request.getOptions().hasProxyUri()) {

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

final Resource resource;
if (request.getOptions().hasProxyUri()) {
  if (request.getOptions().getProxyUri().startsWith("http")) {
    resource = coap2http;

相关文章

微信公众号

最新文章

更多