public interface ServletConnection
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getConnectionId()
Obtain a unique (within the lifetime of the JVM) identifier string for the network connection to the JVM that is
being used for the
ServletRequest from which this ServletConnection was obtained. |
java.lang.String |
getProtocol()
Obtain the name of the protocol as presented to the server after the removal, if present, of any TLS or similar
encryption.
|
java.lang.String |
getProtocolConnectionId()
Obtain the connection identifier for the network connection to the server that is being used for the
ServletRequest from which this ServletConnection was obtained as defined by the protocol in use. |
boolean |
isSecure()
Determine whether or not the incoming network connection to the server used encryption or not.
|
java.lang.String getConnectionId()
ServletRequest
from which this ServletConnection
was obtained.
There is no defined format for this string. The format is implementation dependent.
java.lang.String getProtocol()
If the protocol has an entry in the IANA registry for ALPN names then the identification sequence, in string form, must be returned. Registered identification sequences MUST only be used for the associated protocol. Return values for other protocols are implementation dependent. Unknown protocols should return the string "unknown".
java.lang.String getProtocolConnectionId()
ServletRequest
from which this ServletConnection
was obtained as defined by the protocol in use. Note
that some protocols do not define such an identifier.
Examples of protocol provided connection identifiers include:
boolean isSecure()
X-Forwarded-Proto
.true
if the incoming network connection used encryption, otherwise false