Top Description Fields Constructors Methods
org.eclipse.jetty.client

public Class UpgradeProtocolHandler

extends Object
implements ProtocolHandler
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.client.ProtocolHandler
Imports
java.util.List, org.eclipse.jetty.client.transport.HttpConversation, .HttpRequest, .HttpResponse, .ResponseListeners, org.eclipse.jetty.http.HttpField, .HttpHeader, .HttpStatus, org.eclipse.jetty.io.EndPoint, org.eclipse.jetty.util.Callback

A protocol handler that handles HTTP 101 responses.

Field Summary

Modifier and TypeField and Description
private final List<String>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
accept(Request
the request to accept
request
,
Response
the response to accept
response
)

Implements org.eclipse.jetty.client.ProtocolHandler.accept.

Inspects the given request and response to detect whether this protocol handler should handle them.

protected boolean
acceptHeaders(Request request, Response response)

private void
forwardFailureComplete(HttpRequest request, Throwable requestFailure, Response response, Throwable responseFailure)

public String
getName()

Implements org.eclipse.jetty.client.ProtocolHandler.getName.

Get a unique name among protocol handlers.

public Response.Listener
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

protocolsback to summary
private final List<String> protocols

Constructor Detail

UpgradeProtocolHandlerback to summary
public UpgradeProtocolHandler()

Method Detail

acceptback to summary
public boolean accept(Request request, Response response)

Implements org.eclipse.jetty.client.ProtocolHandler.accept.

Doc from org.eclipse.jetty.client.ProtocolHandler.accept.

Inspects the given request and response to detect whether this protocol handler should handle them.

For example, a redirect protocol handler can inspect the response code and return true if it is a redirect response code.

This method is being called just after the response line has been parsed, and before the response headers are available.

Parameters
request:Request

the request to accept

response:Response

the response to accept

Returns:boolean

true if this protocol handler can handle the given request and response

Annotations
@Override
acceptHeadersback to summary
protected boolean acceptHeaders(Request request, Response response)
forwardFailureCompleteback to summary
private void forwardFailureComplete(HttpRequest request, Throwable requestFailure, Response response, Throwable responseFailure)
getNameback to summary
public String getName()

Implements org.eclipse.jetty.client.ProtocolHandler.getName.

Doc from org.eclipse.jetty.client.ProtocolHandler.getName.

Get a unique name among protocol handlers.

Returns:String

a unique name among protocol handlers

Annotations
@Override
getResponseListenerback to summary
public Response.Listener getResponseListener()

Implements org.eclipse.jetty.client.ProtocolHandler.getResponseListener.

Returns:Response.Listener

Doc from org.eclipse.jetty.client.ProtocolHandler.getResponseListener.

a response listener that will handle the request and response on behalf of the application.

Annotations
@Override