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

public Class WWWAuthenticationProtocolHandler

extends AuthenticationProtocolHandler
Class Inheritance
Imports
java.net.URI, org.eclipse.jetty.http.HttpHeader, .HttpStatus

A protocol handler that handles the 401 response code in association with the WWW-Authenticate header.

See Also
ProxyAuthenticationProtocolHandler

Field Summary

Modifier and TypeField and Description
private static final String
public static final String
Inherited from org.eclipse.jetty.client.AuthenticationProtocolHandler:
DEFAULT_MAX_CONTENT_LENGTH

Constructor Summary

AccessConstructor and Description
public
public
WWWAuthenticationProtocolHandler(HttpClient client, int maxContentLength)

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 HttpHeader
protected String
protected URI
protected HttpHeader
public String
getName()

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

Get a unique name among protocol handlers.

Inherited from org.eclipse.jetty.client.AuthenticationProtocolHandler:
getHeaderInfogetHttpClientgetResponseListener

Field Detail

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

Constructor Detail

WWWAuthenticationProtocolHandlerback to summary
public WWWAuthenticationProtocolHandler(HttpClient client)
WWWAuthenticationProtocolHandlerback to summary
public WWWAuthenticationProtocolHandler(HttpClient client, int maxContentLength)

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
getAuthenticateHeaderback to summary
protected HttpHeader getAuthenticateHeader()

Implements abstract org.eclipse.jetty.client.AuthenticationProtocolHandler.getAuthenticateHeader.

Annotations
@Override
getAuthenticationAttributeback to summary
protected String getAuthenticationAttribute()

Implements abstract org.eclipse.jetty.client.AuthenticationProtocolHandler.getAuthenticationAttribute.

Annotations
@Override
getAuthenticationURIback to summary
protected URI getAuthenticationURI(Request request)

Implements abstract org.eclipse.jetty.client.AuthenticationProtocolHandler.getAuthenticationURI.

Annotations
@Override
getAuthorizationHeaderback to summary
protected HttpHeader getAuthorizationHeader()

Implements abstract org.eclipse.jetty.client.AuthenticationProtocolHandler.getAuthorizationHeader.

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