public class ProtocolException
extends java.lang.Exception
Constructor and Description |
---|
ProtocolException(java.lang.String message)
Instantiates a new Object of type
ProtocolException . |
ProtocolException(java.lang.String message,
java.net.HttpURLConnection connection)
Instantiates a new Object of type
ProtocolException . |
Modifier and Type | Method and Description |
---|---|
java.net.HttpURLConnection |
getCausingConnection()
Returns the
HttpURLConnection instances, which caused the error. |
boolean |
shouldRetry()
Determines whether a retry attempt should be made after a
ProtocolException or not. |
public ProtocolException(java.lang.String message)
ProtocolException
.message
- Message to be thrown with the exception.public ProtocolException(java.lang.String message, java.net.HttpURLConnection connection)
ProtocolException
.message
- Message to be thrown with the exception.connection
- HttpURLConnection
, where the error occurred.public java.net.HttpURLConnection getCausingConnection()
HttpURLConnection
instances, which caused the error.HttpURLConnection
public boolean shouldRetry()
ProtocolException
or not.true
if there should be a retry attempt.