![]() |
MAK RTIspy API Documentation for HLA 1.3
|
The DtWebSpyServer is the http server component of the web spy. More...
Collaboration diagram for DtWebSpyServer:Public Member Functions | |
| DtWebSpyServer (const DtRIDParameters ¶ms) | |
| Ctor. | |
| virtual | ~DtWebSpyServer () |
| Dtor. | |
| virtual void | tick (unsigned int timeout=0) |
| Do the actual message processing (may process several web commands and RTI responses) | |
| virtual unsigned int | numRtiConnections () const |
| Return the number of connected RTI components. | |
| virtual void | addConnection (const DtWebSpyUtils::ConnectionIdentifier &connInfo) |
| Add a new RTI object with associated connection information. | |
| virtual void | updateConnection (const DtWebSpyUtils::ConnectionIdentifier &connInfo, std::auto_ptr< DtWebSpyUtils::ConnectionState > connState, bool appendToExisting) |
| Update an individual state component with new data. | |
| virtual void | appendConnectionLogEvent (const DtWebSpyUtils::ConnectionIdentifier &connInfo, unsigned long componentId, DtLrcConsoleLogXmlBlockSP logSegmentSP) |
| Update an individual component's log with new events. | |
| virtual void | removeConnection (const DtWebSpyUtils::ConnectionIdentifier &connInfo, const DtString &dropNotificationMsg="") |
| Remove a connection and replace it with a disconnect message when its corresponding connection is dropped Caller may specify additional information about the reason for the drop via the optional dropNotificationMsg (accepts HTML) | |
| virtual void | postHttpCommand (const DtWebSpyUtils::ConnectionIdentifier &connInfo, std::auto_ptr< DtString > command) |
| Decode the command message from the Web Client, and give appropriate instructions to the RTI components Called from HTTP conn mgr tick() | |
| virtual void | postRtiResponse (const DtWebSpyUtils::ConnectionIdentifier &connInfo, std::auto_ptr< DtRtiMsg > response) |
| Decode the response message from an RTI component and give appropriate instructions to the HTTP server Called from RTI conn mgr tick() | |
| const DtRIDParameters & | params () const |
| Provide access to the RID. | |
Protected Attributes | |
| unsigned int | myHttpPort |
| unsigned int | myRtiPort |
| DtClock | myClock |
| const DtRIDParameters & | myParams |
| std::auto_ptr < DtWebSpyHttpConnectionMgr > | myHttpConnMgr |
| Connection Manager for the HTTP web interface side. | |
| std::auto_ptr < DtWebSpyRtiConnectionMgr > | myRtiConnMgr |
| Connection Manager for the RTI socket interface side. | |
Static Protected Attributes | |
| static DtWwwClientProtocol * | theWebSpyProtocol = 0 |
| Encoder/Decoder for messages to/from the www client. | |
Private Member Functions | |
| DtWebSpyServer (const DtWebSpyServer &) | |
| Copy and Assignment unimplemented. | |
| DtWebSpyServer & | operator= (DtWebSpyServer &) |
| Copy and Assignment unimplmented. | |
The DtWebSpyServer is the http server component of the web spy.
It is the point of interface between the RTI and the web client.
| DtWebSpyServer::DtWebSpyServer | ( | const DtWebSpyServer & | ) | [private] |
Copy and Assignment unimplemented.
| DtWebSpyServer::DtWebSpyServer | ( | const DtRIDParameters & | params | ) |
Ctor.
References DtWwwClientProtocol::create(), myParams, and theWebSpyProtocol.
| DtWebSpyServer::~DtWebSpyServer | ( | ) | [virtual] |
Dtor.
| void DtWebSpyServer::addConnection | ( | const DtWebSpyUtils::ConnectionIdentifier & | connInfo | ) | [virtual] |
Add a new RTI object with associated connection information.
References myHttpConnMgr.
Referenced by DtTcpRtiConnectionMgr::tcpSocketAdditionCb().
| void DtWebSpyServer::appendConnectionLogEvent | ( | const DtWebSpyUtils::ConnectionIdentifier & | connInfo, |
| unsigned long | componentId, | ||
| DtLrcConsoleLogXmlBlockSP | logSegmentSP | ||
| ) | [virtual] |
Update an individual component's log with new events.
References myHttpConnMgr.
Referenced by DtWwwClientProtocol::handleLrcLogResponse().
| unsigned int DtWebSpyServer::numRtiConnections | ( | ) | const [inline, virtual] |
Return the number of connected RTI components.
References myRtiConnMgr.
| DtWebSpyServer& DtWebSpyServer::operator= | ( | DtWebSpyServer & | ) | [private] |
Copy and Assignment unimplmented.
| const DtRIDParameters & DtWebSpyServer::params | ( | ) | const [inline] |
Provide access to the RID.
References myParams.
Referenced by DtTcpRtiConnectionMgr::DtTcpRtiConnectionMgr(), DtTcpRtiConnectionMgr::establishConnection(), DtWebSpyHttpConnectionMgr::params(), and DtTcpRtiConnectionMgr::tick().
| void DtWebSpyServer::postHttpCommand | ( | const DtWebSpyUtils::ConnectionIdentifier & | connInfo, |
| std::auto_ptr< DtString > | command | ||
| ) | [virtual] |
Decode the command message from the Web Client, and give appropriate instructions to the RTI components Called from HTTP conn mgr tick()
References myRtiConnMgr, DtWwwClientProtocol::parseCommand(), and theWebSpyProtocol.
Referenced by DtEhsHttpConnectionMgr::tick().
| void DtWebSpyServer::postRtiResponse | ( | const DtWebSpyUtils::ConnectionIdentifier & | connInfo, |
| std::auto_ptr< DtRtiMsg > | response | ||
| ) | [virtual] |
Decode the response message from an RTI component and give appropriate instructions to the HTTP server Called from RTI conn mgr tick()
References DtWwwClientProtocol::parseResponse(), and theWebSpyProtocol.
Referenced by DtTcpRtiConnectionMgr::readAndForward().
| void DtWebSpyServer::removeConnection | ( | const DtWebSpyUtils::ConnectionIdentifier & | connInfo, |
| const DtString & | dropNotificationMsg = "" |
||
| ) | [virtual] |
Remove a connection and replace it with a disconnect message when its corresponding connection is dropped Caller may specify additional information about the reason for the drop via the optional dropNotificationMsg (accepts HTML)
References myHttpConnMgr.
Referenced by DtTcpRtiConnectionMgr::tcpSocketRemovalCb().
| void DtWebSpyServer::tick | ( | unsigned int | timeout = 0 | ) | [virtual] |
Do the actual message processing (may process several web commands and RTI responses)
References myClock, myHttpConnMgr, and myRtiConnMgr.
| void DtWebSpyServer::updateConnection | ( | const DtWebSpyUtils::ConnectionIdentifier & | connInfo, |
| std::auto_ptr< DtWebSpyUtils::ConnectionState > | connState, | ||
| bool | appendToExisting | ||
| ) | [virtual] |
Update an individual state component with new data.
References myHttpConnMgr.
Referenced by DtWwwClientProtocol::parseComponentStateMsg(), and DtWwwClientProtocol::parseFederateStateMsg().
DtClock DtWebSpyServer::myClock [protected] |
Referenced by tick().
std::auto_ptr<DtWebSpyHttpConnectionMgr> DtWebSpyServer::myHttpConnMgr [protected] |
Connection Manager for the HTTP web interface side.
Referenced by addConnection(), appendConnectionLogEvent(), removeConnection(), tick(), and updateConnection().
unsigned int DtWebSpyServer::myHttpPort [protected] |
const DtRIDParameters& DtWebSpyServer::myParams [protected] |
Referenced by DtWebSpyServer(), and params().
std::auto_ptr<DtWebSpyRtiConnectionMgr> DtWebSpyServer::myRtiConnMgr [protected] |
Connection Manager for the RTI socket interface side.
Referenced by numRtiConnections(), postHttpCommand(), and tick().
unsigned int DtWebSpyServer::myRtiPort [protected] |
DtWwwClientProtocol * DtWebSpyServer::theWebSpyProtocol = 0 [static, protected] |
Encoder/Decoder for messages to/from the www client.
Referenced by DtWebSpyServer(), postHttpCommand(), and postRtiResponse().