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

The DtTcpWwwSpyAdapter class provides the interface between any RTI component and the WebSpy server. More...

+ Inheritance diagram for DtTcpWwwSpyAdapter:
+ Collaboration diagram for DtTcpWwwSpyAdapter:

List of all members.

Public Member Functions

virtual ~DtTcpWwwSpyAdapter ()
 Dtor.
virtual DtRtiMsggetNextMsg ()
 Read a message from the web server (returns null if none pending)
virtual void postMsg (const DtRtiMsg &msg)
 Post a response to the web server.

Static Public Member Functions

static DtWwwSpyAdaptercreate (const DtRIDParameters &params, DtWebSpyUtils::ConnectionType type, unsigned long connId)
 Virtual constructor.

Protected Member Functions

 DtTcpWwwSpyAdapter (const DtRIDParameters &params, DtWebSpyUtils::ConnectionType type, unsigned long connId)
 Ctor protected - use virtual ctor method.
virtual bool connectToWebServer ()
 Attempt to open a connection and handshake with the server Returns false if connection fails.
virtual bool startWebServer ()
 Attempt to start a new web server Return boolean: process started (not necessarily complete but at least the executable was there)
virtual bool getConnectMsg ()
 Wait for the server to send a connect msg in response to a new connection.
virtual void sendTypeInfo ()
 Send component type information to the server.
DtRtiMsgnetRead (int *retCode) const
 Attempt to read a new message from the socket.

Protected Attributes

MAKRti::DtInetAddr myWebServerAddr
unsigned int myWebServerPort
DtTcpMsgSocketmySocket

Private Member Functions

 DtTcpWwwSpyAdapter (const DtTcpWwwSpyAdapter &)
 Copy and Assignment unimplemented.
DtTcpWwwSpyAdapteroperator= (DtTcpWwwSpyAdapter &)
 Copy and Assignment unimplmented.

Detailed Description

The DtTcpWwwSpyAdapter class provides the interface between any RTI component and the WebSpy server.

It is responsible for creating, connecting to, and communicating with the web server.


Constructor & Destructor Documentation

Copy and Assignment unimplemented.

Referenced by create().

Dtor.

References mySocket.

DtTcpWwwSpyAdapter::DtTcpWwwSpyAdapter ( const DtRIDParameters params,
DtWebSpyUtils::ConnectionType  type,
unsigned long  connId 
) [protected]

Ctor protected - use virtual ctor method.


Member Function Documentation

bool DtTcpWwwSpyAdapter::connectToWebServer ( ) [protected, virtual]

Attempt to open a connection and handshake with the server Returns false if connection fails.

Implements DtWwwSpyAdapter.

References getConnectMsg(), DtTcpMsgSocket::isConnected(), mySocket, myWebServerAddr, myWebServerPort, DtTcpMsgSocket::openClientSocket(), sendTypeInfo(), and DtTcpMsgSocket::setNonBlocking().

DtWwwSpyAdapter * DtTcpWwwSpyAdapter::create ( const DtRIDParameters params,
DtWebSpyUtils::ConnectionType  type,
unsigned long  connId 
) [static]

Virtual constructor.

Reimplemented from DtWwwSpyAdapter.

References DtTcpWwwSpyAdapter(), and lm.

Referenced by DtForwarderWebManager::DtForwarderWebManager(), and DtRtiExecWebManager::DtRtiExecWebManager().

bool DtTcpWwwSpyAdapter::getConnectMsg ( ) [protected, virtual]

Wait for the server to send a connect msg in response to a new connection.

References DtConnectMsgKind, DtRtiMsg::kindToString(), DtRtiMsg::msgKind(), DtWwwSpyAdapter::myClock, DtWwwSpyAdapter::myParams, netRead(), and DtRIDParameters::responseInterval.

Referenced by connectToWebServer().

Read a message from the web server (returns null if none pending)

Implements DtWwwSpyAdapter.

References DtTcpMsgSocket::isConnected(), DtWwwSpyAdapter::myConnectionStatus, mySocket, and netRead().

DtRtiMsg * DtTcpWwwSpyAdapter::netRead ( int *  retCode) const [protected]
DtTcpWwwSpyAdapter& DtTcpWwwSpyAdapter::operator= ( DtTcpWwwSpyAdapter ) [private]

Copy and Assignment unimplmented.

void DtTcpWwwSpyAdapter::postMsg ( const DtRtiMsg msg) [virtual]

Post a response to the web server.

Implements DtWwwSpyAdapter.

References DtTcpMsgSocket::isConnected(), DtWwwSpyAdapter::myConnectionStatus, mySocket, and DtTcpMsgSocket::sendMessage().

Referenced by sendTypeInfo().

void DtTcpWwwSpyAdapter::sendTypeInfo ( ) [protected, virtual]
bool DtTcpWwwSpyAdapter::startWebServer ( ) [protected, virtual]

Attempt to start a new web server Return boolean: process started (not necessarily complete but at least the executable was there)

Implements DtWwwSpyAdapter.

References DtRtiLibPath(), DtRIDParameters::getFullPathToRidFile(), DtWwwSpyAdapter::myParams, and DtWwwSpyAdapter::startWebServerProcess().


Member Data Documentation

MAKRti::DtInetAddr DtTcpWwwSpyAdapter::myWebServerAddr [protected]

Referenced by connectToWebServer().

unsigned int DtTcpWwwSpyAdapter::myWebServerPort [protected]

Referenced by connectToWebServer().


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)