Workspace 6.21.5
Public Member Functions | Protected Member Functions | List of all members
WorkspaceTcpMessage Class Reference

The base class of workspace-based Scheduler-originated network messages. More...

#include <Workspace/DataExecution/Execution/workspacetcpmessage.h>

Inheritance diagram for WorkspaceTcpMessage:
[legend]

Public Member Functions

 WorkspaceTcpMessage ()
 
 WorkspaceTcpMessage (Workspace *)
 
 ~WorkspaceTcpMessage () override
 
WorkspacegetWorkspace ()
 
bool readMessageDataFrom (QDataStream &) override
 
void setOwnsWorkspace (bool)
 
- Public Member Functions inherited from SchedulerTcpMessage
 SchedulerTcpMessage ()
 
 SchedulerTcpMessage (const QString &)
 
 ~SchedulerTcpMessage () override
 
const QString & getAuthenticationFrameworkVersion () const
 
const QString & getAuthenticationProvider () const
 
const QString & getAuthenticationProviderVersion () const
 
const QString & getCredentials () const
 
const QString & getMessageToken () const
 
const QString & getSchedulerVersion () const
 
const QString & getUuid ()
 
bool readMessageDataFrom (QDataStream &) override
 
void setAuthenticationProvider (const QString &)
 
void setAuthenticationProviderVersion (const QString &)
 
void setCredentials (const QString &)
 
void setMessageToken (const QString &)
 
void setSchedulerVersion (const QString &)
 
void setUuid (const QString &)
 
- Public Member Functions inherited from TcpMessage
 TcpMessage ()
 
 TcpMessage (const TcpMessage &rhs)
 
virtual ~TcpMessage ()
 
quint32 getLength () const
 
const QByteArray & getMessageData () const
 
virtual quint32 getMessageTypeId () const
 
bool hasBeenFullyRead () const
 
TcpMessageoperator= (const TcpMessage &)
 
void readFrom (QIODevice &)
 
virtual bool readMessageDataFrom (QDataStream &)
 
void writeTo (QIODevice &)
 

Protected Member Functions

void writeMessageDataTo (QDataStream &) override
 
void writeMessageDataTo (QDataStream &) override
 
virtual void writeMessageDataTo (QDataStream &)
 

Additional Inherited Members

- Static Public Member Functions inherited from TcpMessage
static void configureStream (QDataStream &)
 
- Protected Attributes inherited from SchedulerTcpMessage
QString authenticationFrameworkVersion_
 
QString authenticationProvider_
 
QString authenticationProviderVersion_
 
QString credentials_
 
QString messageToken_
 
QString schedulerVersion_
 
QString uuid_
 

Detailed Description

When executing a workspace remotely, during the course of remote workspace execution, workspace signals will be emitted on the remote machine. These (remotely) emitted workspace signals need to be sent back to the local machine so they can be re-emitted locally. When a (remotely) emitted signal is generated it is sent back in the form of a network message to the local machine. The network message contains the workspace that emitted the signal HOWEVER this is a serialised COPY of the remotely emitting workspace and NOT the original workspace. As such, we need to identify the original (local) workspace given the (remote) copy. To do this, there is a new attribute on the workspace called "guid". This is a globally unique id that identifies a workspace. The guid is generated during the first call to Workspace::getUuid(). The guid is then serialised into workspace XML which is then sent to and recv'd from the server.

Constructor & Destructor Documentation

◆ WorkspaceTcpMessage() [1/2]

Constructs a WorkspaceTcpMessage.

◆ WorkspaceTcpMessage() [2/2]

WorkspaceTcpMessage ( Workspace workspace)
explicit

Constructs a WorkspaceTcpMessage.

◆ ~WorkspaceTcpMessage()

~WorkspaceTcpMessage ( )
override

WorkspaceTcpMessage destructor.

Member Function Documentation

◆ getWorkspace()

Workspace * getWorkspace ( )

Returns the workspace associated with this message.

Returns
the message's workspace.

◆ readMessageDataFrom()

bool readMessageDataFrom ( QDataStream &  stream)
overridevirtual

Reads a WorkspaceTcpMessage's data from a stream.

Parameters
streamthe stream from which a WorkspaceTcpMessage's data is to be read.

Reimplemented from SchedulerTcpMessage.

◆ setOwnsWorkspace()

void setOwnsWorkspace ( bool  owns)

◆ writeMessageDataTo()

void writeMessageDataTo ( QDataStream &  messageDataStream)
overrideprotectedvirtual

Writes a WorkspaceTcpMessage's data to a stream.

Parameters
messageDataStreamthe stream to which a WorkspaceTcpMessage's data is written.

Reimplemented from SchedulerTcpMessage.