Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

StoreClient

Introduction

DuraCloud provides access to files stored in cloud storage systems through an application called DuraStore. DuraStore is installed and running on your DuraCloud instance and can be accessed via a REST interface. In order to aid Java developers in communicating with DuraStore, a Java client, called StoreClient was written.

Using

...

the client

To use the StoreClientStoreClinet, you will need all of the jars included in the libs directory of the download below to be available on your classpath. You will then be able to write code using the provided Javadocs to interact with the StoreClient.

Example Client

An example Java class has been provided to assist in set up and testing, as well as a starting point for writing your client code. The example client (found in ExampleClient.java) includes a simple main class to print out the list of spaces and space metadata available in your DuraStore account. To run the example:

  • Extract the store-client zip file
  • Update the HOST, PORT, USERNAME, and PASSWORD constant values in ExampleClient.java as needed to connect to your DuraCloud instance.
  • Make sure Ant is available on your path and type "ant" to compile the example.
  • Type "ant run" to run the example, which will print space names and metadata to the console.

ServiceClient

Introduction

DuraCloud provides management capabilities to deploy, undeploy, configure, gain status, etc the services within DuraCloud through an application called DuraService. DuraService is installed and running on your DuraCloud instance and can be accessed via a REST interface. In order to aid Java developers in communicating with DuraService, a Java client, called ServiceClient was written.

Downloads

...

to include the necessary dependencies. This is best done using Maven, as follows:

StoreClient

Code Block
<dependency>
  <groupId>org.duracloud</groupId>
  <artifactId>storeclient</artifactId>
  <version>{duracloud-version}</version>
</dependency>

Example code

StoreClient

An example Maven-based project which provides examples for using the storeclient can be found on Github here: https://github.com/duracloud/rest-client-example

...