@nicoruti nicoruti released this Jan 27, 2014 · 1304 commits to master since this release

Assets 3

The first release of the Hive2Hive library. It does not contain all features yet, but the basic private file operations. This means, that it's possible to

  • register a new user
  • login as a registered user
  • add, delete, move, update a file, folder or a whole (recursive) file tree
  • logout when the user is done

When a user is logged in on multiple clients, they automatically synchronize in real-time, meaning that notifications are sent around when something has changed.

Note that there is also a (beta) function to share a folder (with all including children). This function is not well tested yet, but kept in this release to soft-soap you. This great feature and more are planned for the next release.

Here's the short basics how to use it:

// use the builder to create a Hive2Hive node
// create a master peer
H2HNodeBuilder masterBuilder = new H2HNodeBuilder().setIsMaster(true);
IH2HNode masterNode =;
// or a client peer
H2HNodeBuilder clientBuilder = new H2HNodeBuilder().setIsMaster(false).setBootstrapAddress(InetAddress.getByName(""));
IH2HNode clientNode =;

Once you have created and connected a node, you can start using it:

// register a new user
UserCredentials userCredentials = new UserCredentials("", "password", "1234");
IProcess register = clientNode.getUserManagement().register(userCredentials);
// pause & continue the process
// add listeners that are called when finished
register.addListener(new IProcessListener() {
    public void onSuccess() {
    public void onFail(Exception exception) {
        System.out.println("Failed! Reason: " + exception.getMessage());