Top Description Methods
io.vertx.core.net

public Interface HostAndPort

Known Direct Implementers
io.vertx.core.net.impl.HostAndPortImpl
Annotations
@VertxGen
Imports
io.vertx.codegen.annotations.VertxGen, io.vertx.core.http.impl.HttpUtils, io.vertx.core.net.impl.HostAndPortImpl

A combination of host and port.

Method Summary

Modifier and TypeMethod and Description
public static HostAndPort

Returns:

the instance
authority
(String
the host portion
host
,
int
the port
port
)

Create an instance with a valid host for a valid authority: the host must match the host rule of rfc3986.

public static HostAndPort
authority(String host)

Like authority(String, int) without a port, -1 is used instead.

public static HostAndPort

Returns:

the instance.
create
(String
the host value
host
,
int
the port value
port
)

Create an arbitrary instance.

public String

Returns:

the host value
host
()

public static HostAndPort

Returns:

the parsed authority or null when the string does not represent a valid authority.
parseAuthority
(String
the string to parse
string
,
int
the scheme port used when the optional port is not specified
schemePort
)

Parse an authority HTTP header, that is host [':' port], according to rfc3986.

public int

Returns:

the port value or -1 when not specified
port
()

Method Detail

authorityback to summary
public 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.

Parameters
host:String

the host portion

port:int

the port

Returns:HostAndPort

the instance

authorityback to summary
public static HostAndPort authority(String host)

Like authority(String, int) without a port, -1 is used instead.

createback to summary
public static HostAndPort create(String host, int port)

Create an arbitrary instance.

Parameters
host:String

the host value

port:int

the port value

Returns:HostAndPort

the instance.

hostback to summary
public String host()
Returns:String

the host value

parseAuthorityback to summary
public static HostAndPort parseAuthority(String string, int schemePort)

Parse an authority HTTP header, that is host [':' port], according to rfc3986.

Parameters
string:String

the string to parse

schemePort:int

the scheme port used when the optional port is not specified

Returns:HostAndPort

the parsed authority or null when the string does not represent a valid authority.

portback to summary
public int port()
Returns:int

the port value or -1 when not specified