29 using OpenSim.Framework.Monitoring;
31 namespace OpenSim.Framework.Servers.HttpServer
35 public int RequestsReceived {
get;
protected set; }
37 public int RequestsHandled {
get;
protected set; }
39 public virtual string ContentType
41 get {
return "application/xml"; }
44 private readonly
string m_httpMethod;
46 public virtual string HttpMethod
48 get {
return m_httpMethod; }
51 private readonly
string m_path;
53 public string Name {
get;
private set; }
55 public string Description {
get;
private set; }
57 protected BaseRequestHandler(
string httpMethod,
string path) : this(httpMethod, path, null, null) {}
62 Description = description;
63 m_httpMethod = httpMethod;
68 if (!path.StartsWith(
"/CAPS/"))
70 StatsManager.RegisterStat(
74 "Number of requests received by this service endpoint",
77 string.Format(
"{0}:{1}", httpMethod, path),
80 s => s.Value = RequestsReceived,
85 public virtual string Path
87 get {
return m_path; }
94 return path.Substring(m_path.Length);
102 if (String.IsNullOrEmpty(path))
107 return path.StartsWith(Path);
112 string param = GetParam(path);
114 return param.Split(
new char[] {
'/',
'?',
'&' }, StringSplitOptions.RemoveEmptyEntries);
string[] SplitParams(string path)
BaseRequestHandler(string httpMethod, string path, string name, string description)
BaseRequestHandler(string httpMethod, string path)
Holds individual statistic details
string GetParam(string path)
StatVerbosity
Verbosity of stat.
MeasuresOfInterest
Measures of interest for this stat.
bool CheckParam(string path)