MAK RTIspy API Documentation for HLA 1516
Public Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
DtWebSpyServer Class Reference

The DtWebSpyServer is the http server component of the web spy. More...

+ Collaboration diagram for DtWebSpyServer:

List of all members.

Public Member Functions

 DtWebSpyServer (const DtRIDParameters &params)
 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 DtRIDParametersparams () const
 Provide access to the RID.

Protected Attributes

unsigned int myHttpPort
unsigned int myRtiPort
DtClock myClock
const DtRIDParametersmyParams
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 DtWwwClientProtocoltheWebSpyProtocol = 0
 Encoder/Decoder for messages to/from the www client.

Private Member Functions

 DtWebSpyServer (const DtWebSpyServer &)
 Copy and Assignment unimplemented.
DtWebSpyServeroperator= (DtWebSpyServer &)
 Copy and Assignment unimplmented.

Detailed Description

The DtWebSpyServer is the http server component of the web spy.

It is the point of interface between the RTI and the web client.


Constructor & Destructor Documentation

Copy and Assignment unimplemented.

Dtor.


Member Function Documentation

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]
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().


Member Data Documentation

DtClock DtWebSpyServer::myClock [protected]

Referenced by tick().

Connection Manager for the HTTP web interface side.

Referenced by addConnection(), appendConnectionLogEvent(), removeConnection(), tick(), and updateConnection().

unsigned int DtWebSpyServer::myHttpPort [protected]

Referenced by DtWebSpyServer(), and params().

Connection Manager for the RTI socket interface side.

Referenced by numRtiConnections(), postHttpCommand(), and tick().

unsigned int DtWebSpyServer::myRtiPort [protected]

Encoder/Decoder for messages to/from the www client.

Referenced by DtWebSpyServer(), postHttpCommand(), and postRtiResponse().


The documentation for this class was generated from the following files:

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)