Top Description Fields Constructors Methods
org.springframework.web.bind

public Class MissingRequestCookieException

extends MissingRequestValueException
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
org.springframework.core.MethodParameter

ServletRequestBindingException subclass that indicates that a request cookie expected in the method parameters of an @RequestMapping method is not present.
Author
Juergen Hoeller
Since
5.1
See Also
MissingRequestHeaderException

Field Summary

Modifier and TypeField and Description
private final String
private final MethodParameter

Constructor Summary

AccessConstructor and Description
public
MissingRequestCookieException(String
the name of the missing request cookie
cookieName
,
MethodParameter
the method parameter
parameter
)

Constructor for MissingRequestCookieException.

public
MissingRequestCookieException(String
the name of the missing request cookie
cookieName
,
MethodParameter
the method parameter
parameter
,
boolean
whether the value became null after conversion
missingAfterConversion
)

Constructor for use when a value was present but converted to null.

Method Summary

Modifier and TypeMethod and Description
public final String
getCookieName()

Return the expected name of the request cookie.

public String
getMessage()

Overrides java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

public final MethodParameter
getParameter()

Return the method parameter bound to the request cookie.

Inherited from org.springframework.web.bind.MissingRequestValueException:
isMissingAfterConversion

Field Detail

cookieNameback to summary
private final String cookieName
parameterback to summary
private final MethodParameter parameter

Constructor Detail

MissingRequestCookieExceptionback to summary
public MissingRequestCookieException(String cookieName, MethodParameter parameter)

Constructor for MissingRequestCookieException.

Parameters
cookieName:String

the name of the missing request cookie

parameter:MethodParameter

the method parameter

MissingRequestCookieExceptionback to summary
public MissingRequestCookieException(String cookieName, MethodParameter parameter, boolean missingAfterConversion)

Constructor for use when a value was present but converted to null.

Parameters
cookieName:String

the name of the missing request cookie

parameter:MethodParameter

the method parameter

missingAfterConversion:boolean

whether the value became null after conversion

Since
5.3.6

Method Detail

getCookieNameback to summary
public final String getCookieName()

Return the expected name of the request cookie.

getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Doc from java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

Returns:String

the detail message string of this Throwable instance (which may be null).

Annotations
@Override
getParameterback to summary
public final MethodParameter getParameter()

Return the method parameter bound to the request cookie.