Provides the support classes necessary to connect to the Lookup/Ibis web service and invoke API methods.
Provides DTO classes for transferring data from the server to client in the web service API.
Contains auto-generated classes which contain all the available methods in the Lookup/Ibis web service API.
This document describes the Lookup/Ibis web service client API, which is intended to simplify the task of using the web service from Java client applications.
This client library provides code to automatically handle the following tasks:
All of the API methods are contained in
classes in the
uk.ac.cam.ucs.ibis.methods package, for example
which contains methods relating to or returning people, and
which contains methods relating to or returning institutions. All
XxxMethods classes are auto-generated, to keep
them in sync with the matching server methods.
Some typical code using this API might look something like this:
import uk.ac.cam.ucs.ibis.client.*; import uk.ac.cam.ucs.ibis.dto.*; import uk.ac.cam.ucs.ibis.methods.*; ClientConnection conn = IbisClientConnection.createTestConnection(); InstitutionMethods im = new InstitutionMethods(conn); List<IbisPerson> people = im.getMembers("UIS", null); for (IbisPerson person : people) System.out.println(person.visibleName);
Note that it is typically only necessary to create a single instance
objects, and then re-use them throughout your Java application.
Once created and initialised, the
XxxMethods classes are safe to use from multiple
simultaneous threads (for example in a web server).
Note, however, that
ClientConnection.setPassword() are not thread safe. These methods
are regarded as part of the initialisation of the connection, and
should typically only be used once on startup. If you need to
regularly switch between users, then use a separate
ClientConnection per user or per thread (and separate