#include <RemoteViz/Rendering/ServiceListener.h>
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 | onDisposedRenderArea (const std::string &renderAreaId) |
virtual void | onConnectedClient (const std::string &clientId, NetworkPerformance *networkPerformance) |
virtual void | onInitializedClient (Client *client, NetworkPerformance *networkPerformance) |
virtual void | onDisconnectedClient (const std::string &clientId) |
virtual void | onMissingLicense (const std::string &renderAreaId, ConnectionParameters *parameters) |
virtual std::string | onRequestedPrivateKeyPassphrase () |
This virtual class enables you to manage the rendering Service.
virtual RemoteViz::Rendering::ServiceListener::~ServiceListener | ( | ) | [virtual] |
Destructor.
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
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
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.
Default behavior : do nothing
renderAreaId | : ID identifying the disposed renderArea |
virtual void RemoteViz::Rendering::ServiceListener::onInitializedClient | ( | Client * | client, | |
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).
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
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 client is about connecting and a license is missing.
In this callback, if you release one license, the new client will then be connected. Otherwise, a LICENSE disconnect message will be sent to the client.
IMPORTANT: This callback must not contain any calls to the OpenInventor library.
RemoteViz is protected by the Open Inventor license key mechanism limiting its usage to specified computers or network environments based on commercial agreements. RemoteViz uses floating license. For each connected client to a RemoteViz service, it requires one Open Inventor license, one RemoteViz license and if Open inventor extensions are used in the RemoteViz service, a license of the extension is also required for each connected client.
Default behavior : do nothing
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.
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 NULL. | |
parameters | : field-value pairs included in the url during the client connection. See connectTo function in RemoteVizRenderArea. |
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.
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 NULL. | |
parameters | : field-value pairs included in the url during the client connection. See connectTo function in RemoteVizRenderArea. |
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.
Default behavior : returns an empty string.