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_AUTHENTICATEFields inherited from interface jakarta.websocket.HandshakeResponse
SEC_WEBSOCKET_ACCEPT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet HTTP headers.Get HTTP reason phrase.intGet HTTP status.voidsetReasonPhrase(String reasonPhrase) Set HTTP reason phrase.voidsetStatus(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:
getStatusin classUpgradeResponse- Returns:
- HTTP status.
-
getReasonPhrase
Get HTTP reason phrase.Warning: The Reason Phrase is removed from HTTP/2 and from Servlet 6.
- Specified by:
getReasonPhrasein classUpgradeResponse- Returns:
- reason phrase.
-
getHeaders
Get HTTP headers.- Returns:
- HTTP headers.
-
setStatus
public void setStatus(int statusCode) Set HTTP status.- Specified by:
setStatusin classUpgradeResponse- Parameters:
statusCode- status code to be set.
-
setReasonPhrase
Set HTTP reason phrase.- Specified by:
setReasonPhrasein classUpgradeResponse- Parameters:
reasonPhrase- reason phrase to be set.
-