com.devebot.opflow.OpflowMessage Maven / Gradle / Ivy
package com.devebot.opflow;
import java.util.Map;
/**
*
* @author drupalex
*/
public class OpflowMessage {
private final byte[] body;
private final Map info;
public final static OpflowMessage EMPTY = new OpflowMessage();
public final static OpflowMessage ERROR = new OpflowMessage(null, OpflowUtil.buildMap().put("status", "failed").toMap());
private OpflowMessage() {
body = null;
info = null;
}
public OpflowMessage(byte[] body, Map info) {
this.body = body;
this.info = info;
}
public byte[] getBody() {
return body;
}
public String getBodyAsString() {
if (body == null) return null;
return OpflowUtil.getString(body);
}
public Map getInfo() {
return info;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy