Class ServiceSettings

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class ServiceSettings
    extends Inventor
    implements java.lang.Cloneable
    Settings that define the rendering Service. A ServiceSettings object must be passed to the Service.open() method.

    • Constructor Detail

      • ServiceSettings

        public ServiceSettings()
        Constructor.
      • ServiceSettings

        public ServiceSettings​(ServiceSettings obj)
        Copy constructor.
    • Method Detail

      • enableSecureConnection

        @Deprecated(since="9.7.2")
        public void enableSecureConnection​(java.lang.String publicCertificateFilePath,
                                           java.lang.String privateKeyFilePath,
                                           ServiceSettings.SecurityProtocols enabledSecurityProtocols)
        Secures the connection between the server and the clients.
        Deprecated since Open Inventor 9720
        Use enableSecureConnection method instead.

        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. If the private key is protected by a passphrase, set the passphrase into the ServiceListener.onRequestedPrivateKeyPassphrase callback.

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

        @Deprecated(since="9.8.0")
        public void enableSecureConnection​(java.lang.String publicCertificateFilePath,
                                           java.lang.String privateKeyFilePath,
                                           int enabledSecurityProtocols)
        Deprecated.
        As of Open Inventor 9.8.0, use #enableSecureConnection(java.lang.String publicCertificateFilePath, java.lang.String privateKeyFilePath, java.util.EnumSet enabledSecurityProtocols) instead.
        Secures the connection between the server and the clients.
        Deprecated since Open Inventor 9800
        Use enableSecureConnection method instead.

        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. If the private key is protected by a passphrase, set the passphrase into the ServiceListener.onRequestedPrivateKeyPassphrase callback.

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

        @Deprecated(since="9.8.0")
        public ServiceSettings.Extensions getUsedExtensions()
        Deprecated.
        As of Open Inventor 9800. See documentation for more details.
        Gets the used Open Inventor extensions.
        Deprecated since Open Inventor 9800
        Use getOivUsedExtensions method instead.

        Returns:
        the bitmask of used Open Inventor extensions.
      • setUsedExtensions

        @Deprecated(since="9.8.0")
        public void setUsedExtensions​(ServiceSettings.Extensions extensions)
        Deprecated.
        As of Open Inventor 9800. See documentation for more details.
        Sets the Open Inventor extensions used in RemoteViz. In addition to one Open Inventor and one RemoteViz license, a license of each used extension will be required to start the service and will be checked out for each connected client.
        Deprecated since Open Inventor 9800
        Use setOivUsedExtensions method instead. The activation of VolumeVizLDM extension will lead to the activation of VolumeViz extension.

        Parameters:
        extensions - : the bitmask of the Open Inventor extensions used in RemoteViz. Many extensions can be activated by using the logical OR operator.
        For example : setUsedExtensions(VOLUMEVIZ | MESHVIZ)
      • clone

        public java.lang.Object clone()
      • enableSecureConnection

        public void enableSecureConnection​(java.lang.String publicCertificateFilePath,
                                           java.lang.String privateKeyFilePath)
        Calls enableSecureConnection(publicCertificateFilePath, privateKeyFilePath, java.util.EnumSet.of( ServiceSettings.SecurityProtocols.TLSv1_1, ServiceSettings.SecurityProtocols.TLSv1_2, ServiceSettings.SecurityProtocols.TLSv1_3 )).
      • getRunMode

        public ServiceSettings.RunModes getRunMode()
        Gets the run mode of the service. Default value is INVENTOR_SERVICE.

        Returns:
        the run mode used by the instance

      • getPrivateKeyFile

        public java.lang.String getPrivateKeyFile()
        Gets the private key used to sign the server key exchange between the client and the server.

        Returns:
        the path to the file containing the private key.

      • toArray

        public static ServiceSettings[] toArray​(long nativeArray,
                                                long length)
      • getPublicCertificateFile

        public java.lang.String getPublicCertificateFile()
        Gets the public certificate authenticating the server to the clients.

        Returns:
        the path to the file containing the certificate.

      • setIP

        public void setIP​(java.lang.String ip)
        Sets the IP address.
        IP version 4 (IPv4: X.X.X.X) and IP version 6 (IPv6: X.X.X.X.X.X.X.X) are supported. Default value is "127.0.0.1"
        To make the service accept connections on all interfaces, use "0.0.0.0".

        Parameters:
        ip - : the IP address used by the instance
      • getOivUsedExtensions

        public java.util.EnumSet<ServiceSettings.Extensions> getOivUsedExtensions()
        Gets the used Open Inventor extensions.

        Returns:
        the bitmask of used Open Inventor extensions.

      • getMonitoring

        public Monitoring getMonitoring()
        Gets the monitoring object which allows to manage metrics listeners that monitor states and performances of the service.

        Returns:
        the monitoring object.

      • getPort

        public int getPort()
        Gets the port of the service. Default value is 8080.

        Returns:
        the port used by the instance

      • getHostname

        public java.lang.String getHostname()
        Gets the current host name.

        Returns:
        the current host name

      • setOivUsedExtensions

        public void setOivUsedExtensions​(java.util.EnumSet<ServiceSettings.Extensions> extensions)
        Sets the Open Inventor extensions used by a RemoteViz application. Convenient method that will be used by Service.open() to check if all the licenses necessary to start the Service are available (necessary licenses are explained below) .

        RemoteViz and Open Inventor (if used) are protected by a license key mechanism that limits its use to specified computers or network environments based on a commercial agreement. Depending on the license agreement, license keys are floating licenses managed by a license server or an encrypted "master password" string (see SoLockManager).

        One RemoteViz license is required to start the service. (An SDK license for development/debugging or a Runtime license for deployment.)

        If the Service uses Open Inventor for rendering (runMode is not INDEPENDENT_SERVICE), then one Open Inventor license plus one license of each used extension is required to start the service. (An SDK license for development/debugging or a Runtime license for deployment.) If this method is called and licenses are missing, Service.open() will return false. If this method is not called, the licenses will not be checked until the first call to create an Open Inventor node. Alternatively the application can do explicit license checks by calling SoLicensesInfo.check() before opening the Service or creating any of the Open Inventor nodes. Note: Enabling the VolumeVizLDM extension automatically enables the VolumeViz extension.

        When using the run mode INDEPENDENT_SERVICE, this method has no effect, i.e., only one RemoteViz license will be required to start the service.

        Parameters:
        extensions - : the bitmask of the Open Inventor extensions used in RemoteViz. Many extensions can be activated by using the logical OR operator.
        For example : setUsedExtensions(VOLUMEVIZ | MESHVIZ)
      • setRunMode

        public void setRunMode​(ServiceSettings.RunModes runmode)
        Sets the run mode of the service. Default value is INVENTOR_SERVICE.

        Parameters:
        runmode - : the type of run mode used by the instance
      • enableSecureConnection

        public void enableSecureConnection​(java.lang.String publicCertificateFilePath,
                                           java.lang.String privateKeyFilePath,
                                           java.util.EnumSet<ServiceSettings.SecurityProtocols> enabledSecurityProtocols)
        Secures the connection between the server and the clients. RemoteViz uses the WebSocket protocol to enable communication between the client and the service. In a production environment, it is highly recommended to use secure WebSocket. Using a secure WebSocket connection improves confidentiality and reliability because the connection is encrypted with Transport Layer Security (TLS), which reduces the risk of a variety of attacks such as man-in-the-middle tampering with your data.

        The URL scheme used by the clients to connect to the service must be wss://

        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. If the private key is protected by a passphrase, set the passphrase into the ServiceListener.onRequestedPrivateKeyPassphrase callback.

        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.
      • getIP

        public java.lang.String getIP()
        Gets the IP address. Default value is "127.0.0.1".

        Returns:
        the IP address used by the instance

      • isSecureConnection

        public boolean isSecureConnection()
        Gets the SSL engine activation.

        Returns:
        true if the secure connection is enabled.

      • setPort

        public void setPort​(int port)
        Sets the port of the service. Default value is 8080.
        In case you are behind a firewall, please ensure your IT department configured the firewall to accommodate the selected port.

        Parameters:
        port - : the port used by the instance
      • getEnabledSecurityProtocols

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

        Returns:
        the bitmask of used security protocols.