use of com.generallycloud.baseio.container.jms.cmd.CmdResponse in project baseio by generallycloud.
the class MessageSizeExecutable method exec.
@Override
public CmdResponse exec(CommandContext context, HashMap<String, String> params) {
CmdResponse response = new CmdResponse();
MessageBrowser browser = getMessageBrowser(context);
if (browser == null) {
response.setResponse("请先登录!");
return response;
}
try {
int size = browser.size();
response.setResponse(String.valueOf(size));
} catch (Exception e) {
response.setResponse(e.getMessage());
logger.debug(e);
}
return response;
}
Aggregations