@GET()
@Produces(MediaType.APPLICATION_XML)
@MCRRestrictedAccess(MCRJobQueuePermission.class)
public Response listXML() {
try {
Queues queuesEntity = new Queues();
queuesEntity.addAll(
MCRJobQueue.INSTANCES.keySet().stream().map(Queue::new).collect(Collectors.toList()));
return Response.ok().status(Response.Status.OK).entity(toJSON(queuesEntity))
.build();
} catch (Exception e) {
final StreamingOutput so = (OutputStream os) -> e
.printStackTrace(new PrintStream(os, false, StandardCharsets.UTF_8.name()));
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(so).build();
}
}
MCRJobQueueResource.java 文件源码
java
阅读 33
收藏 0
点赞 0
评论 0
项目:mycore
作者:
评论列表
文章目录