Class ServiceSettings
- All Implemented Interfaces:
Cloneable
Service
.
A ServiceSettings
object must be passed to the Service.open()
method.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Each enumeration represents an Open Inventor extension.static enum
The run mode is used to change the behaviour of the RemoteViz execution in three environments.static enum
Each enumeration represents a security protocol.Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionclone()
void
enableSecureConnection
(String publicCertificateFilePath, String privateKeyFilePath) Calls enableSecureConnection(publicCertificateFilePath, privateKeyFilePath, java.util.EnumSet.of( ServiceSettings.SecurityProtocols.TLSv1_1, ServiceSettings.SecurityProtocols.TLSv1_2, ServiceSettings.SecurityProtocols.TLSv1_3 )).void
enableSecureConnection
(String publicCertificateFilePath, String privateKeyFilePath, int enabledSecurityProtocols) Deprecated.void
enableSecureConnection
(String publicCertificateFilePath, String privateKeyFilePath, ServiceSettings.SecurityProtocols enabledSecurityProtocols) Deprecated.As of Open Inventor 9.7.2, useenableSecureConnection(java.lang.String publicCertificateFilePath, java.lang.String privateKeyFilePath, int enabledSecurityProtocols)
instead.void
enableSecureConnection
(String publicCertificateFilePath, String privateKeyFilePath, EnumSet<ServiceSettings.SecurityProtocols> enabledSecurityProtocols) Secures the connection between the server and the clients.Gets the security procotols used in RemoteViz.Gets the current host name.getIP()
Gets the IP address.Gets the monitoring object which allows to manage metrics listeners that monitor states and performances of the service.Gets the used Open Inventor extensions.int
getPort()
Gets the port of the service.Gets the private key used to sign the server key exchange between the client and the server.Gets the public certificate authenticating the server to the clients.Gets the run mode of the service.Deprecated.As of Open Inventor 9800.boolean
Gets the SSL engine activation.void
Sets the IP address.void
setOivUsedExtensions
(EnumSet<ServiceSettings.Extensions> extensions) Sets the Open Inventor extensions used by a RemoteViz application.void
setPort
(int port) Sets the port of the service.void
setRunMode
(ServiceSettings.RunModes runmode) Sets the run mode of the service.void
setUsedExtensions
(ServiceSettings.Extensions extensions) Deprecated.As of Open Inventor 9800.void
setValue
(ServiceSettings copyFrom) static ServiceSettings[]
toArray
(long nativeArray, long length) Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Constructor Details
-
ServiceSettings
public ServiceSettings()Constructor. -
ServiceSettings
Copy constructor.
-
-
Method Details
-
enableSecureConnection
@Deprecated(since="9.7.2") public void enableSecureConnection(String publicCertificateFilePath, String privateKeyFilePath, ServiceSettings.SecurityProtocols enabledSecurityProtocols) Deprecated.As of Open Inventor 9.7.2, useenableSecureConnection(java.lang.String publicCertificateFilePath, java.lang.String privateKeyFilePath, int enabledSecurityProtocols)
instead.Secures the connection between the server and the clients.
Deprecated since Open Inventor 9720
UseenableSecureConnection
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 theServiceListener.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(String publicCertificateFilePath, String privateKeyFilePath, int enabledSecurityProtocols) Deprecated.Secures the connection between the server and the clients.
Deprecated since Open Inventor 9800
UseenableSecureConnection
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 theServiceListener.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.As of Open Inventor 9800. See documentation for more details.Gets the used Open Inventor extensions.
Deprecated since Open Inventor 9800
Useinvalid reference
getOivUsedExtensions
- Returns:
- the bitmask of used Open Inventor extensions.
-
setUsedExtensions
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
Useinvalid reference
setOivUsedExtensions
- 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
-
enableSecureConnection
Calls enableSecureConnection(publicCertificateFilePath, privateKeyFilePath, java.util.EnumSet.of( ServiceSettings.SecurityProtocols.TLSv1_1, ServiceSettings.SecurityProtocols.TLSv1_2, ServiceSettings.SecurityProtocols.TLSv1_3 )). -
getRunMode
Gets the run mode of the service. Default value is INVENTOR_SERVICE.
- Returns:
- the run mode used by the instance
-
setValue
-
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
-
getPublicCertificateFile
Gets the public certificate authenticating the server to the clients.- Returns:
- the path to the file containing the certificate.
-
setIP
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
Gets the used Open Inventor extensions.
- Returns:
- the bitmask of used Open Inventor extensions.
-
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
Gets the current host name.
- Returns:
- the current host name
-
setOivUsedExtensions
Sets the Open Inventor extensions used by a RemoteViz application. Convenient method that will be used byService.open()
to check if all the licenses necessary to start theService
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 callingSoLicensesInfo.check()
before opening theService
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
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(String publicCertificateFilePath, String privateKeyFilePath, 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 theServiceListener.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
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
Gets the security procotols used in RemoteViz.
- Returns:
- the bitmask of used security protocols.
-
enableSecureConnection(java.lang.String publicCertificateFilePath, java.lang.String privateKeyFilePath, java.util.EnumSet<ServiceSettings.SecurityProtocols> enabledSecurityProtocols)
instead.