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.| 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()
Gets the current HTTP status code of this response.
|
abstract void |
setHeader(String name,
String value)
Sets a response header with the given name and value.
|
abstract void |
setReasonPhrase(String reason)
Get HTTP reason phrase.
|
abstract void |
setStatus(int status)
Sets HTTP status code for this response.
|
public abstract int getStatus()
public abstract void setStatus(int status)
status - HTTP status code for this response.public abstract void setReasonPhrase(String reason)
public abstract void setHeader(String name, String value)
name - the name of the header.value - the header value If it contains octet string,
it should be encoded according to RFC 2047
(http://www.ietf.org/rfc/rfc2047.txt).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.