Package org.eclipse.jetty.http
Class HostPortHttpField
- java.lang.Object
-
- org.eclipse.jetty.http.HttpField
-
- org.eclipse.jetty.http.HostPortHttpField
-
- Direct Known Subclasses:
AuthorityHttpField
public class HostPortHttpField extends HttpField
An HttpField holding a preparsed Host and port number- See Also:
HostPort
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.http.HttpField
HttpField.IntValueHttpField, HttpField.LongValueHttpField
-
-
Constructor Summary
Constructors Modifier Constructor Description HostPortHttpField(java.lang.String authority)
HostPortHttpField(java.lang.String host, int port)
protected
HostPortHttpField(HttpHeader header, java.lang.String name, java.lang.String authority)
HostPortHttpField(HostPort hostport)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getHost()
Get the host.HostPort
getHostPort()
int
getPort()
Get the port.int
getPort(int defaultPort)
Get the port.-
Methods inherited from class org.eclipse.jetty.http.HttpField
contains, equals, getHeader, getIntValue, getLongValue, getLowerCaseName, getName, getValue, getValues, hashCode, is, isSameName, toString
-
-
-
-
Constructor Detail
-
HostPortHttpField
public HostPortHttpField(java.lang.String authority)
-
HostPortHttpField
protected HostPortHttpField(HttpHeader header, java.lang.String name, java.lang.String authority)
-
HostPortHttpField
public HostPortHttpField(java.lang.String host, int port)
-
HostPortHttpField
public HostPortHttpField(HostPort hostport)
-
-
Method Detail
-
getHost
public java.lang.String getHost()
Get the host.- Returns:
- the host
-
getPort
public int getPort()
Get the port.- Returns:
- the port
-
getPort
public int getPort(int defaultPort)
Get the port.- Parameters:
defaultPort
- The default port to return if no port set- Returns:
- the port
-
getHostPort
public HostPort getHostPort()
-
-