Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | Static Protected Member Functions | List of all members
pqServer Class Reference

pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vtkSMSession. More...

#include <pqServer.h>

Inheritance diagram for pqServer:
Inheritance graph
[legend]
Collaboration diagram for pqServer:
Collaboration graph
[legend]

Public Slots

void sendToOtherClients (vtkSMMessage *msg)
 Allow user to broadcast to other client a given message. More...
 

Signals

void nameChanged (pqServerManagerModelItem *)
 Fired when the name of the proxy is changed. More...
 
void fiveMinuteTimeoutWarning ()
 Fired about 5 minutes before the server timesout. More...
 
void finalTimeoutWarning ()
 Fired about 1 minute before the server timesout. More...
 
void serverSideDisconnected ()
 Fired if any server side crash or disconnection occurred. More...
 
void sentFromOtherClient (pqServer *, vtkSMMessage *msg)
 Allow user to listen messages from other clients. More...
 
void triggeredMasterUser (int)
 Signal triggered when user information get updated. More...
 
void triggeredUserName (int, QString &)
 
void triggeredUserListChanged ()
 
void triggerFollowCamera (int)
 

Public Member Functions

 pqServer (vtkIdType connectionId, QObject *parent=nullptr)
 
 ~pqServer () override
 
const pqServerResourcegetResource ()
 
void setResource (const pqServerResource &server_resource)
 
vtkSMSessionsession () const
 Returns the session instance which the pqServer represents. More...
 
vtkIdType GetConnectionID () const
 Returns the connection id for the server connection. More...
 
vtkIdType sessionId () const
 
vtkSMSessionProxyManagerproxyManager () const
 Returns the proxy manager for this session. More...
 
vtkSMProxySelectionModelactiveSourcesSelectionModel () const
 Sources selection model is used to keep track of sources currently selected on this session/server-connection. More...
 
vtkSMProxySelectionModelactiveViewSelectionModel () const
 View selection model is used to keep track of active view. More...
 
int getNumberOfPartitions ()
 Return the number of data server partitions on this server connection. More...
 
bool isRemote () const
 Returns is this connection is a connection to a remote server or a built-in server. More...
 
bool isMaster () const
 Returns true if the client is currently master. More...
 
bool isProcessingPending () const
 Returns true if the client is currently processing remote messages and still have more to process. More...
 
bool isRenderServerSeparate ()
 Returns true is this connection has a separate render-server and data-server. More...
 
pqTimeKeepergetTimeKeeper () const
 Returns the time keeper for this connection. More...
 
vtkPVServerInformationgetServerInformation () const
 Returns the vtkPVServerInformation object which contains information about the command line options specified on the remote server, if any. More...
 
bool isProgressPending () const
 Returns true if the client is waiting on some actions from the server that typically result in progress events. More...
 
void setMonitorServerNotifications (bool)
 enable/disable monitoring of server notifications. More...
 
int getRemainingLifeTime () const
 Get the server remaining life time in minutes. More...
 
void setRemainingLifeTime (int value)
 Set the time (in minutes) remaining. More...
 
- Public Member Functions inherited from pqServerManagerModelItem
 pqServerManagerModelItem (QObject *parent=nullptr)
 
 ~pqServerManagerModelItem () override
 

Static Public Member Functions

static void setHeartBeatTimeoutSetting (int msec)
 Get/Set the application wide heart beat timeout setting. More...
 
static int getHeartBeatTimeoutSetting ()
 

Protected Slots

void heartBeat ()
 Called to send a heartbeat to the server. More...
 
void updateRemainingLifeTime ()
 Called to update the server life time. More...
 
void processServerNotification ()
 Called when idle to look for server notification for collaboration purpose. More...
 
void onCollaborationCommunication (vtkObject *, unsigned long, void *, void *)
 Called by vtkSMCollaborationManager when associated message happen. More...
 
void onConnectionLost (vtkObject *, unsigned long, void *, void *)
 Called by vtkSMSessionClient is any communication error occurred with the server. More...
 

Protected Member Functions

void setHeartBeatTimeout (int msec)
 Set the heartbeat timeout for this instance of pqServer. More...
 
- Protected Member Functions inherited from pqServerManagerModelItem
vtkEventQtSlotConnectgetConnector ()
 All subclasses generally need some vtkEventQtSlotConnect instance to connect to VTK events. More...
 

Static Protected Member Functions

static const char * HEARBEAT_TIME_SETTING_KEY ()
 Returns the string key used for the heart beat time interval. More...
 

Detailed Description

pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vtkSMSession.

Besides providing API to access vtkSMSession, it also performs some initialization of session-related proxies such as time-keeper and global-mapper-properties proxies.

Definition at line 35 of file pqServer.h.

Constructor & Destructor Documentation

◆ pqServer()

pqServer::pqServer ( vtkIdType  connectionId,
QObject *  parent = nullptr 
)

◆ ~pqServer()

pqServer::~pqServer ( )
override

Member Function Documentation

◆ getResource()

const pqServerResource& pqServer::getResource ( )

◆ setResource()

void pqServer::setResource ( const pqServerResource server_resource)

◆ session()

vtkSMSession* pqServer::session ( ) const

Returns the session instance which the pqServer represents.

◆ GetConnectionID()

vtkIdType pqServer::GetConnectionID ( ) const

Returns the connection id for the server connection.

◆ sessionId()

vtkIdType pqServer::sessionId ( ) const
inline

Definition at line 54 of file pqServer.h.

◆ proxyManager()

vtkSMSessionProxyManager* pqServer::proxyManager ( ) const

Returns the proxy manager for this session.

◆ activeSourcesSelectionModel()

vtkSMProxySelectionModel* pqServer::activeSourcesSelectionModel ( ) const

Sources selection model is used to keep track of sources currently selected on this session/server-connection.

◆ activeViewSelectionModel()

vtkSMProxySelectionModel* pqServer::activeViewSelectionModel ( ) const

View selection model is used to keep track of active view.

◆ getNumberOfPartitions()

int pqServer::getNumberOfPartitions ( )

Return the number of data server partitions on this server connection.

A convenience method.

◆ isRemote()

bool pqServer::isRemote ( ) const

Returns is this connection is a connection to a remote server or a built-in server.

◆ isMaster()

bool pqServer::isMaster ( ) const

Returns true if the client is currently master.

For non-collaborative session, it always return true.

◆ isProcessingPending()

bool pqServer::isProcessingPending ( ) const

Returns true if the client is currently processing remote messages and still have more to process.

This method is used to deffered the tryRender.

◆ isRenderServerSeparate()

bool pqServer::isRenderServerSeparate ( )

Returns true is this connection has a separate render-server and data-server.

◆ getTimeKeeper()

pqTimeKeeper* pqServer::getTimeKeeper ( ) const

Returns the time keeper for this connection.

◆ getServerInformation()

vtkPVServerInformation* pqServer::getServerInformation ( ) const

Returns the vtkPVServerInformation object which contains information about the command line options specified on the remote server, if any.

◆ isProgressPending()

bool pqServer::isProgressPending ( ) const

Returns true if the client is waiting on some actions from the server that typically result in progress events.

◆ setHeartBeatTimeoutSetting()

static void pqServer::setHeartBeatTimeoutSetting ( int  msec)
static

Get/Set the application wide heart beat timeout setting.

Heartbeats are used in case of remote server connections to avoid the connection timing out due to inactivity. When set, the client send a heartbeat message to all servers every msec milliseconds.

◆ getHeartBeatTimeoutSetting()

static int pqServer::getHeartBeatTimeoutSetting ( )
static

◆ setMonitorServerNotifications()

void pqServer::setMonitorServerNotifications ( bool  )

enable/disable monitoring of server notifications.

◆ getRemainingLifeTime()

int pqServer::getRemainingLifeTime ( ) const

Get the server remaining life time in minutes.

◆ setRemainingLifeTime()

void pqServer::setRemainingLifeTime ( int  value)

Set the time (in minutes) remaining.

◆ nameChanged

void pqServer::nameChanged ( pqServerManagerModelItem )
signal

Fired when the name of the proxy is changed.

◆ fiveMinuteTimeoutWarning

void pqServer::fiveMinuteTimeoutWarning ( )
signal

Fired about 5 minutes before the server timesout.

This signal will not be fired at all if server timeout < 5 minutes. The server timeout is specified by –timeout option on the server process. This is not fired if timeout is not specified on the server process.

◆ finalTimeoutWarning

void pqServer::finalTimeoutWarning ( )
signal

Fired about 1 minute before the server timesout.

The server timeout is specified by –timeout option on the server process. This is not fired if timeout is not specified on the server process.

◆ serverSideDisconnected

void pqServer::serverSideDisconnected ( )
signal

Fired if any server side crash or disconnection occurred.

◆ HEARBEAT_TIME_SETTING_KEY()

static const char* pqServer::HEARBEAT_TIME_SETTING_KEY ( )
staticprotected

Returns the string key used for the heart beat time interval.

◆ setHeartBeatTimeout()

void pqServer::setHeartBeatTimeout ( int  msec)
protected

Set the heartbeat timeout for this instance of pqServer.

◆ sentFromOtherClient

void pqServer::sentFromOtherClient ( pqServer ,
vtkSMMessage msg 
)
signal

Allow user to listen messages from other clients.

But if you plan to push some state by for example calling the sendToOtherClients(vtkSMMessage*) slot, you MUST queued your slot. Otherwise your communication will not be sent to the server. Here is a code sample on how to connect to that signal:

QObject::connect( server, SIGNAL(sentFromOtherClient(vtkSMMessage*)), this, SLOT(onClientMessage(vtkSMMessage*)), Qt::QueuedConnection);

◆ triggeredMasterUser

void pqServer::triggeredMasterUser ( int  )
signal

Signal triggered when user information get updated.

◆ triggeredUserName

void pqServer::triggeredUserName ( int  ,
QString &   
)
signal

◆ triggeredUserListChanged

void pqServer::triggeredUserListChanged ( )
signal

◆ triggerFollowCamera

void pqServer::triggerFollowCamera ( int  )
signal

◆ sendToOtherClients

void pqServer::sendToOtherClients ( vtkSMMessage msg)
slot

Allow user to broadcast to other client a given message.

◆ heartBeat

void pqServer::heartBeat ( )
protectedslot

Called to send a heartbeat to the server.

◆ updateRemainingLifeTime

void pqServer::updateRemainingLifeTime ( )
protectedslot

Called to update the server life time.

◆ processServerNotification

void pqServer::processServerNotification ( )
protectedslot

Called when idle to look for server notification for collaboration purpose.

◆ onCollaborationCommunication

void pqServer::onCollaborationCommunication ( vtkObject ,
unsigned  long,
void *  ,
void *   
)
protectedslot

Called by vtkSMCollaborationManager when associated message happen.

This will convert the given parameter into vtkSMMessage and emit sentFromOtherClient(pqServer*,vtkSMMessage*) signal.

◆ onConnectionLost

void pqServer::onConnectionLost ( vtkObject ,
unsigned  long,
void *  ,
void *   
)
protectedslot

Called by vtkSMSessionClient is any communication error occurred with the server.

This usually mean that the server side is dead.


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