Class ProtocolException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ProtocolException
    extends java.lang.Exception
    This exception is thrown if the server sends a request with an unexpected status code or missing/invalid headers.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ProtocolException​(java.lang.String message)  
      ProtocolException​(java.lang.String message, java.net.HttpURLConnection connection)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.net.HttpURLConnection getCausingConnection()  
      boolean shouldRetry()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ProtocolException

        public ProtocolException​(java.lang.String message)
      • ProtocolException

        public ProtocolException​(java.lang.String message,
                                 java.net.HttpURLConnection connection)
    • Method Detail

      • getCausingConnection

        public java.net.HttpURLConnection getCausingConnection()
      • shouldRetry

        public boolean shouldRetry()