Package com.linecorp.armeria.server
Class ClientAddressSource
java.lang.Object
com.linecorp.armeria.server.ClientAddressSource
public final class ClientAddressSource extends Object
A source which is used to get a client address. Currently there are two sources which are available
to provide a client address:
- an HTTP header, such as
Forwarded
andX-Forwarded-For
header - the source address specified in a PROXY protocol message
-
Method Summary
Modifier and Type Method Description boolean
equals(Object o)
int
hashCode()
static ClientAddressSource
ofHeader(CharSequence header)
Returns aClientAddressSource
which indicates the value of the specifiedheader
in a request will be used to determine a client address.static ClientAddressSource
ofProxyProtocol()
Returns theClientAddressSource
which indicates the source address specified in a PROXY protocol message will be used to determine a client address.String
toString()
-
Method Details
-
ofHeader
Returns aClientAddressSource
which indicates the value of the specifiedheader
in a request will be used to determine a client address. -
ofProxyProtocol
Returns theClientAddressSource
which indicates the source address specified in a PROXY protocol message will be used to determine a client address. -
equals
-
hashCode
public int hashCode() -
toString
-