Package org.glassfish.tyrus.core
Class TyrusUpgradeResponse
java.lang.Object
org.glassfish.tyrus.spi.UpgradeResponse
org.glassfish.tyrus.core.TyrusUpgradeResponse
- All Implemented Interfaces:
HandshakeResponse
HTTP response representation.
- Author:
- Pavel Bucek
-
Field Summary
Fields inherited from class org.glassfish.tyrus.spi.UpgradeResponse
LOCATION, RETRY_AFTER, TRACING_HEADER_PREFIX, WWW_AUTHENTICATE
Fields inherited from interface jakarta.websocket.HandshakeResponse
SEC_WEBSOCKET_ACCEPT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet HTTP headers.Get HTTP reason phrase.int
Get HTTP status.void
setReasonPhrase
(String reasonPhrase) Set HTTP reason phrase.void
setStatus
(int statusCode) Set HTTP status.Methods inherited from class org.glassfish.tyrus.spi.UpgradeResponse
getFirstHeaderValue
-
Constructor Details
-
TyrusUpgradeResponse
public TyrusUpgradeResponse()
-
-
Method Details
-
getStatus
public int getStatus()Get HTTP status.- Specified by:
getStatus
in classUpgradeResponse
- Returns:
- HTTP status.
-
getReasonPhrase
Get HTTP reason phrase.Warning: The Reason Phrase is removed from HTTP/2 and from Servlet 6.
- Specified by:
getReasonPhrase
in classUpgradeResponse
- Returns:
- reason phrase.
-
getHeaders
Get HTTP headers.- Returns:
- HTTP headers.
-
setStatus
public void setStatus(int statusCode) Set HTTP status.- Specified by:
setStatus
in classUpgradeResponse
- Parameters:
statusCode
- status code to be set.
-
setReasonPhrase
Set HTTP reason phrase.- Specified by:
setReasonPhrase
in classUpgradeResponse
- Parameters:
reasonPhrase
- reason phrase to be set.
-