use of javax.ws.rs.GET in project jersey by jersey.
the class MessageStreamResource method getMessageStream.
/**
* Get the new SSE message stream channel.
*
* @return new SSE message stream channel.
*/
@GET
@Produces(SseFeature.SERVER_SENT_EVENTS)
public EventOutput getMessageStream() {
LOGGER.info("--> SSE connection received.");
final EventOutput eventOutput = new EventOutput();
broadcaster.add(eventOutput);
return eventOutput;
}
use of javax.ws.rs.GET in project jersey by jersey.
the class TestExceptionResource method getUnmappedException.
@GET
@Path("unmapped")
public void getUnmappedException(@Suspended final AsyncResponse asyncResponse) {
lastProcessingThread = Thread.currentThread();
asyncResponse.resume(new UnmappedException());
}
use of javax.ws.rs.GET in project jersey by jersey.
the class TestExceptionResource method getUnmappedRuntimeException.
@GET
@Path("runtime")
public void getUnmappedRuntimeException(@Suspended final AsyncResponse asyncResponse) {
lastProcessingThread = Thread.currentThread();
asyncResponse.resume(new UnmappedRuntimeException());
}
use of javax.ws.rs.GET in project pinot by linkedin.
the class AnomaliesResource method getAnomaliesByDashboardId.
/**
* Find anomalies by dashboard id
* @param startTime
* @param endTime
* @param dashboardId
* @param functionName
* @return
* @throws Exception
*/
@GET
@Path("search/dashboardId/{startTime}/{endTime}/{pageNumber}")
public AnomaliesWrapper getAnomaliesByDashboardId(@PathParam("startTime") Long startTime, @PathParam("endTime") Long endTime, @PathParam("pageNumber") int pageNumber, @QueryParam("dashboardId") String dashboardId, @QueryParam("functionName") String functionName) throws Exception {
DashboardConfigDTO dashboardConfig = dashboardConfigDAO.findById(Long.valueOf(dashboardId));
String metricIdsString = Joiner.on(COMMA_SEPARATOR).join(dashboardConfig.getMetricIds());
return getAnomaliesByMetricIds(startTime, endTime, pageNumber, metricIdsString, functionName);
}
use of javax.ws.rs.GET in project pinot by linkedin.
the class AnomaliesResource method getAnomaliesByTime.
/**
* Search anomalies only by time
* @param startTime
* @param endTime
* @return
* @throws Exception
*/
@GET
@Path("search/time/{startTime}/{endTime}/{pageNumber}")
public AnomaliesWrapper getAnomaliesByTime(@PathParam("startTime") Long startTime, @PathParam("endTime") Long endTime, @PathParam("pageNumber") int pageNumber) throws Exception {
List<MergedAnomalyResultDTO> mergedAnomalies = mergedAnomalyResultDAO.findByTime(startTime, endTime);
try {
mergedAnomalies = AlertFilterHelper.applyFiltrationRule(mergedAnomalies, alertFilterFactory);
} catch (Exception e) {
LOG.warn("Failed to apply alert filters on anomalies in start:{}, end:{}, exception:{}", new DateTime(startTime), new DateTime(endTime), e);
}
AnomaliesWrapper anomaliesWrapper = constructAnomaliesWrapperFromMergedAnomalies(mergedAnomalies, pageNumber);
return anomaliesWrapper;
}
Aggregations