public abstract class UpgradeResponse extends Object implements 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 |
RETRY_AFTER
Header containing delay or date in which client can try to reconnect to the server.
|
static String |
TRACING_HEADER_PREFIX
Prefix of headers used for including tracing information into handshake response.
|
static String |
WWW_AUTHENTICATE
Header containing challenge with authentication scheme and parameters.
|
SEC_WEBSOCKET_ACCEPT| 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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHeaderspublic static final String WWW_AUTHENTICATE
public static final String LOCATION
getStatus() .public static final String RETRY_AFTER
public static final String TRACING_HEADER_PREFIX
public abstract int getStatus()
public abstract void setStatus(int status)
status - HTTP status code for this response.public abstract void setReasonPhrase(String reason)
TODO remove ?? we are using only for "Switching Protocols" and that is TODO standard status code 101
reason - reason phrase to be set.public final 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-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.