本文整理了Java中org.eclipse.californium.core.coap.OptionSet.hasProxyUri()
方法的一些代码示例,展示了OptionSet.hasProxyUri()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OptionSet.hasProxyUri()
方法的具体详情如下:
包路径:org.eclipse.californium.core.coap.OptionSet
类名称: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;
内容来源于网络,如有侵权,请联系作者删除!