Async java

Add java support for async API.  Includes a test case that is similar to python's test_async01.py.