public class RetryAfterException extends HandshakeException
DeploymentException
thrown from WebSocketContainer
.connectToServer(...) when HTTP response status code 503 - Service Unavailable
is
received.ClientManager.ReconnectHandler
,
ClientProperties.RETRY_AFTER_SERVICE_UNAVAILABLE
,
Serialized FormConstructor and Description |
---|
RetryAfterException(String message,
Long delay)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Long |
getDelay()
Get a delay specified in response header in seconds.
|
getHttpStatusCode
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public RetryAfterException(String message, Long delay)
message
- the detail message. The detail message is saved for later retrieval by the Throwable.getMessage()
method.delay
- a delay to the time received handshake response in header.public Long getDelay()
null
when response does not contain or
the value cannot be parsed as long ot http-date
.Copyright © 2012-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.