@Path(value="/metrics") @Singleton public class MetricsServlet extends EndpointServlet
objectMappers| Constructor and Description |
|---|
MetricsServlet(MetricDictionary metricDictionary,
LogicalTableDictionary logicalTableDictionary,
RequestMapper requestMapper,
ObjectMappersSuite objectMappers,
ResponseFormatResolver formatResolver)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
getAllLogicalMetrics(String perPage,
String page,
String format,
javax.ws.rs.core.UriInfo uriInfo,
javax.ws.rs.container.ContainerRequestContext containerRequestContext)
Get all the logical metrics as a summary list.
|
static Map<String,Object> |
getLogicalMetricFullView(LogicalMetric logicalMetric,
LogicalTableDictionary logicalTableDictionary,
javax.ws.rs.core.UriInfo uriInfo)
Get the full view of the logical metric.
|
static Set<Map<String,String>> |
getLogicalMetricListSummaryView(Collection<LogicalMetric> logicalMetrics,
javax.ws.rs.core.UriInfo uriInfo)
Get the summary list view of the logical metrics.
|
static Map<String,String> |
getLogicalMetricSummaryView(LogicalMetric logicalMetric,
javax.ws.rs.core.UriInfo uriInfo)
Get the summary view of the logical metric.
|
static String |
getLogicalMetricUrl(LogicalMetric logicalMetric,
javax.ws.rs.core.UriInfo uriInfo)
Get the URL of the logical metric.
|
javax.ws.rs.core.Response |
getMetric(String metricName,
javax.ws.rs.core.UriInfo uriInfo,
javax.ws.rs.container.ContainerRequestContext containerRequestContext)
Get the details of a specific logical metric.
|
formatResponse@Inject public MetricsServlet(MetricDictionary metricDictionary, LogicalTableDictionary logicalTableDictionary, @Named(value="metricsApiRequestMapper") RequestMapper requestMapper, ObjectMappersSuite objectMappers, ResponseFormatResolver formatResolver)
metricDictionary - Metrics to know aboutlogicalTableDictionary - Logical tables to know aboutrequestMapper - Mapper to change the API request if neededobjectMappers - JSON toolsformatResolver - The formatResolver for determining correct response format@GET
@Timed
public javax.ws.rs.core.Response getAllLogicalMetrics(@DefaultValue(value="") @NotNull @QueryParam(value="perPage")
String perPage,
@DefaultValue(value="") @NotNull @QueryParam(value="page")
String page,
@QueryParam(value="format")
String format,
@Context
javax.ws.rs.core.UriInfo uriInfo,
@Context
javax.ws.rs.container.ContainerRequestContext containerRequestContext)
perPage - number of values to return per pagepage - the page to start fromformat - The name of the output format typeuriInfo - UriInfo of the requestcontainerRequestContext - The context of data provided by the Jersey container for this request
{
"metrics": <List of Metric Summaries>
}
getLogicalMetricListSummaryView(Collection, UriInfo)@GET
@Timed
@Produces(value="application/json")
@Path(value="/{metricName}")
public javax.ws.rs.core.Response getMetric(@PathParam(value="metricName")
String metricName,
@Context
javax.ws.rs.core.UriInfo uriInfo,
@Context
javax.ws.rs.container.ContainerRequestContext containerRequestContext)
metricName - Logical metric nameuriInfo - UriInfo of the requestcontainerRequestContext - The context of data provided by the Jersey container for this requestgetLogicalMetricFullView(LogicalMetric, LogicalTableDictionary, UriInfo)public static Set<Map<String,String>> getLogicalMetricListSummaryView(Collection<LogicalMetric> logicalMetrics, javax.ws.rs.core.UriInfo uriInfo)
logicalMetrics - Collection of logical metrics to get the summary view foruriInfo - UriInfo of the requestpublic static Map<String,String> getLogicalMetricSummaryView(LogicalMetric logicalMetric, javax.ws.rs.core.UriInfo uriInfo)
logicalMetric - Logical metric to get the view ofuriInfo - UriInfo of the requestpublic static Map<String,Object> getLogicalMetricFullView(LogicalMetric logicalMetric, LogicalTableDictionary logicalTableDictionary, javax.ws.rs.core.UriInfo uriInfo)
logicalMetric - Logical metric to get the view oflogicalTableDictionary - Logical Table Dictionary to look up the logical tables this metric is onuriInfo - UriInfo of the requestpublic static String getLogicalMetricUrl(LogicalMetric logicalMetric, javax.ws.rs.core.UriInfo uriInfo)
logicalMetric - Logical metric to get the URL ofuriInfo - URI Info for the requestCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.