Class WebSocketUpgradeRequest
java.lang.Object
org.eclipse.jetty.client.HttpRequest
org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest
- All Implemented Interfaces:
EventListener,Request,Response.CompleteListener,Response.ResponseListener,HttpConnectionUpgrader
public class WebSocketUpgradeRequest
extends HttpRequest
implements Response.CompleteListener, HttpConnectionUpgrader
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.client.api.Request
Request.BeginListener, Request.CommitListener, Request.ContentListener, Request.FailureListener, Request.HeadersListener, Request.Listener, Request.QueuedListener, Request.RequestListener, Request.SuccessListener -
Constructor Summary
ConstructorsModifierConstructorDescriptionWebSocketUpgradeRequest(WebSocketClient wsClient, HttpClient httpClient, URI wsURI, Object localEndpoint) Initiating a WebSocket Upgrade using HTTP/1.1protectedWebSocketUpgradeRequest(WebSocketClient wsClient, HttpClient httpClient, ClientUpgradeRequest request) Exists for internal use of HttpClient by WebSocketClient. -
Method Summary
Modifier and TypeMethodDescriptionvoidonComplete(Result result) send()voidsend(Response.CompleteListener listener) CompletableFuture<org.eclipse.jetty.websocket.api.Session>voidsetUpgradeListener(UpgradeListener upgradeListener) voidupgrade(HttpResponse response, HttpConnectionOverHTTP oldConn) Methods inherited from class org.eclipse.jetty.client.HttpRequest
abort, accept, agent, attribute, content, content, cookie, file, file, followRedirects, getAbortCause, getAgent, getAttributes, getContent, getConversation, getCookies, getHeaders, getHost, getIdleTimeout, getMethod, getParams, getPath, getPort, getPushListener, getQuery, getRequestListeners, getResponseListeners, getScheme, getTag, getTimeout, getTrailers, getURI, getVersion, header, header, host, idleTimeout, isFollowRedirects, listener, method, method, onComplete, onRequestBegin, onRequestCommit, onRequestContent, onRequestFailure, onRequestHeaders, onRequestQueued, onRequestSuccess, onResponseBegin, onResponseContent, onResponseContentAsync, onResponseContentDemanded, onResponseFailure, onResponseHeader, onResponseHeaders, onResponseSuccess, param, path, port, pushListener, scheme, tag, timeout, toString, trailers, version
-
Constructor Details
-
WebSocketUpgradeRequest
protected WebSocketUpgradeRequest(WebSocketClient wsClient, HttpClient httpClient, ClientUpgradeRequest request) Exists for internal use of HttpClient by WebSocketClient.Maintained for Backward compatibility and also for JSR356 WebSocket ClientContainer use.
- Parameters:
wsClient- the WebSocketClient that this request useshttpClient- the HttpClient that this request usesrequest- the ClientUpgradeRequest (backward compat) to base this request from
-
WebSocketUpgradeRequest
public WebSocketUpgradeRequest(WebSocketClient wsClient, HttpClient httpClient, URI wsURI, Object localEndpoint) Initiating a WebSocket Upgrade using HTTP/1.1- Parameters:
wsClient- the WebSocketClient that this request useshttpClient- the HttpClient that this request useslocalEndpoint- the local endpoint (following Jetty WebSocket Client API rules) to use for incoming WebSocket eventswsURI- the WebSocket URI to connect to
-
-
Method Details
-
onComplete
- Specified by:
onCompletein interfaceResponse.CompleteListener
-
send
- Specified by:
sendin interfaceRequest- Overrides:
sendin classHttpRequest- Throws:
InterruptedExceptionTimeoutExceptionExecutionException
-
send
- Specified by:
sendin interfaceRequest- Overrides:
sendin classHttpRequest
-
sendAsync
-
upgrade
- Specified by:
upgradein interfaceHttpConnectionUpgrader
-
setUpgradeListener
-