Package org.glassfish.tyrus.client
Class RedirectException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.glassfish.tyrus.core.HandshakeException
-
- org.glassfish.tyrus.client.RedirectException
-
- All Implemented Interfaces:
java.io.Serializable
public class RedirectException extends HandshakeException
This exception is set as a cause ofDeploymentException
thrown fromWebSocketContainer
.connectToServer(...) when any of the Redirect HTTP response status codes (300, 301, 302, 303, 307, 308) is received as a handshake response and:-
ClientProperties.REDIRECT_ENABLED
is not enabled -
or the chained redirection count exceeds the value of
ClientProperties.REDIRECT_THRESHOLD
- or Infinite redirection loop is detected
-
or "Location" response header is missing, empty or does not contain a valid
URI
.
- Author:
- Ondrej Kosatka (ondrej.kosatka at oracle.com)
- See Also:
ClientProperties.REDIRECT_ENABLED
,ClientProperties.REDIRECT_THRESHOLD
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RedirectException(int httpStatusCode, java.lang.String message)
Constructor.
-
Method Summary
-
Methods inherited from class org.glassfish.tyrus.core.HandshakeException
getHttpStatusCode
-
-
-
-
Constructor Detail
-
RedirectException
public RedirectException(int httpStatusCode, java.lang.String message)
Constructor.- Parameters:
httpStatusCode
- http status code to be set to response.message
- the detail message. The detail message is saved for later retrieval by theThrowable.getMessage()
method.
-
-