Top Description Fields Constructors Methods
java.net

public Class HttpRetryException

extends IOException
Class Inheritance
Imports
java.io.IOException

Thrown to indicate that a HTTP request needs to be retried but cannot be retried automatically, due to streaming mode being enabled.
Author
Michael McMahon
Since
1.5

Field Summary

Modifier and TypeField and Description
private String
location

The URL to be redirected to.

private final int
responseCode

The response code.

private static final long

Constructor Summary

AccessConstructor and Description
public
HttpRetryException(String
the detail message.
detail
,
int
the HTTP response code from server.
code
)

Constructs a new HttpRetryException from the specified response code and exception detail message

public
HttpRetryException(String
the detail message.
detail
,
int
the HTTP response code from server.
code
,
String
the URL to be redirected to
location
)

Constructs a new HttpRetryException with detail message responseCode and the contents of the Location response header field.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The location string
getLocation
()

Returns the value of the Location header field if the error resulted from redirection.

public String

Returns:

The reason string
getReason
()

Returns a string explaining why the http request could not be retried.

public int

Returns:

The http response code.
responseCode
()

Returns the http response code

Field Detail

locationback to summary
private String location

The URL to be redirected to.

responseCodeback to summary
private final int responseCode

The response code.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.io.IOException.serialVersionUID.

Annotations
@Serial

Constructor Detail

HttpRetryExceptionback to summary
public HttpRetryException(String detail, int code)

Constructs a new HttpRetryException from the specified response code and exception detail message

Parameters
detail:String

the detail message.

code:int

the HTTP response code from server.

HttpRetryExceptionback to summary
public HttpRetryException(String detail, int code, String location)

Constructs a new HttpRetryException with detail message responseCode and the contents of the Location response header field.

Parameters
detail:String

the detail message.

code:int

the HTTP response code from server.

location:String

the URL to be redirected to

Method Detail

getLocationback to summary
public String getLocation()

Returns the value of the Location header field if the error resulted from redirection.

Returns:String

The location string

getReasonback to summary
public String getReason()

Returns a string explaining why the http request could not be retried.

Returns:String

The reason string

responseCodeback to summary
public int responseCode()

Returns the http response code

Returns:int

The http response code.