public interface HostAndPort
Modifier and Type | Method and Description |
---|---|
static HostAndPort |
authority(String host)
Like
authority(String, int) without a port, -1 is used instead. |
static HostAndPort |
authority(String host,
int port)
Create an instance with a valid
host for a valid authority: the host must
match the host rule of rfc3986. |
static HostAndPort |
create(String host,
int port)
Create an arbitrary instance.
|
String |
host() |
static HostAndPort |
parseAuthority(String string,
int schemePort)
Parse an authority HTTP header, that is host [':' port], according to
rfc3986.
|
int |
port() |
static HostAndPort create(String host, int port)
host
- the host valueport
- the port valuestatic HostAndPort parseAuthority(String string, int schemePort)
string
- the string to parseschemePort
- the scheme port used when the optional port is not specifiednull
when the string
does not represent a valid authority.static HostAndPort authority(String host, int port)
host
for a valid authority: the host
must
match the host rule of rfc3986.host
- the host portionport
- the portstatic HostAndPort authority(String host)
authority(String, int)
without a port, -1
is used instead.String host()
int port()
-1
when not specifiedCopyright © 2024 Eclipse. All rights reserved.