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

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

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

Reference.getHostDomain介绍

[英]Returns the host domain name component for server based hierarchical identifiers. It can also be replaced by an IP address when no domain name was registered.
Note that no URI decoding is done by this method.
[中]返回基于服务器的分层标识符的主机域名组件。如果没有注册域名,也可以用IP地址替换。
请注意,此方法不会执行URI解码。

代码示例

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

/**
 * Returns the optionnally decoded host domain name component.
 * 
 * @param decode
 *            Indicates if the result should be decoded using the
 *            {@link #decode(String)} method.
 * @return The optionnally decoded host domain name component.
 * @see #getHostDomain()
 */
public String getHostDomain(boolean decode) {
  return decode ? decode(getHostDomain()) : getHostDomain();
}

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

/**
 * Returns the optionnally decoded host domain name component.
 * 
 * @param decode
 *            Indicates if the result should be decoded using the
 *            {@link #decode(String)} method.
 * @return The optionnally decoded host domain name component.
 * @see #getHostDomain()
 */
public String getHostDomain(boolean decode) {
  return decode ? decode(getHostDomain()) : getHostDomain();
}

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

/**
 * Returns the optionnally decoded host domain name component.
 * 
 * @param decode
 *            Indicates if the result should be decoded using the {@link #decode(String)} method.
 * @return The optionnally decoded host domain name component.
 * @see #getHostDomain()
 */
public String getHostDomain(boolean decode) {
  return decode ? decode(getHostDomain()) : getHostDomain();
}

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

@Override
public String getCountedValue(Request request) {
  return request.getResourceRef().getHostDomain();
}

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

@Override
public String getCountedValue(Request request) {
  return request.getResourceRef().getHostDomain();
}

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

@Override
public String getCountedValue(Request request) {
  return request.getResourceRef().getHostDomain();
}

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

@Override
public String getCountedValue(Request request) {
  return request.getResourceRef().getHostDomain();
}

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

@Override
public String getCountedValue(Request request) {
  return request.getResourceRef().getHostDomain();
}

代码示例来源:origin: org.sonatype.nexus/nexus-rest-api

/**
   * Provides the OpenSearch description document for this Nexus instance. For the emitted XML, see <a
   * href="http://www.opensearch.org/Specifications/OpenSearch/1.1#OpenSearch_description_document">OpenSearch
   * Description Document</a>.
   */
  @Override
  @GET
  @ResourceMethodSignature( output = String.class )
  public Representation get( Context context, Request request, Response response, Variant variant )
    throws ResourceException
  {
    Map<String, Object> map = new HashMap<String, Object>();

    Reference nexusRef = getContextRoot( request );
    String nexusRoot = nexusRef.toString();
    if ( nexusRoot.endsWith( "/" ) )
    {
      nexusRoot = nexusRoot.substring( 0, nexusRoot.length() - 1 );
    }

    map.put( "nexusRoot", nexusRoot );
    map.put( "nexusHost", nexusRef.getHostDomain() );

    VelocityRepresentation templateRepresentation =
      new VelocityRepresentation( context, "/templates/opensearch.vm", map, MediaType.TEXT_XML );

    return templateRepresentation;
  }
}

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

final String hostDomain = this.baseRef.getHostDomain();
final String hostPort = Integer.toString(this.baseRef.getHostPort());
final String hostScheme = this.baseRef.getScheme();

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

Endpoint endpoint = new Endpoint(baseRef.getHostDomain(),
    baseRef.getHostPort(), baseRef.getSchemeProtocol()
        .getSchemeName(), baseRef.getPath(), scheme);

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

Endpoint endpoint = new Endpoint(baseRef.getHostDomain(),
    baseRef.getHostPort(), baseRef.getSchemeProtocol()
        .getSchemeName(), baseRef.getPath(), scheme);

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

Endpoint endpoint = new Endpoint(baseRef.getHostDomain(),
    baseRef.getHostPort(), baseRef.getSchemeProtocol()
        .getSchemeName(), baseRef.getPath(), scheme);

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

Endpoint endpoint = new Endpoint(baseRef.getHostDomain(),
    baseRef.getHostPort(), baseRef.getSchemeProtocol()
        .getSchemeName(), baseRef.getPath(), scheme);

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

Endpoint endpoint = new Endpoint(baseRef.getHostDomain(),
    baseRef.getHostPort(), baseRef.getSchemeProtocol()
        .getSchemeName(), baseRef.getPath(), scheme);

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

/**
 * @param ref
 * @param b
 * @return
 * @throws IllegalArgumentException
 */
private UriBuilder fillUriBuilder(Reference ref, final UriBuilder b)
    throws IllegalArgumentException {
  b.scheme(ref.getScheme(false));
  b.userInfo(ref.getUserInfo(false));
  b.host(ref.getHostDomain(false));
  b.port(ref.getHostPort());
  b.path(ref.getPath(false));
  b.replaceQuery(ref.getQuery(false));
  b.fragment(ref.getFragment(false));
  return b;
}

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

result = new Endpoint(ref.getHostDomain(),
    ref.getHostPort(), ref.getSchemeProtocol()
        .getSchemeName(), ref.getPath(),

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

result = new Endpoint(ref.getHostDomain(),
    ref.getHostPort(), ref.getSchemeProtocol()
        .getSchemeName(), ref.getPath(),

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

result = new Endpoint(ref.getHostDomain(),
    ref.getHostPort(), ref.getSchemeProtocol()
        .getSchemeName(), ref.getPath(),

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

result = new Endpoint(ref.getHostDomain(),
    ref.getHostPort(), ref.getSchemeProtocol()
        .getSchemeName(), ref.getPath(),

相关文章

Reference类方法