RemoteViz::Rendering::ServiceListener Class Reference
[RemoteViz]

RemoteViz More...

#include <RemoteViz/Rendering/ServiceListener.h>

Inheritance diagram for RemoteViz::Rendering::ServiceListener:
medicalRemoteMPRListener simpleMedicalRemoteListener

List of all members.

Public Member Functions

virtual ~ServiceListener ()
virtual bool onPendingCreateRenderArea (const std::string &renderAreaId, unsigned int &width, unsigned int &height, RenderAreaHardware *renderAreaHardware, Client *client, ConnectionParameters *parameters)
virtual bool onPendingShareRenderArea (RenderArea *renderArea, Client *client, ConnectionParameters *parameters)
virtual void onInstantiatedRenderArea (RenderArea *renderArea)
virtual void onDisposingRenderArea (RenderArea *renderArea)
virtual void onDisposedRenderArea (const std::string &renderAreaId)
virtual void onConnectedClient (const std::string &clientId, NetworkPerformance *networkPerformance)
virtual void onInitializedClient (Client *client, const NetworkPerformance *networkPerformance)
virtual void onDisconnectedClient (const std::string &clientId)
virtual void onMissingLicense (const std::string &renderAreaId, ConnectionParameters *parameters)
virtual std::string onRequestedPrivateKeyPassphrase ()

Detailed Description

RemoteViz

This virtual class enables an application to receive notifications from the rendering Service.

A typical sequence of calls is:


Constructor & Destructor Documentation

virtual RemoteViz::Rendering::ServiceListener::~ServiceListener (  )  [virtual]

Destructor.


Member Function Documentation

virtual void RemoteViz::Rendering::ServiceListener::onConnectedClient ( const std::string &  clientId,
NetworkPerformance networkPerformance 
) [virtual]

Triggered when a client is connected to the service.



Default behavior : do nothing

Parameters:
clientId : ID identifying the client
networkPerformance : network performance for the client.
Network calibration can be enabled or disabled from this parameter. (see NetworkPerformance::enableCalibration and NetworkPerformance::setMaxCalibrationDuration)
virtual void RemoteViz::Rendering::ServiceListener::onDisconnectedClient ( const std::string &  clientId  )  [virtual]

Triggered when a client is disconnected from the service.



Default behavior : do nothing

Parameters:
clientId : ID identifying the client
virtual void RemoteViz::Rendering::ServiceListener::onDisposedRenderArea ( const std::string &  renderAreaId  )  [virtual]

Triggered when a renderArea has been disposed.

See RenderArea::closeConnectionsAndDispose. This listener is called after onDisposingRenderArea.

Default behavior : do nothing

Parameters:
renderAreaId : ID identifying the disposed renderArea
virtual void RemoteViz::Rendering::ServiceListener::onDisposingRenderArea ( RenderArea renderArea  )  [virtual]

Triggered before a renderArea is disposed.

See RenderArea::closeConnectionsAndDispose. This listener is called before onDisposedRenderArea.

Default behavior : do nothing

Parameters:
renderArea : pointer to the renderArea
virtual void RemoteViz::Rendering::ServiceListener::onInitializedClient ( Client client,
const NetworkPerformance networkPerformance 
) [virtual]

Triggered when a client is initialized.



Default behavior : If the network performance calibration is enabled, the client bandwidth value (ClientSettings::setBandwidth) is set to the estimated network bandwidth value (NetworkPerformance::getBandwidth).

Parameters:
client : client that is being connected to the service.
networkPerformance : network performance for the client.
Network performance measures can be retrieved. (see NetworkPerformance::getBandwidth and NetworkPerformance::getLatency)
virtual void RemoteViz::Rendering::ServiceListener::onInstantiatedRenderArea ( RenderArea renderArea  )  [virtual]

Triggered when a renderArea has been instantiated.



Default behavior : do nothing

Parameters:
renderArea : pointer to the instantiated renderArea

Reimplemented in medicalRemoteMPRListener, and simpleMedicalRemoteListener.

virtual void RemoteViz::Rendering::ServiceListener::onMissingLicense ( const std::string &  renderAreaId,
ConnectionParameters parameters 
) [virtual]

Triggered when a new connection is requested and a RemoteViz license was not found.

In this callback, if you release one RemoteViz license (for instance, closing another connection), the new connection will then be opened. Otherwise, a LICENSE disconnect message will be sent to the client (which can choose to notify the user).

IMPORTANT: This callback is executed in a separate thread.

RemoteViz is protected by a license key mechanism limiting its usage to specified computers or network environments based on commercial agreements. RemoteViz uses floating licenses managed by a license server or an encrypted "master password" string (see SoLockManager).

Default behavior : Post an error message.

virtual bool RemoteViz::Rendering::ServiceListener::onPendingCreateRenderArea ( const std::string &  renderAreaId,
unsigned int &  width,
unsigned int &  height,
RenderAreaHardware renderAreaHardware,
Client client,
ConnectionParameters parameters 
) [virtual]

Triggered when a connection is pending and the requested renderArea does not exist.



Default behavior : accept the connection by returning true.

Parameters:
renderAreaId : ID identifying the renderArea requested by the client
width : client requested width if the connection parameters contain this information, otherwise it's the renderArea default width. This value can be modified, it determines the created RenderArea width.
height : client requested height if the connection parameters contain this information, otherwise it's the renderArea default height. This value can be modified, it determines the created RenderArea height.
renderAreaHardware : hardware settings used to compute the render.
client : client that is being connected to the service. If the client does not exist yet, the pointer value will be nullptr.
parameters : field-value pairs included in the url during the client connection. See connectTo function in RemoteVizRenderArea.
Returns:
true if the connection is accepted. The renderArea will be created.
Otherwise returns false. In this case, the client will be notified by an REFUSED disconnect message.
If there are many listeners, the logical operator OR will be applied on all the returned value of listeners.
If there are no listeners to call, the connection will be accepted.
virtual bool RemoteViz::Rendering::ServiceListener::onPendingShareRenderArea ( RenderArea renderArea,
Client client,
ConnectionParameters parameters 
) [virtual]

Triggered when a connection is pending and the requested renderArea exists.



Default behavior : accept the connection by returning true.

Parameters:
renderArea : pointer to the renderArea
client : client that is being connected to the service. If the client does not exist yet, the pointer value will be nullptr.
parameters : field-value pairs included in the url during the client connection. See connectTo function in RemoteVizRenderArea.
Returns:
true if the connection is accepted, otherwise returns false. In this case, the client will be notified by an REFUSED disconnect message.
If there are many listeners, the logical operator OR will be applied on all the returned value of listeners.
If there are no listeners to call, the connection will be accepted.
virtual std::string RemoteViz::Rendering::ServiceListener::onRequestedPrivateKeyPassphrase (  )  [virtual]

Triggered when the secure connection is enabled.

This callback has to return the private key passphrase.

If the private key does not contain a passphrase, do not implement this callback. The default implementation will return an empty string.

Security warning !! DO NOT hard-code the passphrase into this callback !!
Read it from a SECURE location on your system.

See also:
ServiceSettings::enableSecureConnection

Default behavior : returns an empty string.


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

Open Inventor Toolkit reference manual, generated on 19 May 2020
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/