Class GXResponseException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.gcube.common.gxhttp.reference.GXResponseException
All Implemented Interfaces:
Serializable

public class GXResponseException extends IOException
Thrown when a request was handed to the server but no response status was received (e.g. the read timeout expired, or the connection was closed while waiting for the response): the server may have processed the request, so resending it may repeat its effect.

Any failure before this point (opening the connection, connecting, starting to write the body) is thrown as it is, and means the server did not process the request.

Note: unless a streaming mode is set, HttpURLConnection buffers the body and writes it while waiting for the response status, so a failure while writing the body is also reported with this exception. Note also that the JDK itself may resend a POST once on some connection failures (system property sun.net.http.retryPost, true by default).

Author:
Luca Frosini (ISTI-CNR)
See Also:
  • Constructor Details

    • GXResponseException

      public GXResponseException(String message, Throwable cause)
      Creates the exception.
      Parameters:
      message - the message
      cause - the failure that occurred while waiting for the response status