Top Fields Constructors Methods
org.eclipse.jetty.websocket.core.client.internal

public Class HttpUpgraderOverHTTP

extends Object
implements HttpUpgrader
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.client.HttpUpgrader
Imports
java.nio.charset.StandardCharsets, java.util.Base64, java.util.concurrent.ThreadLocalRandom, org.eclipse.jetty.client.HttpResponseException, .HttpUpgrader, .Request, .Response, org.eclipse.jetty.http.HttpFields, .HttpHeader, .HttpMethod, .HttpVersion, .PreEncodedHttpField, org.eclipse.jetty.io.EndPoint, org.eclipse.jetty.util.Callback, org.eclipse.jetty.websocket.core.WebSocketConstants, org.eclipse.jetty.websocket.core.client.CoreClientUpgradeRequest, org.eclipse.jetty.websocket.core.util.WebSocketUtils

Field Summary

Modifier and TypeField and Description
private static final PreEncodedHttpField
private final CoreClientUpgradeRequest
private static final PreEncodedHttpField
private static final PreEncodedHttpField
private static final PreEncodedHttpField
private static final PreEncodedHttpField

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private String
public void
prepare(Request
the request to prepare
request
)

Implements org.eclipse.jetty.client.HttpUpgrader.prepare.

Prepares the request for the upgrade, for example by setting the HTTP method or by setting HTTP headers required for the upgrade.

public void
upgrade(Response
the response with the information about the upgrade
response
,
EndPoint
the EndPoint to upgrade
endPoint
,
Callback
a callback to notify of the success or failure of the upgrade
callback
)

Implements org.eclipse.jetty.client.HttpUpgrader.upgrade.

Upgrades the given endPoint to a different protocol.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CACHE_CONTROL_NO_CACHE_FIELDback to summary
private static final PreEncodedHttpField CACHE_CONTROL_NO_CACHE_FIELD
clientUpgradeRequestback to summary
private final CoreClientUpgradeRequest clientUpgradeRequest
PRAGMA_NO_CACHE_FIELDback to summary
private static final PreEncodedHttpField PRAGMA_NO_CACHE_FIELD
WS_CONNECTION_FIELDback to summary
private static final PreEncodedHttpField WS_CONNECTION_FIELD
WS_UPGRADE_FIELDback to summary
private static final PreEncodedHttpField WS_UPGRADE_FIELD
WS_VERSION_FIELDback to summary
private static final PreEncodedHttpField WS_VERSION_FIELD

Constructor Detail

HttpUpgraderOverHTTPback to summary
public HttpUpgraderOverHTTP(CoreClientUpgradeRequest clientUpgradeRequest)

Method Detail

generateRandomKeyback to summary
private String generateRandomKey()
prepareback to summary
public void prepare(Request request)

Implements org.eclipse.jetty.client.HttpUpgrader.prepare.

Doc from org.eclipse.jetty.client.HttpUpgrader.prepare.

Prepares the request for the upgrade, for example by setting the HTTP method or by setting HTTP headers required for the upgrade.

Parameters
request:Request

the request to prepare

Annotations
@Override
upgradeback to summary
public void upgrade(Response response, EndPoint endPoint, Callback callback)

Implements org.eclipse.jetty.client.HttpUpgrader.upgrade.

Doc from org.eclipse.jetty.client.HttpUpgrader.upgrade.

Upgrades the given endPoint to a different protocol.

The success or failure of the upgrade should be communicated via the given callback.

An exception thrown by this method is equivalent to failing the callback.

Parameters
response:Response

the response with the information about the upgrade

endPoint:EndPoint

the EndPoint to upgrade

callback:Callback

a callback to notify of the success or failure of the upgrade

Annotations
@Override