Package com.linecorp.armeria.server
Class ServerPort
java.lang.Object
com.linecorp.armeria.server.ServerPort
- All Implemented Interfaces:
Comparable<ServerPort>
A pair of server-side bind address and
SessionProtocol
.-
Constructor Summary
ConstructorDescriptionServerPort
(int port, SessionProtocol... protocols) Creates a newServerPort
that listens to the specifiedport
of all available network interfaces using the specifiedSessionProtocol
s.ServerPort
(int port, Iterable<SessionProtocol> protocols) Creates a newServerPort
that listens to the specifiedport
of all available network interfaces using the specifiedSessionProtocol
s.ServerPort
(InetSocketAddress localAddress, SessionProtocol... protocols) Creates a newServerPort
that listens to the specifiedlocalAddress
using the specifiedSessionProtocol
s.ServerPort
(InetSocketAddress localAddress, Iterable<SessionProtocol> protocols) Creates a newServerPort
that listens to the specifiedlocalAddress
using the specifiedSessionProtocol
s. -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
int
hashCode()
boolean
hasHttp()
Returns whetherSessionProtocol.HTTP
is in the list ofSessionProtocol
s.boolean
hasHttps()
Returns whetherSessionProtocol.HTTPS
is in the list ofSessionProtocol
s.boolean
hasProtocol
(SessionProtocol protocol) Returns whether the specifiedprotocol
is in the list ofSessionProtocol
s.boolean
Returns whether theSessionProtocol.PROXY
is in the list ofSessionProtocol
s.boolean
hasTls()
Returns whether there is aSessionProtocol
which is over TLS.boolean
Returns whether thisServerPort
listens to a Unix domain socket.Returns the local address thisServerPort
listens to.Returns theSessionProtocol
s thisServerPort
uses.toString()
-
Constructor Details
-
ServerPort
Creates a newServerPort
that listens to the specifiedport
of all available network interfaces using the specifiedSessionProtocol
s. -
ServerPort
Creates a newServerPort
that listens to the specifiedlocalAddress
using the specifiedSessionProtocol
s. -
ServerPort
Creates a newServerPort
that listens to the specifiedport
of all available network interfaces using the specifiedSessionProtocol
s. -
ServerPort
Creates a newServerPort
that listens to the specifiedlocalAddress
using the specifiedSessionProtocol
s.
-
-
Method Details
-
localAddress
Returns the local address thisServerPort
listens to. -
isDomainSocket
Returns whether thisServerPort
listens to a Unix domain socket. Iftrue
, the address returned bylocalAddress()
is aDomainSocketAddress
. -
protocols
Returns theSessionProtocol
s thisServerPort
uses. -
hasTls
public boolean hasTls()Returns whether there is aSessionProtocol
which is over TLS. -
hasHttp
public boolean hasHttp()Returns whetherSessionProtocol.HTTP
is in the list ofSessionProtocol
s. -
hasHttps
public boolean hasHttps()Returns whetherSessionProtocol.HTTPS
is in the list ofSessionProtocol
s. -
hasProxyProtocol
public boolean hasProxyProtocol()Returns whether theSessionProtocol.PROXY
is in the list ofSessionProtocol
s. -
hasProtocol
Returns whether the specifiedprotocol
is in the list ofSessionProtocol
s. -
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ServerPort>
-
toString
-