Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Session_ServerCheck Class Reference

The class Session_ServerCheck is used to check SALOME servers availability. More...

#include <Session_ServerCheck.hxx>

Inheritance diagram for Session_ServerCheck:
Inheritance graph

Classes

class  Locker
 Automatic locker/unlocker. More...
 

Public Member Functions

 Session_ServerCheck (QMutex *, QWaitCondition *)
 Constructor. More...
 
virtual ~Session_ServerCheck ()
 Destructor. More...
 
QString currentMessage ()
 Get current information message. More...
 
QString error ()
 Get error message. More...
 
int currentStep ()
 Get current step. More...
 
int totalSteps ()
 Get total number of check steps. More...
 

Protected Member Functions

virtual void run ()
 Thread loop function. Performs SALOME servers check. More...
 

Private Member Functions

void setStep (const int)
 Modify current step. More...
 
void setError (const QString &msg)
 Set error message. More...
 

Private Attributes

QMutex myDataMutex
 data mutex More...
 
QMutex * myMutex
 splash mutex More...
 
QWaitCondition * myWC
 splash wait condition More...
 
bool myCheckCppContainer
 flag : check C++ container More...
 
bool myCheckPyContainer
 flag : check Python container More...
 
bool myCheckSVContainer
 flag : check supervision container More...
 
int myAttempts
 number of attemtps to get response from server More...
 
int myDelay
 delay between attempts in microseconds More...
 
int myCurrentStep
 current step More...
 
QString myMessage
 current information message More...
 
QString myError
 error message More...
 

Friends

class Locker
 

Detailed Description

It runs in the secondrary thread. The number of attemts to check each SALOME server and the time delay between checks can be specified via setting the CSF_RepeatServerRequest and CSF_DelayServerRequest environment variables.

Total number of the check attempts can be retrieved via totalSteps() method and current check step can be retrieved via currentStep() method.

The method currentMessage() can be used to get the information message about what SALOME server is currently checked. If any error occured (some server could not be found) the thread loop is stopped and error status is set. Error message can be retrieved with the error() method.

Constructor & Destructor Documentation

Session_ServerCheck::Session_ServerCheck ( QMutex *  mutex,
QWaitCondition *  wc 
)
Parameters
mutexa mutex used to serialize progress operations (splash)
wca wait condition used in combination with mutex

References myAttempts, myCheckCppContainer, myCheckPyContainer, myCheckSVContainer, and myDelay.

Session_ServerCheck::~Session_ServerCheck ( )
virtual

Member Function Documentation

QString Session_ServerCheck::currentMessage ( )
Returns
current message

References myAttempts, myCurrentStep, and myDataMutex.

int Session_ServerCheck::currentStep ( )
Returns
current step

References myCurrentStep, and myDataMutex.

QString Session_ServerCheck::error ( )
Returns
error message or null string of there was no any error

References myDataMutex, and myError.

void Session_ServerCheck::setError ( const QString &  msg)
private
Parameters
msgerror message

References myDataMutex, and myError.

void Session_ServerCheck::setStep ( const int  step)
private
Parameters
stepnew current step value

References myCurrentStep, and myDataMutex.

int Session_ServerCheck::totalSteps ( )
Returns
total number of steps

References myAttempts, myCheckCppContainer, myCheckPyContainer, myCheckSVContainer, and myDataMutex.

Friends And Related Function Documentation

friend class Locker
friend

Member Data Documentation

int Session_ServerCheck::myAttempts
private
bool Session_ServerCheck::myCheckCppContainer
private
bool Session_ServerCheck::myCheckPyContainer
private
bool Session_ServerCheck::myCheckSVContainer
private
int Session_ServerCheck::myCurrentStep
private
QMutex Session_ServerCheck::myDataMutex
private
int Session_ServerCheck::myDelay
private
QString Session_ServerCheck::myError
private
QString Session_ServerCheck::myMessage
private
QMutex* Session_ServerCheck::myMutex
private
QWaitCondition* Session_ServerCheck::myWC
private

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