public final class ServerPort extends Object implements Comparable<ServerPort>
SessionProtocol.| Constructor and Description |
|---|
ServerPort(InetSocketAddress localAddress,
Iterable<SessionProtocol> protocols)
Creates a new
ServerPort that listens to the specified localAddress using the specified
SessionProtocols. |
ServerPort(InetSocketAddress localAddress,
SessionProtocol... protocols)
Creates a new
ServerPort that listens to the specified localAddress using the specified
SessionProtocols. |
ServerPort(int port,
Iterable<SessionProtocol> protocols)
Creates a new
ServerPort that listens to the specified port of all available network
interfaces using the specified SessionProtocols. |
ServerPort(int port,
SessionProtocol... protocols)
Creates a new
ServerPort that listens to the specified port of all available network
interfaces using the specified SessionProtocols. |
public ServerPort(int port,
SessionProtocol... protocols)
ServerPort that listens to the specified port of all available network
interfaces using the specified SessionProtocols.public ServerPort(InetSocketAddress localAddress, SessionProtocol... protocols)
ServerPort that listens to the specified localAddress using the specified
SessionProtocols.public ServerPort(int port,
Iterable<SessionProtocol> protocols)
ServerPort that listens to the specified port of all available network
interfaces using the specified SessionProtocols.public ServerPort(InetSocketAddress localAddress, Iterable<SessionProtocol> protocols)
ServerPort that listens to the specified localAddress using the specified
SessionProtocols.public InetSocketAddress localAddress()
ServerPort listens to.@Deprecated public SessionProtocol protocol()
protocols().SessionProtocol this ServerPort uses.public Set<SessionProtocol> protocols()
SessionProtocols this ServerPort uses.public boolean hasTls()
SessionProtocol which is over TLS.public boolean hasHttp()
SessionProtocol.HTTP, SessionProtocol.H1C or
SessionProtocol.H2C is in the list of SessionProtocols.public boolean hasHttps()
SessionProtocol.HTTPS, SessionProtocol.H1 or
SessionProtocol.H2 is in the list of SessionProtocols.public boolean hasProxyProtocol()
SessionProtocol.PROXY is in the list of SessionProtocols.public boolean hasProtocol(SessionProtocol protocol)
protocol is in the list of SessionProtocols.public int compareTo(ServerPort o)
compareTo in interface Comparable<ServerPort>Copyright © 2020 LeanCloud. All rights reserved.