@Override
@RequestMapping(value = ApiConfig.TAPESTRY_BASE + "/{tapestryId}/threads/{threadId}/results",
method = RequestMethod.GET, headers = ApiConfig.API_HEADERS, produces = {ApiConfig.API_PRODUCES})
@ResponseBody
public QueryResult getQueryResult(@PathVariable final String tapestryId, @PathVariable final String threadId,
@CookieValue(value = SessionManager.SESSION_COOKIE, required = false) final String sessionId,
final HttpServletResponse response) throws NoSuchSessionException, NoSuchThreadDefinitionException,
NoSuchTapestryDefinitionException, NoSuchQueryDefinitionException, NoSuchAggregationException,
LogicalIdAlreadyExistsException, InvalidQueryInputException, OperationException, ItemPropertyNotFound,
RelationPropertyNotFound, ThreadDeletedByDynAdapterUnload, NoSuchItemTypeException,
InvalidQueryParametersException, AccessExpiredException, JsonProcessingException, NoSuchProviderException {
if (rateLimiter.tryAcquire()) {
Session session = modelValidator.validateSessionAndAccess(sessionId, response, tapestryId, threadId);
if (LOG.isDebugEnabled()) {
LOG.debug("Query a thread with tapestryId: " + tapestryId + " and threadId: " + threadId
+ " with session ID " + sessionId);
}
synchronized (session) {
modelValidator.validateTapestryDefinition(tapestryId);
modelValidator.validateThreadDefinition(threadId);
return queryManager.getThread(session, threadId, false);
}
} else {
throw new ApiThrottlingException("Exceeded max number of requests per second");
}
}
LoomServiceImpl.java 文件源码
java
阅读 62
收藏 0
点赞 0
评论 0
项目:loom
作者:
评论列表
文章目录