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

x33g5p2x  于2022-01-28 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(137)

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

Reference.setHostPort介绍

[英]Sets the optional port number for server based hierarchical identifiers.
[中]为基于服务器的分层标识符设置可选端口号。

代码示例

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

.getDefaultPort();
if (hostPort == defaultPort) {
  setHostPort(null);

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

.getDefaultPort();
if (hostPort == defaultPort) {
  setHostPort(null);

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

.getDefaultPort();
if (hostPort == defaultPort) {
  setHostPort(null);

代码示例来源: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.osgi/org.restlet.ext.platform

ref.setHostPort(Integer.parseInt(virtualHost
      .getHostPort()));
} catch (Exception e) {

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

ref.setHostPort(Integer.parseInt(virtualHost
      .getHostPort()));
} catch (Exception e) {

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

ref.setHostPort(Integer.parseInt(virtualHost
      .getHostPort()));
} catch (Exception e) {

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

ref.setHostPort(Integer.parseInt(virtualHost
      .getHostPort()));
} catch (Exception e) {

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

ref.setHostPort(Integer.parseInt(virtualHost
      .getHostPort()));
} catch (Exception e) {

相关文章

Reference类方法