Class ClientSettings
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.remoteviz.rendering.ClientSettings
-
public class ClientSettings extends Inventor
Settings that define aClient
. The application can query this object from aClient
object. AClient
object is passed to various listener methods such asServiceListener.onConnectedClient
andServiceListener.onInitializedClient
. Clients can also be queried usingService.getClient()
.ClientSettings
is used to set the network bandwidth to be used by theClient
. This value is not a hard limit, but higher values imply higher image quality and higher frames per second. The policy can be set for each connection (seeConnectionSettings.setFrameEncodingPolicy
). If a client has multiple connections, the bandwidth value for each connection is the client value divided by the number of connections.If network calibration is enabled (true by default, see
NetworkPerformance
), when a client connects to the service, RemoteViz will measure the available network bandwidth. The default implementation ofServiceListener.onInitializedClient()
will query this value (NetworkPerformance.getBandwidth
) and callsetBandwidth()
. If the application already knows the available network bandwidth, it is not necessary to enable calibration, simply callsetBandwidth()
.To measure available network bandwidth, RemoteViz has to cause network congestion, which implies that the user is blocked for a period of time. Therefore RemoteViz only measures network bandwidth once, when the client first connects (and only if calibration is enabled). Of course network bandwidth can change at any time. If the application has new information about the available network bandwidth,
setBandwidth()
can be called at any time.The application can query this object from a
Client
object. TheClient
object can obtained in, e.g., ServiceListener.onPendingCreateRenderArea().
-
-
Nested Class Summary
-
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBandwidth()
Gets the maximum network bandwidth to be used by the client.void
setBandwidth(int val)
Sets the network bandwidth to be used by the client.-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Method Detail
-
getBandwidth
public int getBandwidth()
Gets the maximum network bandwidth to be used by the client. Default value is 800Mbps.This value influences the quality and the number of interactive frames sent to the client (see
ConnectionSettings.setFrameEncodingPolicy
). The higher the value, the better the quality and the number of interactive frames.- Returns:
- the network bandwidth in bits per second
- See Also:
ServiceListener.onConnectedClient
-
setBandwidth
public void setBandwidth(int val)
Sets the network bandwidth to be used by the client. Default value is 800Mbps.This value is not a hard limit, but it influences the image quality and the number of interactive frames (frames per second) sent to the client. The policy can be set for each connection (see
ConnectionSettings.setFrameEncodingPolicy
). The higher the value, the better the image quality and the number of interactive frames. See discussion in the class description.If the client has more than one connection, the bandwidth allowed for each connection is this value divided by the number of connections.
- Parameters:
val
- : network bandwidth in bits per second- See Also:
ServiceListener.onConnectedClient
-
-