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

public abstract Class AuthenticationProtocolHandler

extends Object
implements ProtocolHandler
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.client.ProtocolHandler
Known Direct Subclasses
org.eclipse.jetty.client.ProxyAuthenticationProtocolHandler, org.eclipse.jetty.client.WWWAuthenticationProtocolHandler
Imports
java.net.URI, java.util.ArrayList, .HashMap, .List, .Map, java.util.concurrent.TimeUnit, .TimeoutException, java.util.regex.Matcher, .Pattern, org.eclipse.jetty.client.Authentication.HeaderInfo, org.eclipse.jetty.client.internal.HttpContentResponse, org.eclipse.jetty.client.transport.HttpConversation, .HttpRequest, .ResponseListeners, org.eclipse.jetty.http.HttpField, .HttpHeader, .HttpMethod, .HttpStatus, .QuotedCSV, org.eclipse.jetty.util.NanoTime, org.slf4j.Logger, .LoggerFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class

Field Summary

Modifier and TypeField and Description
private static final Pattern
private final HttpClient
public static final int
private static final Logger
private final int

Constructor Summary

AccessConstructor and Description
protected
AuthenticationProtocolHandler(HttpClient client, int maxContentLength)

Method Summary

Modifier and TypeMethod and Description
protected abstract HttpHeader
protected abstract String
protected abstract URI
protected abstract HttpHeader
protected List<Authentication.HeaderInfo>
protected HttpClient
public Response.Listener
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CHALLENGE_PATTERNback to summary
private static final Pattern CHALLENGE_PATTERN
clientback to summary
private final HttpClient client
DEFAULT_MAX_CONTENT_LENGTHback to summary
public static final int DEFAULT_MAX_CONTENT_LENGTH
LOGback to summary
private static final Logger LOG
maxContentLengthback to summary
private final int maxContentLength

Constructor Detail

AuthenticationProtocolHandlerback to summary
protected AuthenticationProtocolHandler(HttpClient client, int maxContentLength)

Method Detail

getAuthenticateHeaderback to summary
protected abstract HttpHeader getAuthenticateHeader()
getAuthenticationAttributeback to summary
protected abstract String getAuthenticationAttribute()
getAuthenticationURIback to summary
protected abstract URI getAuthenticationURI(Request request)
getAuthorizationHeaderback to summary
protected abstract HttpHeader getAuthorizationHeader()
getHeaderInfoback to summary
protected List<Authentication.HeaderInfo> getHeaderInfo(String header) throws IllegalArgumentException
getHttpClientback to summary
protected HttpClient getHttpClient()
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
org.eclipse.jetty.client back to summary

private Class AuthenticationProtocolHandler.AfterAuthenticationListener

extends Object
implements Listener
Class Inheritance
  • java.lang.Object
  • org.eclipse.jetty.client.AuthenticationProtocolHandler.AfterAuthenticationListener
All Implemented Interfaces
org.eclipse.jetty.client.Response.Listener, org.eclipse.jetty.client.Response.CompleteListener, org.eclipse.jetty.client.Response.ResponseListener, java.util.EventListener, org.eclipse.jetty.client.Response.FailureListener, org.eclipse.jetty.client.Response.SuccessListener, org.eclipse.jetty.client.Response.ContentListener, org.eclipse.jetty.client.Response.AsyncContentListener, org.eclipse.jetty.client.Response.ContentSourceListener, org.eclipse.jetty.client.Response.HeadersListener, org.eclipse.jetty.client.Response.HeaderListener, org.eclipse.jetty.client.Response.BeginListener

Field Summary

Modifier and TypeField and Description
private final Authentication.Result

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
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 java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

authenticationResultback to summary
private final Authentication.Result authenticationResult

Constructor Detail

AfterAuthenticationListenerback to summary
private AfterAuthenticationListener(Authentication.Result authenticationResult)

Method Detail

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
org.eclipse.jetty.client back to summary

private Class AuthenticationProtocolHandler.AuthenticationListener

extends BufferingResponseListener
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private void
copyIfAbsent(HttpRequest oldRequest, Request newRequest, HttpHeader header)

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

private void
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
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.
private List<Authentication.HeaderInfo>
private URI
resolveURI(HttpRequest request, URI uri)

Inherited from org.eclipse.jetty.client.BufferingResponseListener:
getContentgetContentAsInputStreamgetContentAsStringgetContentAsStringgetContentAsStringgetEncodinggetMediaTypeonContentonHeaders

Constructor Detail

AuthenticationListenerback to summary
private AuthenticationListener()

Method Detail

copyIfAbsentback to summary
private void copyIfAbsent(HttpRequest oldRequest, Request newRequest, HttpHeader header)
forwardFailureCompleteback to summary
private void forwardFailureComplete(HttpRequest request, Throwable requestFailure, Response response, Throwable responseFailure)
forwardSuccessCompleteback to summary
private void forwardSuccessComplete(HttpRequest request, Response response)
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
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
parseAuthenticateHeaderback to summary
private List<Authentication.HeaderInfo> parseAuthenticateHeader(Response response, HttpHeader header)
resolveURIback to summary
private URI resolveURI(HttpRequest request, URI uri)