This commit is contained in:
Redkale
2020-05-30 10:23:36 +08:00
parent c108ab196c
commit bf700aa88f

View File

@@ -135,6 +135,11 @@ public class MessageRecord implements Serializable {
return this.resptopic == null || this.resptopic.isEmpty();
}
public <T> T convertFromContent(Convert convert, java.lang.reflect.Type type) {
if (this.content == null || this.content.length == 0) return null;
return (T) convert.convertFrom(type, this.content);
}
public MessageRecord version(int version) {
this.version = version;
return this;