Difference between revisions of "Motu Client Java"
From Gcube Wiki
(Created page with "= Usage = == Create a client == As a first step, you need to create a MotuClient object providing enough information to connect to the corresponding server: <source lang=...") |
(→Create a client) |
||
Line 1: | Line 1: | ||
= Usage = | = Usage = | ||
+ | |||
+ | == Configure your project == | ||
+ | |||
+ | Maven coordinates: | ||
+ | |||
+ | <source lang="xml"> | ||
+ | <dependency> | ||
+ | <groupId>org.gcube.dataanalysis</groupId> | ||
+ | <artifactId>motu-client</artifactId> | ||
+ | <version>[1.0.0, 2.0.0)</version> | ||
+ | </dependency> | ||
+ | </source> | ||
== Create a client == | == Create a client == |
Revision as of 17:35, 29 November 2017
Usage
Configure your project
Maven coordinates:
<dependency> <groupId>org.gcube.dataanalysis</groupId> <artifactId>motu-client</artifactId> <version>[1.0.0, 2.0.0)</version> </dependency>
Create a client
As a first step, you need to create a MotuClient object providing enough information to connect to the corresponding server:
MotuClient client = new MotuClient("server endpoint"); client.setUsername("username"); client.setPassword("password");
You can optionally specify the size of chunks to be downloaded. If not provided, the client will use the maximum size allowed by the server (currently most servers allow between 1 and 2 GB).
client.setPreferredDownloadSize(20*SizeUtils.MB);