Interface ServerUpgradeRequest
- All Superinterfaces:
Attributes
,Content.Source
,Request
Upgrade request used for websocket negotiation.
Provides getters for things like the requested extensions and subprotocols so that the headers don't have to be parsed manually.
This should only be used during the websocket negotiation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Attributes
Attributes.Layer, Attributes.Lazy, Attributes.Mapped, Attributes.Synthetic
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.Content.Source
Content.Source.Factory
Nested classes/interfaces inherited from interface org.eclipse.jetty.server.Request
Request.AttributesWrapper, Request.AuthenticationState, Request.Handler, Request.ServeAs, Request.Wrapper
-
Field Summary
Fields inherited from interface org.eclipse.jetty.util.Attributes
NULL
Fields inherited from interface org.eclipse.jetty.server.Request
COOKIE_ATTRIBUTE, DEFAULT_LOCALES, LOG
-
Method Summary
Methods inherited from interface org.eclipse.jetty.util.Attributes
asAttributeMap, clearAttributes, equals, getAttribute, getAttributeNameSet, hashCode, removeAttribute, setAttribute
Methods inherited from interface org.eclipse.jetty.io.Content.Source
fail, fail, getLength, rewind
Methods inherited from interface org.eclipse.jetty.server.Request
addFailureListener, addHttpStreamWrapper, addIdleTimeoutListener, consumeAvailable, demand, getBeginNanoTime, getComponents, getConnectionMetaData, getContext, getHeaders, getHeadersNanoTime, getHttpURI, getId, getMethod, getSession, getTrailers, getTunnelSupport, isSecure, push, read
-
Method Details
-
getWebSocketComponents
WebSocketComponents getWebSocketComponents()- Returns:
- The WebSocket components used for this upgrade request
-
getExtensions
List<ExtensionConfig> getExtensions()- Returns:
- The extensions offered
-
getProtocolVersion
String getProtocolVersion()- Returns:
- WebSocket protocol version from "Sec-WebSocket-Version" header
-
getSubProtocols
-
hasSubProtocol
- Parameters:
subprotocol
- A sub protocol name- Returns:
- True if the sub protocol was offered
-