Package org.microproxy
Class ChainedProxyConnectException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
java.net.SocketException
java.net.ConnectException
org.microproxy.ChainedProxyConnectException
- All Implemented Interfaces:
Serializable
A chained HTTP proxy did not open the tunnel the proxy's
CONNECT asked it for: it
answered with a status other than 2xx (ChainedProxyConnectException.Outcome.REFUSED, with status()),
or ended the connection before it answered (ChainedProxyConnectException.Outcome.CLOSED, ChainedProxyConnectException.Outcome.RESET). It
is the ProxyFailure.ConnectFailed.cause() of such an attempt (the last one's, with
several routes), and what ChainedProxy.connectionFailed(java.lang.Throwable) gets; ProxyFailure.ConnectFailed.reason() and ProxyFailure.ConnectFailed.chainedProxyStatus()
read it.
Its message is the one such a failure always had: "chained proxy refused CONNECT: 407
Proxy Authentication Required", "chained proxy refused CONNECT: connection closed", or,
for a reset, the socket's own ("Connection reset"), whose exception is then the cause.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHow the chained proxy'sCONNECTfailed. -
Method Summary
Modifier and TypeMethodDescriptionstatic ChainedProxyConnectExceptionclosed(IOException cause) The chained proxy closed the connection before its answer to theCONNECTwas complete.outcome()Returns how theCONNECTfailed.static ChainedProxyConnectExceptionThe chained proxy answered theCONNECTwithstatus, not2xx.static ChainedProxyConnectExceptionreset(IOException cause) The connection to the chained proxy was reset (or failed otherwise) before its answer to theCONNECTwas complete.status()Returns the status the chained proxy answered theCONNECTwith, empty when it answered none.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
refused
The chained proxy answered theCONNECTwithstatus, not2xx.- Parameters:
status- the status codereasonPhrase- the status line's reason phrase, as the proxy sent it- Returns:
- the exception
-
closed
The chained proxy closed the connection before its answer to theCONNECTwas complete.- Parameters:
cause- what reading the answer failed with, or null when it just ended- Returns:
- the exception
-
reset
The connection to the chained proxy was reset (or failed otherwise) before its answer to theCONNECTwas complete.- Parameters:
cause- the socket's exception, whose message this one keeps- Returns:
- the exception
-
outcome
Returns how theCONNECTfailed.- Returns:
- how the
CONNECTfailed
-
status
Returns the status the chained proxy answered theCONNECTwith, empty when it answered none.- Returns:
- the status the chained proxy answered the
CONNECTwith, empty when it answered none
-