![]() |
MAK RTIspy API Documentation for HLA 1.3
|
The DtWwwClientProtocol class is implements the communications protocol for communications between the HTTP server and the browser-based client. More...
Collaboration diagram for DtWwwClientProtocol:Public Types | |
| typedef DtWwwClientProtocol *(* | CreatorType )(const DtRIDParameters ¶ms) |
| Web Spy Protocol creator method. | |
Public Member Functions | |
| virtual | ~DtWwwClientProtocol () |
| Dtor. | |
| virtual std::auto_ptr< DtRtiMsg > | parseCommand (std::auto_ptr< DtString > command) const |
| Decode the command message from the Web Client, and return the corresponding RTI control message and destination component id Returns NULL control msg if command is unrecognized or malformed. | |
| virtual void | parseResponse (DtWebSpyServer &parent, const DtWebSpyUtils::ConnectionIdentifier &connInfo, std::auto_ptr< DtRtiMsg > response) |
| Decode the response from the RTI and update the web server. | |
Static Public Member Functions | |
| static DtWwwClientProtocol * | create (const DtRIDParameters ¶ms) |
| Virtual constructor. | |
| static void | setCreatorFunction (CreatorType creator) |
| Set the concrete type for the virtual constructor method. | |
Protected Types | |
| typedef std::pair< unsigned long, unsigned long > | FragmentId |
| typedef std::map< FragmentId, DtString * > | MsgFragmentsByIdMap |
Protected Member Functions | |
| DtWwwClientProtocol (const DtRIDParameters ¶ms) | |
| Ctor protected - use virtual constructor method. | |
| virtual void | parseControlMsg (DtWebSpyServer &parent, const DtWebSpyUtils::ConnectionIdentifier &connInfo, const DtWwwControlRspMsg *cntlMsg) const |
| Specific Message parsers: | |
| virtual void | parseFederateStateMsg (DtWebSpyServer &parent, const DtWebSpyUtils::ConnectionIdentifier &connInfo, const DtWwwFederateStateRspMsg *fedStateMsg) |
| virtual void | parseComponentStateMsg (DtWebSpyServer &parent, const DtWebSpyUtils::ConnectionIdentifier &connInfo, const DtWwwStateRspMsg *stateMsg) |
| virtual void | handleLrcLogResponse (DtWebSpyServer &parent, const DtWebSpyUtils::ConnectionIdentifier &connInfo, unsigned long componentId, DtWwwRequestXmlBlockSP response) const |
| Deal with specific Command Response types. | |
Protected Attributes | |
| const DtRIDParameters & | myParams |
| MsgFragmentsByIdMap | myPendingUpdates |
Static Protected Attributes | |
| static CreatorType | theCreator = 0 |
Private Member Functions | |
| DtWwwClientProtocol (const DtWwwClientProtocol &) | |
| Copy and Assignment unimplemented. | |
| DtWwwClientProtocol & | operator= (DtWwwClientProtocol &) |
| Copy and Assignment unimplmented. | |
The DtWwwClientProtocol class is implements the communications protocol for communications between the HTTP server and the browser-based client.
Protocol Format for messages from Web-Client:
<request id="DtWebspyUtils::WwwControlMsgCommandId" link="wwwComponentId" conn="rtiConnectionId" fedex="federationHandle" fed="federateHandle">
| attr1 | |
| attr2 |
</request>
| typedef DtWwwClientProtocol*(* DtWwwClientProtocol::CreatorType)(const DtRIDParameters ¶ms) |
Web Spy Protocol creator method.
typedef std::pair< unsigned long, unsigned long > DtWwwClientProtocol::FragmentId [protected] |
typedef std::map< FragmentId, DtString* > DtWwwClientProtocol::MsgFragmentsByIdMap [protected] |
| DtWwwClientProtocol::DtWwwClientProtocol | ( | const DtWwwClientProtocol & | ) | [private] |
Copy and Assignment unimplemented.
Referenced by create().
| DtWwwClientProtocol::~DtWwwClientProtocol | ( | ) | [virtual] |
Dtor.
| DtWwwClientProtocol::DtWwwClientProtocol | ( | const DtRIDParameters & | params | ) | [protected] |
Ctor protected - use virtual constructor method.
| DtWwwClientProtocol * DtWwwClientProtocol::create | ( | const DtRIDParameters & | params | ) | [static] |
Virtual constructor.
References DtWwwClientProtocol(), and theCreator.
Referenced by DtWebSpyServer::DtWebSpyServer().
| void DtWwwClientProtocol::handleLrcLogResponse | ( | DtWebSpyServer & | parent, |
| const DtWebSpyUtils::ConnectionIdentifier & | connInfo, | ||
| unsigned long | componentId, | ||
| DtWwwRequestXmlBlockSP | response | ||
| ) | const [protected, virtual] |
Deal with specific Command Response types.
References DtWebSpyServer::appendConnectionLogEvent().
Referenced by parseControlMsg().
| DtWwwClientProtocol& DtWwwClientProtocol::operator= | ( | DtWwwClientProtocol & | ) | [private] |
Copy and Assignment unimplmented.
| std::auto_ptr< DtRtiMsg > DtWwwClientProtocol::parseCommand | ( | std::auto_ptr< DtString > | command | ) | const [virtual] |
Decode the command message from the Web Client, and return the corresponding RTI control message and destination component id Returns NULL control msg if command is unrecognized or malformed.
References DtWwwRequestXmlBlock::connectionId(), DtCreateExternalRtiMsg(), DtWebSpyUtils::DtRequestStateUpdateMsg, DtWwwControlMsgKind, DtWwwFederateStateReqMsgKind, DtWwwStateReqMsgKind, DtWwwControlMsg::setCommand(), DtWwwControlMsg::setCommandId(), DtWwwControlMsg::setConnectionId(), DtRtiMsg::setFedEx(), DtWwwFederateStateReqMsg::setProxied(), DtWwwStateReqMsg::setRequestType(), DtWwwFederateStateReqMsg::setRequestType(), DtWwwStateReqMsg::setTargetConnectionId(), DtWwwFederateStateReqMsg::setTargetConnectionId(), DtWwwFederateStateReqMsg::setTargetFederateHandle(), and DtWwwControlMsg::setTargetFederateHandle().
Referenced by DtWebSpyServer::postHttpCommand().
| void DtWwwClientProtocol::parseComponentStateMsg | ( | DtWebSpyServer & | parent, |
| const DtWebSpyUtils::ConnectionIdentifier & | connInfo, | ||
| const DtWwwStateRspMsg * | stateMsg | ||
| ) | [protected, virtual] |
| void DtWwwClientProtocol::parseControlMsg | ( | DtWebSpyServer & | parent, |
| const DtWebSpyUtils::ConnectionIdentifier & | connInfo, | ||
| const DtWwwControlRspMsg * | cntlMsg | ||
| ) | const [protected, virtual] |
Specific Message parsers:
References DtWwwControlRspMsg::command(), DtWwwControlRspMsg::connectionId(), DtWebSpyUtils::DtLrcLogEventsMsg, and handleLrcLogResponse().
Referenced by parseResponse().
| void DtWwwClientProtocol::parseFederateStateMsg | ( | DtWebSpyServer & | parent, |
| const DtWebSpyUtils::ConnectionIdentifier & | connInfo, | ||
| const DtWwwFederateStateRspMsg * | fedStateMsg | ||
| ) | [protected, virtual] |
References DtWwwFederateStateRspMsg::isComplete(), DtWwwFederateStateRspMsg::isReplacementNotAppend(), myPendingUpdates, DtWwwFederateStateRspMsg::payload(), DtWwwFederateStateRspMsg::responseType(), DtWwwFederateStateRspMsg::sourceConnectionId(), and DtWebSpyServer::updateConnection().
Referenced by parseResponse().
| void DtWwwClientProtocol::parseResponse | ( | DtWebSpyServer & | parent, |
| const DtWebSpyUtils::ConnectionIdentifier & | connInfo, | ||
| std::auto_ptr< DtRtiMsg > | response | ||
| ) | [virtual] |
Decode the response from the RTI and update the web server.
References DtWwwControlRspMsgKind, DtWwwFederateStateRspMsgKind, DtWwwStateRspMsgKind, DtRtiMsg::kindToString(), DtRtiMsg::msgKind(), parseComponentStateMsg(), parseControlMsg(), and parseFederateStateMsg().
Referenced by DtWebSpyServer::postRtiResponse().
| void DtWwwClientProtocol::setCreatorFunction | ( | CreatorType | creator | ) | [static] |
Set the concrete type for the virtual constructor method.
References theCreator.
const DtRIDParameters& DtWwwClientProtocol::myParams [protected] |
Referenced by parseComponentStateMsg(), and parseFederateStateMsg().
DtWwwClientProtocol::CreatorType DtWwwClientProtocol::theCreator = 0 [static, protected] |
Referenced by create(), and setCreatorFunction().