热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.restlet.data.Protocol.()方法的使用及代码示例

本文整理了Java中org.restlet.data.Protocol.<init>()方法的一些代码示例,展示了Protocol.<in

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

Protocol.介绍

[英]Constructor.
[中]建造师。

代码示例

代码示例来源:origin: org.restlet.osgi/org.restlet

/**
* Returns a protocol by its scheme. If the latter is unknown, instantiate a
* new protocol object.
*
* @param scheme
* the scheme of the desired protocol.
* @return a known protocol or a new instance.
*/
private Protocol getProtocol(String scheme) {
Protocol protocol = Protocol.valueOf(scheme);
if (protocol == null) {
protocol = new Protocol(scheme);
}
return protocol;
}

代码示例来源:origin: org.restlet/org.restlet

/**
* Returns a protocol by its scheme. If the latter is unknown, instantiate a
* new protocol object.
*
* @param scheme
* the scheme of the desired protocol.
* @return a known protocol or a new instance.
*/
private Protocol getProtocol(String scheme) {
Protocol protocol = Protocol.valueOf(scheme);
if (protocol == null) {
protocol = new Protocol(scheme);
}
return protocol;
}

代码示例来源:origin: DeviceConnect/DeviceConnect-Android

result = ZIP;
} else {
result = new Protocol(name);

代码示例来源:origin: org.restlet/org.restlet

result = WAR;
} else {
result = new Protocol(name);

代码示例来源:origin: org.restlet.osgi/org.restlet

result = ZIP;
} else {
result = new Protocol(name);

代码示例来源:origin: org.restlet.osgi/org.restlet

result.setProtocol(new Protocol(protocolToken, protocolToken, null,
-1, readToken()));
} else {
result.setProtocol(new Protocol("HTTP", "HTTP", null, -1,
protocolToken));

代码示例来源:origin: org.restlet.osgi/org.restlet

/**
* Creates the protocol associated to a URI scheme name. If an existing
* constant exists then it is returned, otherwise a new instance is created.
*
* @param name
* The scheme name.
* @param version
* The version number.
* @return The associated protocol.
*/
public static Protocol valueOf(String name, String version) {
Protocol result = valueOf(name);
if (!version.equals(result.getVersion())) {
result = new Protocol(result.getSchemeName(), result.getName(),
result.getTechnicalName(), result.getDescription(),
result.getDefaultPort(), result.isConfidential(), version);
}
return result;
}

代码示例来源:origin: DeviceConnect/DeviceConnect-Android

/**
* Creates the protocol associated to a URI scheme name. If an existing
* constant exists then it is returned, otherwise a new instance is created.
*
* @param name
* The scheme name.
* @param version
* The version number.
* @return The associated protocol.
*/
public static Protocol valueOf(String name, String version) {
Protocol result = valueOf(name);
if (!version.equals(result.getVersion())) {
result = new Protocol(result.getSchemeName(), result.getName(),
result.getTechnicalName(), result.getDescription(),
result.getDefaultPort(), result.isConfidential(), version);
}
return result;
}

推荐阅读
author-avatar
白日星445533
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有