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

public Class HttpUpgraderOverHTTP2

extends Object
implements HttpUpgrader
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.client.HttpUpgrader
Imports
org.eclipse.jetty.client.HttpUpgrader, .Request, .Response, org.eclipse.jetty.http.HttpHeader, .HttpMethod, .PreEncodedHttpField, org.eclipse.jetty.io.EndPoint, org.eclipse.jetty.util.Callback, org.eclipse.jetty.websocket.core.WebSocketConstants, org.eclipse.jetty.websocket.core.client.CoreClientUpgradeRequest

Field Summary

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

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
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

clientUpgradeRequestback to summary
private final CoreClientUpgradeRequest clientUpgradeRequest
WS_VERSION_FIELDback to summary
private static final PreEncodedHttpField WS_VERSION_FIELD

Constructor Detail

HttpUpgraderOverHTTP2back to summary
public HttpUpgraderOverHTTP2(CoreClientUpgradeRequest clientUpgradeRequest)

Method Detail

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