@Response(code=451, description="Unavailable For Legal Reasons") public class UnavailableForLegalReasons extends HttpException
A server operator has received a legal demand to deny access to a resource or to a set of resources that includes the requested resource.
Modifier and Type | Field and Description |
---|---|
static int |
CODE
HTTP status code
|
static String |
MESSAGE
Default message
|
Constructor and Description |
---|
UnavailableForLegalReasons()
Constructor.
|
UnavailableForLegalReasons(String msg)
Constructor.
|
UnavailableForLegalReasons(String msg,
Object... args)
Constructor.
|
UnavailableForLegalReasons(Throwable cause)
Constructor.
|
UnavailableForLegalReasons(Throwable cause,
String msg,
Object... args)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
UnavailableForLegalReasons |
header(String name,
Object val)
Add an HTTP header to this exception.
|
getFullStackMessage, getHeaders, getRootCause, getStatus, hashCode, setStatus, toString
getCause, getMessage
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public static final int CODE
public static final String MESSAGE
public UnavailableForLegalReasons(Throwable cause, String msg, Object... args)
cause
- The cause. Can be msg
- The message. Can be args
- Optional MessageFormat
-style arguments in the message.public UnavailableForLegalReasons(String msg)
msg
- The message. Can be public UnavailableForLegalReasons()
public UnavailableForLegalReasons(String msg, Object... args)
msg
- The message. Can be args
- Optional MessageFormat
-style arguments in the message.public UnavailableForLegalReasons(Throwable cause)
cause
- The cause. Can be public UnavailableForLegalReasons header(String name, Object val)
HttpException
header
in class HttpException
name
- The header name.val
- The header value.Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.