public class PayloadDefault<C,R> extends Object implements Payload<C,R>, Serializable
| Constructor and Description |
|---|
PayloadDefault(String plid,
String topic,
C content,
Acceptor<R> acceptor) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getAttachment(String key)
获取附件
|
C |
getContent()
内容
|
boolean |
getHandled()
获取处理标识
|
String |
getPlid()
唯一标识
|
String |
getTopic()
主题
|
boolean |
isRequest()
Deprecated.
1.1.0 (简化模式,不再支持流调用)
|
boolean |
isSubscribe()
Deprecated.
1.1.0 (简化模式,不再支持流调用)
|
boolean |
reply(R content)
答复
|
boolean |
requiredReply()
要求答复
|
<T> void |
setAttachment(String key,
T value)
设置附件
|
void |
setHandled()
设置处理标识
|
String |
toString() |
public <T> T getAttachment(String key)
getAttachment in interface Payload<C,R>key - 关键字public <T> void setAttachment(String key, T value)
setAttachment in interface Payload<C,R>key - 关键字value - 值public void setHandled()
PayloadsetHandled in interface Payload<C,R>public boolean getHandled()
PayloadgetHandled in interface Payload<C,R>public boolean requiredReply()
requiredReply in interface Payload<C,R>public boolean isRequest()
@Deprecated public boolean isSubscribe()
PayloadisSubscribe in interface Payload<C,R>public boolean reply(R content)
public C getContent()
getContent in interface Payload<C,R>Copyright © 2025. All rights reserved.