java: Switch to the new init/login scheme

The new scheme works like this:

 - init() function is synchronous, it takes the configuration
   parameters and, if isLoggedIn() is true then it starts Syncbase. It
   expects that the database, userdata syncgroup, etc. to already
   exist.

 - isLoggedIn() function is synchronous and it requires init() to have
   been called.

 - login() function is asynchronous, does the oauth token to blessing
   exchange, it requires init() to have been called, starts the
   Syncbase and creates the expected default state (create the default
   database, userdata syncgroup, etc).

 - database() function is synchronous, requires that isLoggedIn() is
   true and returns a Database object right away.

This change only partially implements the above plan (the login is not
wired yet).

The C API gets two new functions:

  - v23_syncbase_Serve(cErr *C.v23_syncbase_VError)
  - v23_syncbase_IsLoggedIn(cIsLoggedIn *C.v23_syncbase_Bool)

The Java high-level API doesn't have the inner DatabaseCallback and
have instead an inner LoginCallback.

This change also switches the tests for core/ and internal/ to
init/shutdown a single time. These makes the tests much faster.

MultiPart: 1/2
Change-Id: Ib6411ec9c2e7b9fe1f7dd8f22880012425396515
3 files changed
tree: 627881f813ef7cfaae11a4d7a618d040d3e08359
  1. cmd/
  2. examples/
  3. internal/
  4. lib/
  5. runtime/
  6. services/
  7. test/
  8. .gitignore
  9. AUTHORS
  10. CONTRIBUTING.md
  11. CONTRIBUTORS
  12. envvar.go
  13. envvar_test.go
  14. LICENSE
  15. PATENTS
  16. README.md
  17. VERSION
README.md

Vanadium

This repository contains a reference implementation of the Vanadium APIs.

Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.