![]() |
MAK RTIspy API Documentation for HLA Evolved
|
00001 /********************************************************************* 00002 ** Copyright (c) 2006 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: serverConnectionList.h,v $ $Revision: 1.6 $ $State: Exp $ 00007 *******************************************************************************/ 00008 #ifndef DtServerConnectionListXML_H_ 00009 #define DtServerConnectionListXML_H_ 00010 00011 #include <rtiMsConfig.h> 00012 #include "webSpyUtils.h" 00013 #include <vlutil/vlThreadSafe.h> 00014 #include <vlutil/vlString.h> 00015 #include <basicEhsDoc.h> 00016 #include <map> 00017 00018 class DtEhsHttpConnectionMgr; 00019 class HttpRequest; 00020 class HttpResponse; 00021 00022 // The XML representation of the Web Server Component Connection List 00023 class DT_DLL_WWWEHS DtServerConnectionListXML : public DtBasicEhsDoc 00024 { 00025 private: 00026 00027 // Copy Constructor not implimented : Copy not allowed 00028 DtServerConnectionListXML(const DtServerConnectionListXML&); 00029 // Copy Constructor not implimented : Copy not allowed 00030 DtServerConnectionListXML& operator=(const DtServerConnectionListXML&); 00031 00032 public: 00033 00034 DtServerConnectionListXML( DtEhsHttpConnectionMgr& parent ); 00035 virtual ~DtServerConnectionListXML(); 00036 00037 virtual void addConnection( const DtString& connectionName, const DtWebSpyUtils::ConnectionIdentifier& connInfo ); 00038 virtual void removeConnection( const DtString& connectionName, const DtWebSpyUtils::ConnectionIdentifier& connInfo ); 00039 00040 protected: 00041 00042 // Serve requests for this page 00043 virtual ResponseCode HandleNonFileRequest( HttpRequest * ipoHttpRequest, 00044 HttpResponse * ipoHttpResponse ); 00045 00046 // Rebuild the list of connections in the page 00047 void buildResponse(); 00048 00049 protected: 00050 00051 typedef std::map< DtString, DtWebSpyUtils::ConnectionIdentifier > NameToInfoMap; 00052 typedef DtThreadSafe< NameToInfoMap > ThreadSafeNameToInfoMap; 00053 00054 DtEhsHttpConnectionMgr& myParent; 00055 DtString myHeader; 00056 DtString myTrailer; 00057 00058 ThreadSafeNameToInfoMap myConnections; 00059 }; 00060 00061 00062 #endif // DtServerConnectionListXML_H_