com.alogic.blob.service.BlobSourceReport Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alogic-blob Show documentation
Show all versions of alogic-blob Show documentation
BLOB(binary large object),二进制大对象存储框架
package com.alogic.blob.service;
import java.util.HashMap;
import java.util.Map;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import com.alogic.blob.context.BlobManagerSource;
import com.logicbus.backend.AbstractServant;
import com.logicbus.backend.Context;
import com.logicbus.backend.message.JsonMessage;
import com.logicbus.backend.message.XMLMessage;
import com.logicbus.models.servant.ServiceDescription;
/**
* Blob配置来源报告
*
* @author duanyy
*
* @since 1.6.4.4
* @version 1.6.4.18 [duanyy 20151218]
* - 增加自动图标集
*/
public class BlobSourceReport extends AbstractServant {
@Override
protected void onDestroy() {
// Nothing to do
}
@Override
protected void onCreate(ServiceDescription sd) {
// Nothing to do
}
@Override
protected int onXml(Context ctx){
XMLMessage msg = (XMLMessage) ctx.asMessage(XMLMessage.class);
Document doc = msg.getDocument();
Element root = msg.getRoot();
Element eleSource = doc.createElement("source");
BlobManagerSource src = BlobManagerSource.get();
src.report(eleSource);
root.appendChild(eleSource);
return 0;
}
@Override
protected int onJson(Context ctx){
JsonMessage msg = (JsonMessage)ctx.asMessage(JsonMessage.class);
Map map = new HashMap(); // NOSONAR
BlobManagerSource src = BlobManagerSource.get();
src.report(map);
msg.getRoot().put("source", map);
return 0;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy