本文整理了Java中org.restlet.data.Reference.setScheme
方法的一些代码示例,展示了Reference.setScheme
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Reference.setScheme
方法的具体详情如下:
包路径:org.restlet.data.Reference
类名称:Reference
方法名:setScheme
[英]Sets the scheme component.
[中]设置方案组件。
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
/**
* Sets the scheme component based on this protocol.
*
* @param protocol
* The protocol of the scheme component.
*/
public void setProtocol(Protocol protocol) {
setScheme(protocol.getSchemeName());
}
代码示例来源:origin: org.restlet/org.restlet
/**
* Sets the scheme component based on this protocol.
*
* @param protocol
* The protocol of the scheme component.
*/
public void setProtocol(Protocol protocol) {
setScheme(protocol.getSchemeName());
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Sets the scheme component based on this protocol.
*
* @param protocol
* The protocol of the scheme component.
*/
public void setProtocol(Protocol protocol) {
setScheme(protocol.getSchemeName());
}
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
setScheme(getScheme());
setHostDomain(getHostDomain());
代码示例来源:origin: org.restlet/org.restlet
setScheme(getScheme());
setHostDomain(getHostDomain());
代码示例来源:origin: org.restlet.osgi/org.restlet
setScheme(getScheme());
setHostDomain(getHostDomain());
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Returns the original reference especially by detecting potential proxy forwardings.
*
* @param resourceRef
* The request's resource reference.
* @param headers
* The set of request's headers.
* @return The original reference.
*/
public static Reference getOriginalRef(Reference resourceRef, Series<Header> headers) {
Reference originalRef = resourceRef.getTargetRef();
if (headers == null) {
return originalRef;
}
String value = headers.getFirstValue(HeaderConstants.HEADER_X_FORWARDED_PORT);
if (value != null) {
originalRef.setHostPort(Integer.parseInt(value));
}
value = headers.getFirstValue(HeaderConstants.HEADER_X_FORWARDED_PROTO);
if (value != null) {
originalRef.setScheme(value);
}
return originalRef;
}
代码示例来源:origin: org.restlet/org.restlet
result.setScheme(baseReference.getScheme());
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
result.setScheme(baseReference.getScheme());
代码示例来源:origin: org.restlet.osgi/org.restlet
result.setScheme(baseReference.getScheme());
内容来源于网络,如有侵权,请联系作者删除!