Module com.gluonhq.cloudlink.client
Class DataClientBuilder
- java.lang.Object
- 
- com.gluonhq.cloudlink.client.data.DataClientBuilder
 
- 
 public class DataClientBuilder extends Object A utility class for buildingDataClientinstances.
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedDataClientBuilder()Default constructor
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DataClientBuilderauthenticateWith(UserClient userClient)Specifies that authentication should be enabled for the DataClient instance that will be constructed by this builder.DataClientbuild()Make an instance of DataClient based on the properties set on this builder.static DataClientBuildercreate()Create a new instance of DataClientBuilder that can be used to build instances of DataClient.DataClientBuilderoperationMode(OperationMode operationMode)Set the value of the operation mode for the DataClient instance constructed by this builder.
 
- 
- 
- 
Method Detail- 
createpublic static DataClientBuilder create() Create a new instance of DataClientBuilder that can be used to build instances of DataClient.- Returns:
- a new instance of DataClientBuilder
 
 - 
authenticateWithpublic DataClientBuilder authenticateWith(UserClient userClient) Specifies that authentication should be enabled for the DataClient instance that will be constructed by this builder. When accessing data, the provided UserClient will be used to ensure that an authenticated user is available. When a UserClient is not set, the authentication process will not be started when accessing data.- Parameters:
- userClient- the instance of the UserClient to use for authentication
- Returns:
- A reference to this builder.
 
 - 
operationModepublic DataClientBuilder operationMode(OperationMode operationMode) Set the value of the operation mode for the DataClient instance constructed by this builder. When not specified, the default value isOperationMode.CLOUD_FIRST.Note: when the cloudlink configuration file is not provided, the DataClient will always fall back to OperationMode.LOCAL_ONLY.- Parameters:
- operationMode- the operation mode used when working with data
- Returns:
- A reference to this builder.
- See Also:
- DataClient.getOperationMode()
 
 - 
buildpublic DataClient build() Make an instance of DataClient based on the properties set on this builder.- Returns:
- The constructed DataClient instance.
 
 
- 
 
-