Client¶
HiveServer-> Client¶
-
class Client¶ Following are the properties that a Client class will contain.
Here are references to it’s properties:
-
HttpClient
client{ get; set; }¶ It is HttpClient object for communication with the Hive Server. It is initialized in client constructor.
-
String
host{ get; set; }¶ It is the base address of the Hive Server. It is initialized in client constructor.
-
String
port{ get; set; }¶ It is the port number of the Hive Server. It is initialized in client constructor.
-
String
url{ get; set; }¶ It is the url address of the Hive Server containing host and port number. It is initialized in client constructor.
Here are references to it’s methods:
-
public
Client()¶ It is the constructor of the class. It contains the initialization of the client, host, port and url variables.
-
public void
CreateAsset(String projectId, Models.Asset[] Asset, String userName)¶ It contains the functionality for the creation of Asset on the Hive Server. It also creates an asset file on disk. There is a boolean for checking either the environment is Windows or Linux
-
public async Task<Models.Assignment>
CreateAssignment(String projectId, String taskId, String assetId, String userId)¶ It creates Assignment on Hive Server according to the provided parameters that are project Id, task Id, asset Id, and user Id.
-
public async Task<Models.Project>
CreateProject(Models.Project project)¶ It is called for creating Project on the Hive Server. It accepts a project object so that it can create a project.
-
public async Task<Models.Task>
CreateTask(String projectId, Models.Task task)¶ It is called for creating Task on the Hive Server. Project Id and a task object are provided to it.
-
public async Task<List<Models.Project>>
GetAllProjects()¶ It is called to get all the projects from the Hive Server. There are two parameters: ‘from’ and ‘size’ to set the project’s objects quantity.
-
public async Task<List<Models.Asset>>
GetAssetAsync(String projectId)¶ It accepts a project Id and returns all Assets from the Hive Server that are associated with given project Id.
-
public async Task<Models.Asset>
GetAssetData(String projectId, String assetId)¶ It accepts project Id and an assets Id and returns the asset from the Hive Server that contains the provided project and asset Id.
-
public async Task<List<Models.Task>>
GetTasks(String projectId)¶ It accepts a project Id and then retrieves all tasks from Hive Server that are associated with provided project Id.
-
public async Task<String>
GetTasksData(String projectId, String taskId)¶ It accepts the project Id and a task Id and returns the task object from Hive Server related to the given project and task Id.
-
public async Task<List<Models.User>>
GetUserAsync(String projectId)¶ It accepts a project Id and returns all users object from Hive Server that are associated with this project.
-
public async Task<Models.User>
GetUserData(String projectId, String userId)¶ It accepts a project Id and a user Id and return user object from Hive Server that contain the provided project and user Id.
-
HttpClient