public class URLQueryModel extends Object
ICounterSelector
.Modifier and Type | Field and Description |
---|---|
String[] |
category
The ordered labels to be assigned to the category columns in a
ReportEnum.pivot report (optional). |
static String |
CATEGORY
The ordered labels to be assigned to the category columns in a
ReportEnum.pivot report. |
static String |
CORRELATED
Name of the URL query parameter specifying whether the optional
correlated view for counter histories will be displayed.
|
Format |
dateFormat
Used to format the timestamp fields (From:, To:, and the last column) and
the epoch for
flot . |
DecimalFormat |
decimalFormat
Used to format double and float counter values.
|
static String |
DEFAULT_DEPTH |
int |
depth
The value of the
DEPTH query parameter. |
static String |
DEPTH
Depth to be displayed from the given path -or- ZERO (0) to display
all levels.
|
HashMap<Field,Pattern> |
eventFilters
A collection of event filters.
|
Field[] |
eventOrderBy
The order in which the events will be grouped.
|
IEventReportingService |
eventReportingService
The events iff they are available from the service.
|
File |
file
The name of a local file on which to write the data (this option is
supported only by local utility classes, not by the httpd interface).
|
static String |
FILE
Parameter recognized as the name of the local file on which to render the
counters (this option is supported only by utility classes run from a
command line, not by the httpd interface).
|
static String |
FILTER
Name of the URL query parameter specifying one or more strings for
the filter to be applied to the counter paths.
|
boolean |
flot
true iff we need to output the scripts to support
flot . |
long |
fromTime
The inclusive lower bound in milliseconds of the timestamp for the
counters or events to be selected.
|
NumberFormat |
integerFormat
Used to format integer and long counter values.
|
String |
mimeType
Optional override of the MIME type from a URL query parameter.
|
static String |
MIMETYPE
Optional override of the MIME type from a URL query parameter.
|
LinkedHashMap<String,Vector<String>> |
params
The parameters from the request (as parsed from URL query parameters).
|
String |
path
The value of the
PATH query parameter. |
static String |
PATH
Name of the URL query parameter specifying the starting path for the page
view.
|
Pattern |
pattern
|
NumberFormat |
percentFormat
Used to format counter values that can be inferred to be a percentage.
|
PeriodEnum |
period
The reporting period to be used.
|
static String |
PERIOD
The reporting period to be displayed.
|
static String |
REGEX
Name of the URL query parameter specifying one or more regular
expression for the filter to be applied to the counter paths.
|
static String |
REPORT
URL query parameter whose value is the type of report to generate.
|
ReportEnum |
reportType
The kind of report to generate.
|
static String |
TIMESTAMP_FORMAT
Name of the URL query parameter specifying that the format for the first
column of the history counter table view.
|
TimestampFormatEnum |
timestampFormat |
long |
toTime
The exclusive upper bound in milliseconds of the timestamp for the
counters or events to be selected.
|
DecimalFormat |
unitsFormat
Used to format the units of time when expressed as elapsed units since
the first sample of a
History . |
String |
uri
The URI from the request.
|
Modifier and Type | Method and Description |
---|---|
protected static String |
encodeURL(String url) |
static URLQueryModel |
getInstance(IService service,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Factory for Servlet API integration.
|
static URLQueryModel |
getInstance(IService service,
String uri,
LinkedHashMap<String,Vector<String>> params,
Map<String,String> headers)
Factory for performance counter integration.
|
static URLQueryModel |
getInstance(URL url)
Create a
URLQueryModel from a URL. |
protected static String |
getProperty(Map<String,Vector<String>> params,
String property,
String defaultValue)
Return the first value for the named property.
|
StringBuilder |
getRequestURL()
Re-create the request URL, including the protocol, host, port, and
path but not any query parameters.
|
String |
getRequestURL(URLQueryParam[] override)
Re-create the request URL.
|
String |
toString() |
public static final String PATH
public static final String DEPTH
public static final String DEFAULT_DEPTH
BLZG-1318
,
Constant Field Valuespublic static final String REPORT
ReportEnum.hierarchy
.ReportEnum
,
Constant Field Valuespublic static final String CATEGORY
ReportEnum.pivot
report. The order of the names in the URL
query parameters MUST correspond with the order of the capturing
groups in the REGEX
.public static final String CORRELATED
Note: This is a shorthand for specifying REPORT
as
.
public static final String FILTER
public static final String REGEX
public static final String TIMESTAMP_FORMAT
TimestampFormatEnum
.TimestampFormatEnum
,
Constant Field Valuespublic static final String PERIOD
PeriodEnum
.public static final String MIMETYPE
public static final String FILE
public final HashMap<Field,Pattern> eventFilters
Event
Field
to which the filter will
be applied. The events filters are specified using URL query
parameters having the general form: events.column=regex
.
For example,
events.majorEventType = AsynchronousOverflowwould select just the asynchronous overflow events and
events.hostname=blade12.*would select events reported for blade12.
public final Field[] eventOrderBy
EVENT_ORDER_BY
public final String uri
public final LinkedHashMap<String,Vector<String>> params
public final int depth
DEPTH
query parameter.public final ReportEnum reportType
REPORT
,
ReportEnum
public final TimestampFormatEnum timestampFormat
TIMESTAMP_FORMAT
,
TimestampFormatEnum
public final String[] category
ReportEnum.pivot
report (optional). The order of the names in
the URL query parameters MUST correspond with the order of the
capturing groups in the REGEX
.CATEGORY
public final long fromTime
public final long toTime
public final PeriodEnum period
null
all periods
will be reported. When specified, only that period is reported.public final Pattern pattern
public final IEventReportingService eventReportingService
IEventReportingService
public final boolean flot
true
iff we need to output the scripts to support
flot
.public final DecimalFormat decimalFormat
public final NumberFormat percentFormat
public final NumberFormat integerFormat
public final DecimalFormat unitsFormat
History
.public final Format dateFormat
flot
. This is set dynamically based on the
TIMESTAMP_FORMAT
and the PERIOD
. Flot always requires
epoch numbering, so it does not use this field.public final String mimeType
MIMETYPE
public static URLQueryModel getInstance(IService service, String uri, LinkedHashMap<String,Vector<String>> params, Map<String,String> headers)
service
- The service object IFF one was specified when
CounterSetHTTPD
was started.uri
- Percent-decoded URI without parameters, for example
"/index.cgi"parms
- Parsed, percent decoded parameters from URI and, in case of
POST, data. The keys are the parameter names. Each value is a
Vector
of String
s containing the bindings for
the named parameter. The order of the URL parameters is
preserved by the insertion order of the LinkedHashMap
and the elements of the Vector
values.header
- Header entries, percent decodedpublic static URLQueryModel getInstance(IService service, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws UnsupportedEncodingException
service
- The service object IFF one was specified when
CounterSetHTTPD
was started. If this implements the
IEventReportingService
interface, then events can also
be requested.req
- The request.resp
- The response.UnsupportedEncodingException
public static URLQueryModel getInstance(URL url) throws UnsupportedEncodingException
URLQueryModel
from a URL. This is useful when serving
historical performance counter data out of a file.url
- The URL.URLQueryModel
UnsupportedEncodingException
protected static String getProperty(Map<String,Vector<String>> params, String property, String defaultValue)
params
- The request parameters.property
- The name of the propertydefaultValue
- The default value (optional).public StringBuilder getRequestURL()
public String getRequestURL(URLQueryParam[] override)
override
- Overridden query parameters (optional).Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.