Class CoreClientUpgradeRequest
java.lang.Object
org.eclipse.jetty.websocket.core.client.CoreClientUpgradeRequest
- All Implemented Interfaces:
EventListener
,HttpUpgrader.Factory
,Response.CompleteListener
,Response.ResponseListener
- Direct Known Subclasses:
JakartaClientUpgradeRequest
,JettyClientUpgradeRequest
public abstract class CoreClientUpgradeRequest
extends Object
implements Response.CompleteListener, HttpUpgrader.Factory
-
Constructor Summary
ConstructorDescriptionCoreClientUpgradeRequest
(WebSocketCoreClient webSocketClient, URI requestURI) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addExtensions
(String... configs) void
addExtensions
(ExtensionConfig... configs) void
addListener
(UpgradeListener listener) protected void
Allow for overridden customization of endpoint (such as special transport level properties: e.g.static CoreClientUpgradeRequest
from
(WebSocketCoreClient webSocketClient, URI requestURI, FrameHandler frameHandler) abstract FrameHandler
getURI()
protected void
handleException
(Throwable failure) void
headers
(Consumer<HttpFields.Mutable> consumer) void
listener
(Request.Listener listener) newHttpUpgrader
(HttpVersion version) void
onComplete
(Result result) Callback method invoked when the request and the response have been processed, either successfully or not.void
void
send
(Response.CompleteListener listener) void
void
setExtensions
(List<ExtensionConfig> configs) void
setSubProtocols
(String... protocols) void
setSubProtocols
(List<String> protocols) void
void
-
Constructor Details
-
CoreClientUpgradeRequest
-
-
Method Details
-
from
public static CoreClientUpgradeRequest from(WebSocketCoreClient webSocketClient, URI requestURI, FrameHandler frameHandler) -
getMethod
-
getURI
-
getVersion
-
listener
-
headers
-
getHeaders
-
getCookies
-
timeout
-
setConfiguration
-
addListener
-
addExtensions
-
addExtensions
-
getExtensions
-
setExtensions
-
getSubProtocols
-
setSubProtocols
-
setSubProtocols
-
send
-
sendAsync
-
onComplete
Description copied from interface:Response.CompleteListener
Callback method invoked when the request and the response have been processed, either successfully or not.The
result
parameter contains the request, the response, and eventual failures.Requests may complete after response, for example in case of big uploads that are discarded or read asynchronously by the server. This method is always invoked after
Response.SuccessListener.onSuccess(Response)
orResponse.FailureListener.onFailure(Response, Throwable)
, and only when request indicates that it is completed.- Specified by:
onComplete
in interfaceResponse.CompleteListener
- Parameters:
result
- the result of the request / response exchange
-
handleException
-
newHttpUpgrader
- Specified by:
newHttpUpgrader
in interfaceHttpUpgrader.Factory
-
customize
Allow for overridden customization of endpoint (such as special transport level properties: e.g. TCP keepAlive) -
getFrameHandler
-
requestComplete
public void requestComplete() -
upgrade
-