Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
vtkPVSessionServer Class Reference

vtkSMSessionServer is a session used on data and/or render servers. More...

#include <vtkPVSessionServer.h>

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

Public Types

enum  {
  PUSH = 12, PULL = 13, EXECUTE_STREAM = 14, GATHER_INFORMATION = 15,
  REGISTER_SI = 16, UNREGISTER_SI = 17, LAST_RESULT = 18, SERVER_NOTIFICATION_MESSAGE_RMI = 55624,
  CLIENT_SERVER_MESSAGE_RMI = 55625, CLOSE_SESSION = 55626, REPLY_GATHER_INFORMATION_TAG = 55627, REPLY_PULL = 55628,
  REPLY_LAST_RESULT = 55629, EXECUTE_STREAM_TAG = 55630
}
 Client-Server Communication tags. More...
 
typedef vtkPVSessionBase Superclass
 
- Public Types inherited from vtkPVSessionBase
enum  EventIds { RegisterRemoteObjectEvent = 1234, UnRegisterRemoteObjectEvent = 4321, ProcessingRemoteEnd = 2143, ConnectionLost = 6789 }
 
typedef vtkPVSession Superclass
 
- Public Types inherited from vtkPVSession
enum  ServerFlags {
  NONE = 0, DATA_SERVER = 0x01, DATA_SERVER_ROOT = 0x02, RENDER_SERVER = 0x04,
  RENDER_SERVER_ROOT = 0x08, SERVERS = DATA_SERVER | RENDER_SERVER, CLIENT = 0x10, CLIENT_AND_SERVERS = DATA_SERVER | CLIENT | RENDER_SERVER
}
 
typedef vtkSession Superclass
 
- Public Types inherited from vtkSession
typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
vtkMultiProcessControllerGetController (ServerFlags processType) override
 Returns the active controller used to communicate with the process. More...
 
virtual bool Connect (const char *url)
 Connects a remote server. More...
 
bool Connect ()
 Overload that constructs the url using the command line parameters specified and then calls Connect(url). More...
 
bool GetIsAlive () override
 Returns true is this session is active/alive/valid. More...
 
void OnClientServerMessageRMI (void *message, int message_length)
 
void OnCloseSessionRMI ()
 
void NotifyAllClients (const vtkSMMessage *) override
 Sends the message to all clients. More...
 
void NotifyOtherClients (const vtkSMMessage *) override
 Sends the message to all but the active client-session. More...
 
virtual void MultipleConnectionOn ()
 Enable or Disable multi-connection support. More...
 
virtual void MultipleConnectionOff ()
 Enable or Disable multi-connection support. More...
 
virtual void SetMultipleConnection (bool)
 Enable or Disable multi-connection support. More...
 
virtual bool GetMultipleConnection ()
 Enable or Disable multi-connection support. More...
 
virtual void DisableFurtherConnectionsOn ()
 Enable or Disable further connections in multiple connection mode. More...
 
virtual void DisableFurtherConnectionsOff ()
 Enable or Disable further connections in multiple connection mode. More...
 
virtual bool GetDisableFurtherConnections ()
 Enable or Disable further connections in multiple connection mode. More...
 
void SetDisableFurtherConnections (bool disable)
 Enable or Disable further connections in multiple connection mode. More...
 
void SetConnectID (int newConnectID)
 Set/Get the server connect-id. More...
 
int GetConnectID ()
 Set/Get the server connect-id. More...
 
- Public Member Functions inherited from vtkPVSessionBase
ServerFlags GetProcessRoles () override
 Returns a ServerFlags indicate the nature of the current processes. More...
 
vtkPVServerInformationGetServerInformation () override
 vtkPVServerInformation is an information-object that provides information about the server processes. More...
 
vtkMPIMToNSocketConnectionGetMPIMToNSocketConnection () override
 This is socket connection, if any to communicate between the data-server and render-server nodes. More...
 
virtual void PushState (vtkSMMessage *msg)
 Push the state message. More...
 
virtual void PullState (vtkSMMessage *msg)
 Pull the state message. More...
 
virtual void ExecuteStream (vtkTypeUInt32 location, const vtkClientServerStream &stream, bool ignore_errors=false)
 Execute a command on the given processes. More...
 
virtual const vtkClientServerStreamGetLastResult (vtkTypeUInt32 location)
 Returns the response of the ExecuteStream() call from the location. More...
 
virtual bool GatherInformation (vtkTypeUInt32 location, vtkPVInformation *information, vtkTypeUInt32 globalid)
 Gather information about an object referred by the globalid. More...
 
vtkSIProxyDefinitionManagerGetProxyDefinitionManager ()
 Get the ProxyDefinitionManager. More...
 
vtkSIObjectGetSIObject (vtkTypeUInt32 globalid)
 Returns a vtkSIObject or subclass given its global id, if any. More...
 
virtual void UnRegisterSIObject (vtkSMMessage *msg)
 Unregister server side object. More...
 
virtual void RegisterSIObject (vtkSMMessage *msg)
 Register server side object. More...
 
vtkObjectGetRemoteObject (vtkTypeUInt32 globalid)
 Return a vtkSMRemoteObject given its global id if any otherwise return nullptr;. More...
 
virtual void GetAllRemoteObjects (vtkCollection *collection)
 Allow the user to fill its vtkCollection with all RemoteObject This could be useful when you want to hold a reference to them to prevent any deletion across several method call. More...
 
virtual vtkTypeUInt32 GetNextGlobalUniqueIdentifier ()
 Provides the next available identifier. More...
 
virtual vtkTypeUInt32 GetNextChunkGlobalUniqueIdentifier (vtkTypeUInt32 chunkSize)
 Return the first Id of the requested chunk. More...
 
virtual bool IsProcessingRemoteNotification ()
 This property is used to discard ignore_synchronization proxy property when we load protobuf states. More...
 
virtual void UseSessionCoreOf (vtkPVSessionBase *other)
 Update internal session core in order to use the one used in another session. More...
 
virtual vtkPVSessionCoreGetSessionCore ()
 Provides access to the session core. More...
 
- Public Member Functions inherited from vtkPVSession
bool HasProcessRole (vtkTypeUInt32 flag)
 Convenience method that returns true if the current session is serving the indicated role on this process. More...
 
virtual bool IsMultiClients ()
 Allow anyone to know easily if the current session is involved in collaboration or not. More...
 
bool GetPendingProgress ()
 Returns true if the session is within a PrepareProgress() and CleanupPendingProgress() block. More...
 
virtual vtkPVProgressHandlerGetProgressHandler ()
 Provides access to the progress handler. More...
 
void PrepareProgress ()
 Should be called to begin/end receiving progresses on this session. More...
 
void CleanupPendingProgress ()
 Should be called to begin/end receiving progresses on this session. More...
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual vtkMTimeType GetMTime ()
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 

Static Public Member Functions

static vtkPVSessionServerNew ()
 
static int IsTypeOf (const char *type)
 
static vtkPVSessionServerSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkPVSessionBase
static int IsTypeOf (const char *type)
 
static vtkPVSessionBaseSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkPVSession
static int IsTypeOf (const char *type)
 
static vtkPVSessionSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkSession
static int IsTypeOf (const char *type)
 
static vtkSessionSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 
static vtkObjectBaseNew ()
 

Protected Member Functions

 vtkPVSessionServer ()
 
 ~vtkPVSessionServer () override
 
void GatherInformationInternal (vtkTypeUInt32 location, const char *classname, vtkTypeUInt32 globalid, vtkMultiProcessStream &)
 Called when client triggers GatherInformation(). More...
 
void SendLastResultToClient ()
 Sends the last result to client. More...
 
- Protected Member Functions inherited from vtkPVSessionBase
 vtkPVSessionBase ()
 
 vtkPVSessionBase (vtkPVSessionCore *coreToUse)
 
 ~vtkPVSessionBase () override
 
void RegisterRemoteObject (vtkTypeUInt32 globalid, vtkTypeUInt32 location, vtkObject *obj)
 Register a remote object. More...
 
void UnRegisterRemoteObject (vtkTypeUInt32 globalid, vtkTypeUInt32 location)
 Unregister a remote object. More...
 
vtkPVSessionCoreGetSessionCore () const
 Method used to migrate from one Session type to another by keeping the same vtkPVSessionCore. More...
 
void SetSessionCore (vtkPVSessionCore *)
 Method used to migrate from one Session type to another by keeping the same vtkPVSessionCore. More...
 
void PrepareProgressInternal () override
 Should be called to begin/end receiving progresses on this session. More...
 
void CleanupPendingProgressInternal () override
 Should be called to begin/end receiving progresses on this session. More...
 
virtual bool StartProcessingRemoteNotification ()
 Methods used to monitor if we are currently processing a server notification Only vtkSMSessionClient use the flag to disable ignore_synchronization properties from being updated. More...
 
virtual void StopProcessingRemoteNotification (bool previousValue)
 Methods used to monitor if we are currently processing a server notification Only vtkSMSessionClient use the flag to disable ignore_synchronization properties from being updated. More...
 
- Protected Member Functions inherited from vtkPVSession
 vtkPVSession ()
 
 ~vtkPVSession () override
 
virtual bool OnWrongTagEvent (vtkObject *caller, unsigned long eventid, void *calldata)
 Callback when any vtkMultiProcessController subclass fires a WrongTagEvent. More...
 
- Protected Member Functions inherited from vtkSession
 vtkSession ()
 
 ~vtkSession () override
 
virtual void Activate ()
 Subclasses must call this to mark the session active. More...
 
virtual void DeActivate ()
 Subclasses must call this to mark the session inactive. More...
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkMPIMToNSocketConnectionMPIMToNSocketConnection
 
bool MultipleConnection
 
bool DisableFurtherConnections
 
vtkInternalsInternal
 
- Protected Attributes inherited from vtkPVSessionBase
vtkPVSessionCoreSessionCore
 
bool ProcessingRemoteNotification
 Methods used to monitor if we are currently processing a server notification Only vtkSMSessionClient use the flag to disable ignore_synchronization properties from being updated. More...
 
- Protected Attributes inherited from vtkPVSession
vtkPVProgressHandlerProgressHandler
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Friends

class vtkInternals
 

Additional Inherited Members

- Protected Types inherited from vtkPVSession
enum  { EXCEPTION_EVENT_TAG = 31416 }
 

Detailed Description

vtkSMSessionServer is a session used on data and/or render servers.

It's designed for a process that works with a separate client process that acts as the visualization driver.

See also
vtkSMSessionClient

Definition at line 22 of file vtkPVSessionServer.h.

Member Typedef Documentation

◆ Superclass

Definition at line 26 of file vtkPVSessionServer.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Client-Server Communication tags.

Enumerator
PUSH 
PULL 
EXECUTE_STREAM 
GATHER_INFORMATION 
REGISTER_SI 
UNREGISTER_SI 
LAST_RESULT 
SERVER_NOTIFICATION_MESSAGE_RMI 
CLIENT_SERVER_MESSAGE_RMI 
CLOSE_SESSION 
REPLY_GATHER_INFORMATION_TAG 
REPLY_PULL 
REPLY_LAST_RESULT 
EXECUTE_STREAM_TAG 

Definition at line 65 of file vtkPVSessionServer.h.

Constructor & Destructor Documentation

◆ vtkPVSessionServer()

vtkPVSessionServer::vtkPVSessionServer ( )
protected

◆ ~vtkPVSessionServer()

vtkPVSessionServer::~vtkPVSessionServer ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkPVSessionServer* vtkPVSessionServer::New ( )
static

◆ GetClassName()

virtual const char* vtkPVSessionServer::GetClassName ( )
virtual

Reimplemented from vtkPVSessionBase.

◆ IsTypeOf()

static int vtkPVSessionServer::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual int vtkPVSessionServer::IsA ( const char *  type)
virtual

Reimplemented from vtkPVSessionBase.

◆ SafeDownCast()

static vtkPVSessionServer* vtkPVSessionServer::SafeDownCast ( vtkObject o)
static

◆ PrintSelf()

void vtkPVSessionServer::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Reimplemented from vtkPVSessionBase.

◆ GetController()

vtkMultiProcessController* vtkPVSessionServer::GetController ( ServerFlags  processType)
overridevirtual

Returns the active controller used to communicate with the process.

Value must be DATA_SERVER_ROOT or RENDER_SERVER_ROOT or CLIENT. But only the CLIENT do return something different than nullptr;

Reimplemented from vtkPVSession.

◆ Connect() [1/2]

virtual bool vtkPVSessionServer::Connect ( const char *  url)
virtual

Connects a remote server.

URL can be of the following format: cs://<pvserver-host>:<pvserver-port> cdsrs://<pvdataserver-host>:<pvdataserver-port>/<pvrenderserver-host>:<pvrenderserver-port> In both cases the port is optional. When not provided default pvserver/pvdataserver port // is 11111, while default pvrenderserver port is 22221. For reverse connect i.e. the client waits for the server to connect back, simply add "rc" to the protocol e.g. csrc://<pvserver-host>:<pvserver-port> cdsrsrc://<pvdataserver-host>:<pvdataserver-port>/<pvrenderserver-host>:<pvrenderserver-port> In this case, the hostname is irrelevant and is ignored.

◆ Connect() [2/2]

bool vtkPVSessionServer::Connect ( )

Overload that constructs the url using the command line parameters specified and then calls Connect(url).

◆ GetIsAlive()

bool vtkPVSessionServer::GetIsAlive ( )
overridevirtual

Returns true is this session is active/alive/valid.

Implements vtkSession.

◆ MultipleConnectionOn()

virtual void vtkPVSessionServer::MultipleConnectionOn ( )
virtual

Enable or Disable multi-connection support.

The MultipleConnection is only used inside the DATA_SERVER to support several clients to connect to it. By default, collaboration is not allowed (this->MultipleConnection = false)

◆ MultipleConnectionOff()

virtual void vtkPVSessionServer::MultipleConnectionOff ( )
virtual

Enable or Disable multi-connection support.

The MultipleConnection is only used inside the DATA_SERVER to support several clients to connect to it. By default, collaboration is not allowed (this->MultipleConnection = false)

◆ SetMultipleConnection()

virtual void vtkPVSessionServer::SetMultipleConnection ( bool  )
virtual

Enable or Disable multi-connection support.

The MultipleConnection is only used inside the DATA_SERVER to support several clients to connect to it. By default, collaboration is not allowed (this->MultipleConnection = false)

◆ GetMultipleConnection()

virtual bool vtkPVSessionServer::GetMultipleConnection ( )
virtual

Enable or Disable multi-connection support.

The MultipleConnection is only used inside the DATA_SERVER to support several clients to connect to it. By default, collaboration is not allowed (this->MultipleConnection = false)

◆ DisableFurtherConnectionsOn()

virtual void vtkPVSessionServer::DisableFurtherConnectionsOn ( )
virtual

Enable or Disable further connections in multiple connection mode.

By default, further connections are enabled. (this->DisableFurtherConnections = false)

◆ DisableFurtherConnectionsOff()

virtual void vtkPVSessionServer::DisableFurtherConnectionsOff ( )
virtual

Enable or Disable further connections in multiple connection mode.

By default, further connections are enabled. (this->DisableFurtherConnections = false)

◆ GetDisableFurtherConnections()

virtual bool vtkPVSessionServer::GetDisableFurtherConnections ( )
virtual

Enable or Disable further connections in multiple connection mode.

By default, further connections are enabled. (this->DisableFurtherConnections = false)

◆ SetDisableFurtherConnections()

void vtkPVSessionServer::SetDisableFurtherConnections ( bool  disable)

Enable or Disable further connections in multiple connection mode.

By default, further connections are enabled. (this->DisableFurtherConnections = false)

◆ SetConnectID()

void vtkPVSessionServer::SetConnectID ( int  newConnectID)

Set/Get the server connect-id.

Default is 0.

◆ GetConnectID()

int vtkPVSessionServer::GetConnectID ( )

Set/Get the server connect-id.

Default is 0.

◆ OnClientServerMessageRMI()

void vtkPVSessionServer::OnClientServerMessageRMI ( void *  message,
int  message_length 
)

◆ OnCloseSessionRMI()

void vtkPVSessionServer::OnCloseSessionRMI ( )

◆ NotifyAllClients()

void vtkPVSessionServer::NotifyAllClients ( const vtkSMMessage )
overridevirtual

Sends the message to all clients.

Implements vtkPVSessionBase.

◆ NotifyOtherClients()

void vtkPVSessionServer::NotifyOtherClients ( const vtkSMMessage )
overridevirtual

Sends the message to all but the active client-session.

Implements vtkPVSessionBase.

◆ GatherInformationInternal()

void vtkPVSessionServer::GatherInformationInternal ( vtkTypeUInt32  location,
const char *  classname,
vtkTypeUInt32  globalid,
vtkMultiProcessStream  
)
protected

Called when client triggers GatherInformation().

◆ SendLastResultToClient()

void vtkPVSessionServer::SendLastResultToClient ( )
protected

Sends the last result to client.

Friends And Related Function Documentation

◆ vtkInternals

friend class vtkInternals
friend

Definition at line 149 of file vtkPVSessionServer.h.

Member Data Documentation

◆ MPIMToNSocketConnection

vtkMPIMToNSocketConnection* vtkPVSessionServer::MPIMToNSocketConnection
protected

Definition at line 142 of file vtkPVSessionServer.h.

◆ MultipleConnection

bool vtkPVSessionServer::MultipleConnection
protected

Definition at line 144 of file vtkPVSessionServer.h.

◆ DisableFurtherConnections

bool vtkPVSessionServer::DisableFurtherConnections
protected

Definition at line 145 of file vtkPVSessionServer.h.

◆ Internal

vtkInternals* vtkPVSessionServer::Internal
protected

Definition at line 147 of file vtkPVSessionServer.h.


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