类 ErrorMessage
- java.lang.Object
- org.springframework.messaging.support.GenericMessage<Throwable>
- org.springframework.messaging.support.ErrorMessage
- 所有已实现的接口:
Serializable,Message<Throwable>
public class ErrorMessage extends GenericMessage<Throwable>
AGenericMessagewith aThrowablepayload.- 从以下版本开始:
- 4.0
- 作者:
- Mark Fisher, Oleg Zhurakousky
- 另请参阅:
MessageBuilder, 序列化表格
构造器概要
构造器 构造器 说明 ErrorMessage(Throwable payload)Create a new message with the given payload.ErrorMessage(Throwable payload, Map<String,Object> headers)Create a new message with the given payload and headers.ErrorMessage(Throwable payload, MessageHeaders headers)A constructor with theMessageHeadersinstance to use.
方法概要
从类继承的方法 org.springframework.messaging.support.GenericMessage
equals, getHeaders, getPayload, hashCode, toString
构造器详细资料
ErrorMessage
public ErrorMessage(Throwable payload)
Create a new message with the given payload.- 参数:
payload- the message payload (nevernull)
ErrorMessage
public ErrorMessage(Throwable payload, Map<String,Object> headers)
Create a new message with the given payload and headers. The content of the given header map is copied.- 参数:
payload- the message payload (nevernull)headers- message headers to use for initialization
ErrorMessage
public ErrorMessage(Throwable payload, MessageHeaders headers)
A constructor with theMessageHeadersinstance to use.Note: the given
MessageHeadersinstance is used directly in the new message, i.e. it is not copied.- 参数:
payload- the message payload (nevernull)headers- message headers