• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

HttpPages.h

Go to the documentation of this file.
00001 /** @file
00002 
00003   A brief file description
00004 
00005   @section license License
00006 
00007   Licensed to the Apache Software Foundation (ASF) under one
00008   or more contributor license agreements.  See the NOTICE file
00009   distributed with this work for additional information
00010   regarding copyright ownership.  The ASF licenses this file
00011   to you under the Apache License, Version 2.0 (the
00012   "License"); you may not use this file except in compliance
00013   with the License.  You may obtain a copy of the License at
00014 
00015       http://www.apache.org/licenses/LICENSE-2.0
00016 
00017   Unless required by applicable law or agreed to in writing, software
00018   distributed under the License is distributed on an "AS IS" BASIS,
00019   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00020   See the License for the specific language governing permissions and
00021   limitations under the License.
00022  */
00023 
00024 /****************************************************************************
00025 
00026    HttpPages.h
00027 
00028    Description:
00029        Data structurs and stat page generators for http info
00030 
00031 
00032  ****************************************************************************/
00033 
00034 #ifndef _HTTP_PAGES_H_
00035 #define _HTTP_PAGES_H_
00036 
00037 #include "libts.h"
00038 #include "P_EventSystem.h"
00039 #include "DynArray.h"
00040 #include "HTTP.h"
00041 #include "StatPages.h"
00042 #include "HttpSM.h"
00043 
00044 class HttpSM;
00045 
00046 const int HTTP_LIST_BUCKETS = 63;
00047 const int HTTP_LIST_RETRY = HRTIME_MSECONDS(10);
00048 
00049 struct HttpSMListBucket
00050 {
00051   Ptr<ProxyMutex> mutex;
00052   DList(HttpSM, debug_link) sm_list;
00053 };
00054 
00055 extern HttpSMListBucket HttpSMList[];
00056 
00057 class HttpPagesHandler:public BaseStatPagesHandler
00058 {
00059 public:
00060   HttpPagesHandler(Continuation * cont, HTTPHdr * header);
00061   ~HttpPagesHandler();
00062 
00063   int handle_smlist(int event, void *edata);
00064   int handle_smdetails(int event, void *edata);
00065   int handle_callback(int event, void *edata);
00066   Action action;
00067 
00068 private:
00069 
00070   int64_t extract_id(const char *query);
00071   void dump_hdr(HTTPHdr *hdr, const char *desc);
00072   void dump_tunnel_info(HttpSM * sm);
00073   void dump_history(HttpSM * sm);
00074   int dump_sm(HttpSM * sm);
00075 
00076 
00077   Arena arena;
00078   char *request;
00079   int list_bucket;
00080 
00081   enum HP_State_t
00082   { HP_INIT, HP_RUN };
00083   HP_State_t state;
00084 
00085   // Info for SM details
00086   int64_t sm_id;
00087 };
00088 
00089 void http_pages_init();
00090 
00091 #endif

Generated by  doxygen 1.7.1