|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.Handler
org.restlet.resource.Resource
org.hackystat.telemetry.service.resource.telemetry.TelemetryResource
public abstract class TelemetryResource
An abstract superclass for all Telemetry resources that supplies common initialization processing. This includes:
Field Summary | |
---|---|
protected java.lang.String |
authUser
The authenticated user, retrieved from the ChallengeResponse, or null. |
protected java.lang.String |
badAuth
The standard error message returned from invalid authentication. |
protected java.lang.String |
chart
To be retrieved from the URL as the 'chart' template parameter, or null. |
protected java.lang.String |
dpdHost
The dailyprojectdata host (for analysis). |
protected java.lang.String |
end
To be retrieved from the URL as the 'end' template parameter, or null. |
protected java.lang.String |
granularity
To be retrieved from the URL as the 'granularity' template parameter, or null. |
protected java.lang.String |
params
To be retrieved from the URL as the 'params' template parameter, or null. |
protected java.lang.String |
projectName
To be retrieved from the URL as the 'project' template parameter, or null. |
protected long |
requestStartTime
Records the time at which each HTTP request was initiated. |
protected java.lang.String |
sensorBaseHost
The sensorbase host (for authentication). |
protected java.lang.String |
start
To be retrieved from the URL as the 'start' template parameter, or null. |
protected Server |
telemetryServer
This server (telemetry). |
protected java.lang.String |
uriUser
To be retrieved from the URL as the 'email' template parameter, or null. |
Constructor Summary | |
---|---|
TelemetryResource(org.restlet.Context context,
org.restlet.data.Request request,
org.restlet.data.Response response)
Provides the following representational variants: TEXT_XML. |
Method Summary | |
---|---|
org.hackystat.dailyprojectdata.client.DailyProjectDataClient |
getDailyProjectDataClient()
Returns a DailyProjectDataClient instance associated with the User in this request. |
org.hackystat.sensorbase.client.SensorBaseClient |
getSensorBaseClient()
Returns a SensorBaseClient instance associated with the User in this request. |
org.restlet.resource.StringRepresentation |
getStringRepresentation(java.lang.String xmlData)
Creates and returns a new Restlet StringRepresentation built from xmlData. |
java.util.List<TelemetryDefinition> |
getTelemetryDefinitions()
Returns a list of TelemetryDefinition instances corresponding to all definitions in telemetry.definitions.xml. |
protected void |
logRequest()
Generates a log message indicating the type of request, the elapsed time required, the user who requested the data, and the day. |
protected void |
logRequest(java.lang.String command)
Generates a log message indicating the command. |
abstract org.restlet.resource.Representation |
represent(org.restlet.resource.Variant variant)
The Restlet getRepresentation method which must be overridden by all concrete Resources. |
protected void |
setStatusError(java.lang.String msg)
Called when an error occurs during processing. |
protected void |
setStatusError(java.lang.String msg,
java.lang.Exception e)
Called when an error resulting from an exception is caught during processing. |
protected void |
setStatusInternalError(java.lang.String msg)
Called when an internal error occurs during processing. |
Methods inherited from class org.restlet.resource.Resource |
---|
acceptRepresentation, allowDelete, allowGet, allowPost, allowPut, delete, getPreferredRepresentation, getPreferredVariant, getRepresentation, getVariants, handleDelete, handleGet, handlePost, handlePut, init, isAvailable, isModifiable, isNegotiateContent, isReadable, post, put, removeRepresentations, represent, setAvailable, setModifiable, setNegotiateContent, setReadable, setVariants, storeRepresentation |
Methods inherited from class org.restlet.Handler |
---|
allowHead, allowOptions, generateRef, getAllowedMethods, getApplication, getContext, getLogger, getMatrix, getQuery, getRequest, getResponse, handleHead, handleOptions, setContext, setRequest, setResponse, updateAllowedMethods |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String uriUser
protected java.lang.String projectName
protected java.lang.String chart
protected java.lang.String granularity
protected java.lang.String start
protected java.lang.String end
protected java.lang.String params
protected java.lang.String authUser
protected Server telemetryServer
protected java.lang.String sensorBaseHost
protected java.lang.String dpdHost
protected java.lang.String badAuth
protected long requestStartTime
Constructor Detail |
---|
public TelemetryResource(org.restlet.Context context, org.restlet.data.Request request, org.restlet.data.Response response)
context
- The context.request
- The request object.response
- The response object.Method Detail |
---|
public abstract org.restlet.resource.Representation represent(org.restlet.resource.Variant variant)
represent
in class org.restlet.resource.Resource
variant
- The variant requested.
public org.restlet.resource.StringRepresentation getStringRepresentation(java.lang.String xmlData)
xmlData
- The xml data as a string.
public org.hackystat.dailyprojectdata.client.DailyProjectDataClient getDailyProjectDataClient()
public org.hackystat.sensorbase.client.SensorBaseClient getSensorBaseClient()
public java.util.List<TelemetryDefinition> getTelemetryDefinitions()
protected void logRequest()
protected void logRequest(java.lang.String command)
command
- The command (typically cache).protected void setStatusError(java.lang.String msg, java.lang.Exception e)
msg
- A description of the error.e
- A chained exception.protected void setStatusError(java.lang.String msg)
msg
- A description of the error.protected void setStatusInternalError(java.lang.String msg)
msg
- A description of the error.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |