/** * @param host * The host to set. * @param port * the port to set */ public void setAuthority(String host,int port) { _metadata.getURI().setAuthority(host,port); }
/** * @param host * The host to set. * @param port * the port to set */ public void setAuthority(String host,int port) { MetaData.Request metadata = _metaData; if (metadata!=null) metadata.getURI().setAuthority(host,port); }
metadata.getURI().setAuthority(authority.getHost(),authority.getPort()); return authority.getHost();
private String findServerName() { // Return host from header field HttpField host = _metadata.getFields().getField(HttpHeader.HOST); if (host!=null) { // TODO is this needed now? HostPortHttpField authority = (host instanceof HostPortHttpField) ?((HostPortHttpField)host) :new HostPortHttpField(host.getValue()); _metadata.getURI().setAuthority(authority.getHost(),authority.getPort()); return authority.getHost(); } // Return host from connection String name=getLocalName(); if (name != null) return name; // Return the local host try { return InetAddress.getLocalHost().getHostAddress(); } catch (java.net.UnknownHostException e) { LOG.ignore(e); } return null; }
private int findServerPort() { // Return host from header field HttpField host = _metadata.getFields().getField(HttpHeader.HOST); if (host!=null) { // TODO is this needed now? HostPortHttpField authority = (host instanceof HostPortHttpField) ?((HostPortHttpField)host) :new HostPortHttpField(host.getValue()); _metadata.getURI().setAuthority(authority.getHost(),authority.getPort()); return authority.getPort(); } // Return host from connection if (_channel != null) return getLocalPort(); return -1; }
private int findServerPort() { MetaData.Request metadata = _metaData; // Return host from header field HttpField host = metadata==null?null:metadata.getFields().getField(HttpHeader.HOST); if (host!=null) { // TODO is this needed now? HostPortHttpField authority = (host instanceof HostPortHttpField) ?((HostPortHttpField)host) :new HostPortHttpField(host.getValue()); metadata.getURI().setAuthority(authority.getHost(),authority.getPort()); return authority.getPort(); } // Return host from connection if (_channel != null) return getLocalPort(); return -1; }
_metadata.getURI().setAuthority(hp.getHost(), hp.getPort());
_metadata.getURI().setAuthority(hp.getHost(),hp.getPort());