Class SoRemoteVizClient

  • All Implemented Interfaces:
    SafeDisposable

    public class SoRemoteVizClient
    extends SoNode
    Client node enables to integrate RemoteViz into Open Inventor applications. This node is a RemoteViz client enabling software developers to easily integrate remote 3D interaction and visualization into their Open Inventor applications. It enables to establish a connection to a RemoteViz service so that display frames into an Open Inventor viewer.

    RemoteVizClient

    • Field Detail

      • connect

        public final SoSFBool connect
        Opens/Closes a connection between the client and the RemoteViz service.
        After being connected, the server-side onPendingCreateRenderArea callback will be triggered if the renderArea does not exist otherwise the server-side onPendingShareRenderArea callback will be triggered.
      • ipAddress

        public final SoSFString ipAddress
        Specifies the IP address of the RemoteViz Service to which the client will connect.
      • port

        public final SoSFUShort port
        Specifies the port of the RemoteViz Service to which the client will connect.
      • renderAreaName

        public final SoSFString renderAreaName
        Specifies the renderArea name to which the client will connect.
      • videoDecoders

        public final SoMFEnum<SoRemoteVizClient.VideoDecoderType> videoDecoders
        This setting allows you to specify a preference list of video decoders.
        The first decoder (among the decoders of the list) successfully initialized will be used to decode the video stream.
        If all decoders of the list fail to be initialized, the decoder VideoDecoder.OPENH264 will be used.
        . Default is OPENH264.
      • connectionParameters

        public final SoMFVec2String connectionParameters
        Connection parameters that will be sent to the RemoteViz service during the connection establishment. The container size will be sent to the service as RenderArea requested size. This behavior can be overriden by including the requested height ("requestedHeight") and the requested width ("requestedWidth") in the parameters. If the connection is accepted, a server-side onRequestedSize callback will be triggered.
      • displayMode

        public final SoSFEnum<SoRemoteVizClient.DisplayModes> displayMode
        This setting allows you to specify how to map the renderArea image (server-side) into the container (client-side).
        . Default is FIT.
    • Constructor Detail

      • SoRemoteVizClient

        public SoRemoteVizClient()
        Default constructor.
    • Method Detail

      • enableSecureConnection

        public void enableSecureConnection​(java.lang.String publicCertificateFilePath,
                                           java.lang.String privateKeyFilePath)
        Calls enableSecureConnection(publicCertificateFilePath, privateKeyFilePath, SoRemoteVizClient.SecurityProtocols.valueOf( SoRemoteVizClient.SecurityProtocols.TLSv1_1.getValue() | SoRemoteVizClient.SecurityProtocols.TLSv1_2.getValue() | SoRemoteVizClient.SecurityProtocols.TLSv1_3.getValue() ), "").
      • enableSecureConnection

        public void enableSecureConnection​(java.lang.String publicCertificateFilePath,
                                           java.lang.String privateKeyFilePath,
                                           SoRemoteVizClient.SecurityProtocols enabledSecurityProtocols)
        Calls enableSecureConnection(publicCertificateFilePath, privateKeyFilePath, enabledSecurityProtocols, "").
      • sendMessage

        public void sendMessage​(SoCpuBufferObject buffer)
        Sends a binary message to the server. After being sent, the server-side onReceivedMessage callback will be triggered.

        Parameters:
        buffer - : buffer to be sent
      • sendMessage

        public void sendMessage​(java.lang.String message)
        Sends a text message to the server. After being sent, the server-side onReceivedMessage callback will be triggered.

        Parameters:
        message - : message to be sent
      • enableSecureConnection

        public void enableSecureConnection​(java.lang.String publicCertificateFilePath,
                                           java.lang.String privateKeyFilePath,
                                           SoRemoteVizClient.SecurityProtocols enabledSecurityProtocols,
                                           java.lang.String privateKeyPassphrase)
        Secures the connection between the client and the server.

        Parameters:
        publicCertificateFilePath - : Path to a file containing the public certificate used to authenticate the server to the clients. The certificate has to be a PEM ("Privacy Enhanced Mail") encoded certificate.

        privateKeyFilePath - : Path to a file containing the private key used to sign the server key exchange between the client and the server.

        enabledSecurityProtocols - : Defines the security protocols used to secure the exchange between the client and the server. By default, TLSv1.1, TLSv1.2 and TLSv1.3 protocols are enabled. A bitmask of the security protocols is used. Many security protocols can be enabled by using the logical OR operator.

        privateKeyPassphrase - : The passphrase that protect the private key. Security warning !! DO NOT hard-code the passphrase !!
        Read it from a SECURE location on your system.

      • isImageStreamingSupported

        public boolean isImageStreamingSupported()
        Checks if the client supports image streaming.

        Returns:
        true if the client supports image streaming

      • getContainerSize

        public SbVec2s getContainerSize()
        Returns the size of the renderArea container.

        Returns:
        the renderArea container size

      • getVideoDecoder

        public SoRemoteVizClient.VideoDecoderType getVideoDecoder()
        Returns the video decoder that has been successfully initialized and currently used by the client to decode video stream.
        This information is known after receiving the first frame. For instance, you can retrieve this information in the event callback onDecodedFrame.
        If this method is called before receiving the first frame, it will return VideoDecoder.NONE. If the streaming mode is not StreamingMode.VIDEO (

        getStreamingMode), this method will return VideoDecoder.NONE.

        Returns:
        video decoder used by the client.

        See Also:
        VideoDecoder
      • isVideoStreamingSupported

        public boolean isVideoStreamingSupported()
        Checks if the client supports video streaming.

        Returns:
        true if the client supports video streaming

      • getRenderAreaSize

        public SbVec2s getRenderAreaSize()
        Returns the size of the renderArea managed by the RemoteViz service.

        Returns:
        the renderArea size

      • getEnabledSecurityProtocols

        public SoRemoteVizClient.SecurityProtocols getEnabledSecurityProtocols()
        Gets the security procotols used in RemoteViz.

        Returns:
        the bitmask of used security protocols.

      • getStreamingMode

        public SoRemoteVizClient.StreamingModes getStreamingMode()
        Returns the type of streaming currently used by the client.
        This information is known after receiving the first frame. For instance, you can retrieve this information in the event callback onDecodedFrame.
        If this method is called before receiving the first frame, it will return StreamingMode.UNKNOWN.
        Returns:
        streaming mode used by the client.

        See Also:
        StreamingMode
      • requestRenderAreaSize

        public void requestRenderAreaSize​(SbVec2s size)
        Sends a request to resize the renderArea associated with the connection. A server-side onRequestedSize event will be triggered.
        If the renderarea size is modified in the server-side onRequestSize callback, the client-side resize event will be triggered.

        Parameters:
        size - : renderArea size
      • isSecureConnection

        public boolean isSecureConnection()
        Gets the SSL engine activation.

        Returns:
        true if the secure connection is enabled.