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

public Class ContinueProtocolHandler

extends Object
implements ProtocolHandler
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.client.ProtocolHandler
Imports
org.eclipse.jetty.client.internal.HttpContentResponse, org.eclipse.jetty.client.transport.HttpConversation, .HttpExchange, .HttpRequest, .ResponseListeners, org.eclipse.jetty.http.HttpHeader, .HttpHeaderValue, .HttpStatus

A protocol handler that handles the 100 response code.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class

Field Summary

Modifier and TypeField and Description
private static final String
public static final 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.

public String
getName()

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

Get a unique name among protocol handlers.
public Response.Listener
protected void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ATTRIBUTEback to summary
private static final String ATTRIBUTE
NAMEback to summary
public static final String NAME

Constructor Detail

ContinueProtocolHandlerback to summary
public ContinueProtocolHandler()

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
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
onContinueback to summary
protected void onContinue(Request request)
org.eclipse.jetty.client back to summary

protected Class ContinueProtocolHandler.ContinueListener

extends BufferingResponseListener
Class Inheritance

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public void
onComplete(Result
the result of the request / response exchange
result
)

Overrides default org.eclipse.jetty.client.Response.Listener.onComplete.

Implements abstract org.eclipse.jetty.client.BufferingResponseListener.onComplete.

Callback method invoked when the request and the response have been processed, either successfully or not.
public void
onFailure(Response
the response containing data up to the point the failure happened
response
,
Throwable
the failure happened
failure
)

Overrides default org.eclipse.jetty.client.Response.Listener.onFailure.

Callback method invoked when the response has failed in the process of being received
public void
onSuccess(Response
the response containing the response line data and the headers
response
)

Overrides default org.eclipse.jetty.client.Response.Listener.onSuccess.

Callback method invoked when the whole response has been successfully received.
Inherited from org.eclipse.jetty.client.BufferingResponseListener:
getContentgetContentAsInputStreamgetContentAsStringgetContentAsStringgetContentAsStringgetEncodinggetMediaTypeonContentonHeaders

Constructor Detail

ContinueListenerback to summary
protected ContinueListener()

Method Detail

onCompleteback to summary
public void onComplete(Result result)

Overrides default org.eclipse.jetty.client.Response.Listener.onComplete.

Implements abstract org.eclipse.jetty.client.BufferingResponseListener.onComplete.

Doc from org.eclipse.jetty.client.Response.CompleteListener.onComplete.

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 SuccessListener#onSuccess(Response) or FailureListener#onFailure(Response, Throwable), and only when request indicates that it is completed.

Parameters
result:Result

the result of the request / response exchange

Annotations
@Override
onFailureback to summary
public void onFailure(Response response, Throwable failure)

Overrides default org.eclipse.jetty.client.Response.Listener.onFailure.

Doc from org.eclipse.jetty.client.Response.FailureListener.onFailure.

Callback method invoked when the response has failed in the process of being received

Parameters
response:Response

the response containing data up to the point the failure happened

failure:Throwable

the failure happened

Annotations
@Override
onSuccessback to summary
public void onSuccess(Response response)

Overrides default org.eclipse.jetty.client.Response.Listener.onSuccess.

Doc from org.eclipse.jetty.client.Response.SuccessListener.onSuccess.

Callback method invoked when the whole response has been successfully received.

Parameters
response:Response

the response containing the response line data and the headers

Annotations
@Override