![]() |
MAK RTIspy API Documentation for HLA 1.3
|
00001 /********************************************************************* 00002 ** Copyright (c) 2006 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: wwwSpyServer.h,v $ $Revision: 1.10 $ $State: Exp $ 00007 *******************************************************************************/ 00010 00011 #ifndef DtWebSpyServer_H_ 00012 #define DtWebSpyServer_H_ 00013 00014 #include <rtiMsConfig.h> 00015 #include "wwwSpyRtiConnMgr.h" 00016 #include "wwwSpyHttpConnMgr.h" 00017 #include "lrcConsoleLogXmlBlock.h" 00018 #include <rtiMsg.h> 00019 #include <RIDparams.h> 00020 #include <vlutil/vlTime.h> 00021 00022 class DtWwwClientProtocol; 00023 00027 class DT_DLL_WWW DtWebSpyServer 00028 { 00029 private: 00031 DtWebSpyServer( const DtWebSpyServer& ); 00033 DtWebSpyServer& operator=( DtWebSpyServer& ); 00034 00035 public: 00037 DtWebSpyServer( const DtRIDParameters& params ); 00039 virtual ~DtWebSpyServer(); 00040 00043 virtual void tick( unsigned int timeout = 0 ); 00044 00046 virtual inline unsigned int numRtiConnections() const; 00047 00049 virtual void addConnection( const DtWebSpyUtils::ConnectionIdentifier& connInfo ); 00050 00052 virtual void updateConnection( const DtWebSpyUtils::ConnectionIdentifier& connInfo, 00053 std::auto_ptr< DtWebSpyUtils::ConnectionState > connState, bool appendToExisting ); 00054 00056 virtual void appendConnectionLogEvent( const DtWebSpyUtils::ConnectionIdentifier& connInfo, 00057 unsigned long componentId, DtLrcConsoleLogXmlBlockSP logSegmentSP ); 00058 00063 virtual void removeConnection( const DtWebSpyUtils::ConnectionIdentifier& connInfo, 00064 const DtString& dropNotificationMsg = "" ); 00065 00066 00070 virtual void postHttpCommand( const DtWebSpyUtils::ConnectionIdentifier& connInfo, std::auto_ptr<DtString> command ); 00071 00075 virtual void postRtiResponse( const DtWebSpyUtils::ConnectionIdentifier& connInfo, std::auto_ptr<DtRtiMsg> response ); 00076 00078 inline const DtRIDParameters& params() const; 00079 00080 00081 protected: 00082 00083 unsigned int myHttpPort; 00084 unsigned int myRtiPort; 00085 DtClock myClock; 00086 00087 const DtRIDParameters& myParams; 00088 00090 std::auto_ptr<DtWebSpyHttpConnectionMgr> myHttpConnMgr; 00091 00093 std::auto_ptr<DtWebSpyRtiConnectionMgr> myRtiConnMgr; 00094 00096 static DtWwwClientProtocol* theWebSpyProtocol; 00097 }; 00098 00099 inline const DtRIDParameters& DtWebSpyServer::params() const 00100 { 00101 return myParams; 00102 } 00103 00104 inline unsigned int DtWebSpyServer::numRtiConnections() const 00105 { 00106 return myRtiConnMgr->numConnections(); 00107 } 00108 00109 #endif //! DtWebSpyServer_H_