Added a Java binding for preconnecting.