public class WebSocketUpgradeRequest extends HttpRequest implements Response.CompleteListener, HttpConnectionUpgrader
Request.BeginListener, Request.CommitListener, Request.ContentListener, Request.FailureListener, Request.HeadersListener, Request.Listener, Request.QueuedListener, Request.RequestListener, Request.SuccessListener| Modifier | Constructor and Description |
|---|---|
protected |
WebSocketUpgradeRequest(WebSocketClient wsClient,
HttpClient httpClient,
ClientUpgradeRequest request)
Exists for internal use of HttpClient by WebSocketClient.
|
|
WebSocketUpgradeRequest(WebSocketClient wsClient,
HttpClient httpClient,
URI wsURI,
Object localEndpoint)
Initiating a WebSocket Upgrade using HTTP/1.1
|
| Modifier and Type | Method and Description |
|---|---|
void |
onComplete(Result result) |
ContentResponse |
send() |
void |
send(Response.CompleteListener listener) |
CompletableFuture<Session> |
sendAsync() |
void |
setUpgradeListener(UpgradeListener upgradeListener) |
void |
upgrade(HttpResponse response,
HttpConnectionOverHTTP oldConn) |
abort, accept, agent, attribute, content, content, cookie, file, file, followRedirects, getAbortCause, getAgent, getAttributes, getContent, getConversation, getCookies, getHeaders, getHost, getIdleTimeout, getMethod, getParams, getPath, getPort, getQuery, getRequestListeners, getResponseListeners, getScheme, getTimeout, getURI, getVersion, header, header, idleTimeout, isFollowRedirects, listener, method, method, onComplete, onRequestBegin, onRequestCommit, onRequestContent, onRequestFailure, onRequestHeaders, onRequestQueued, onRequestSuccess, onResponseBegin, onResponseContent, onResponseContentAsync, onResponseFailure, onResponseHeader, onResponseHeaders, onResponseSuccess, param, path, scheme, timeout, toString, versionprotected WebSocketUpgradeRequest(WebSocketClient wsClient, HttpClient httpClient, ClientUpgradeRequest request)
Maintained for Backward compatibility and also for JSR356 WebSocket ClientContainer use.
httpClient - the HttpClient that this request usesrequest - the ClientUpgradeRequest (backward compat) to base this request frompublic WebSocketUpgradeRequest(WebSocketClient wsClient, HttpClient httpClient, URI wsURI, Object localEndpoint)
httpClient - 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 topublic void onComplete(Result result)
onComplete in interface Response.CompleteListenerpublic ContentResponse send() throws InterruptedException, TimeoutException, ExecutionException
send in interface Requestsend in class HttpRequestInterruptedExceptionTimeoutExceptionExecutionExceptionpublic void send(Response.CompleteListener listener)
send in interface Requestsend in class HttpRequestpublic CompletableFuture<Session> sendAsync()
public void upgrade(HttpResponse response, HttpConnectionOverHTTP oldConn)
upgrade in interface HttpConnectionUpgraderpublic void setUpgradeListener(UpgradeListener upgradeListener)
Copyright © 1995–2017 Webtide. All rights reserved.