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

RemoteViz More...

#include <RemoteViz/Rendering/ServiceListener.h>

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 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 ()

Detailed Description

RemoteViz

This class can be overridden by an application to receive notifications from the rendering Service.


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.

Default behavior : do nothing

Parameters:
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).

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 : the instantiated renderArea
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.

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, this parameter will be null.
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 : the requested renderArea
client : client that is being connected to the service. If the client does not exist yet, this parameter will be null.
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 18 Jul 2022
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/