public abstract class UpgradeResponse extends Object implements javax.websocket.HandshakeResponse
WebSocketEngine.upgrade(org.glassfish.tyrus.spi.UpgradeRequest, org.glassfish.tyrus.spi.UpgradeResponse) method
to upgrade the request.| Modifier and Type | Field and Description |
|---|---|
static String |
LOCATION
Header containing a new URI when
getStatus() . |
static String |
WWW_AUTHENTICATE
Header containing challenge with authentication scheme and parameters.
|
| Constructor and Description |
|---|
UpgradeResponse() |
| Modifier and Type | Method and Description |
|---|---|
String |
getFirstHeaderValue(String name)
Gets the value of the response header with the given name.
|
abstract int |
getStatus()
Get the current HTTP status code of this response.
|
abstract void |
setReasonPhrase(String reason)
Get HTTP reason phrase.
|
abstract void |
setStatus(int status)
Set HTTP status code for this response.
|
public static final String WWW_AUTHENTICATE
public static final String LOCATION
getStatus() .public abstract int getStatus()
public abstract void setStatus(int status)
status - HTTP status code for this response.public abstract void setReasonPhrase(String reason)
public String getFirstHeaderValue(String name)
If a response header with the given name exists and contains multiple values, the value that was added first will be returned.
name - header name.Copyright © 2012-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.