public interface ClientConnection
| Modifier and Type | Interface and Description |
|---|---|
static class |
ClientConnection.Method
Enumeration of supported HTTP methods.
|
| Modifier and Type | Method and Description |
|---|---|
IbisResult |
invokeMethod(ClientConnection.Method method,
String path,
String[] pathParams,
Object[] queryParams,
Object[] formParams)
Invoke a web service GET, POST, PUT or DELETE method.
|
IbisResult |
invokeMethod(String path,
String[] pathParams,
Object[] queryParams)
Invoke a web service GET method.
|
void |
setPassword(String password)
Set the password to use when connecting to the Lookup/Ibis web service.
|
void |
setUsername(String username)
Set the username to use when connecting to the Lookup/Ibis web service.
|
void setUsername(String username)
This method may be called at any time, and affects all subsequent access using this connection, but should not affect any other ClientConnection objects.
username - The username to connect as. This should either be
"anonymous" (the default) or the name of a group.void setPassword(String password)
password - The group password.IbisResult invokeMethod(String path, String[] pathParams, Object[] queryParams) throws IOException, JAXBException
The path should be the relative path to the method with standard
Java format specifiers for any path parameters, for example
"api/v1/person/%1$s/%2$s". Any path parameters specified
are then substituted into the path according to the standard Java
formatting rules.
path - The path to the method to invoke.pathParams - Any path parameters that should be inserted into
the path in place of any format specifiers.queryParams - Any query parameters to add as part of the URL's
query string. These are expected to come in pairs {name1, value1,
name2, value2, ...}.IOExceptionJAXBExceptionIbisResult invokeMethod(ClientConnection.Method method, String path, String[] pathParams, Object[] queryParams, Object[] formParams) throws IOException, JAXBException
The path should be the relative path to the method with standard
Java format specifiers for any path parameters, for example
"api/v1/person/%1$s/%2$s". Any path parameters specified
are then substituted into the path according to the standard Java
formatting rules.
method - The method type (GET, POST, PUT or DELETE).path - The path to the method to invoke.pathParams - Any path parameters that should be inserted into
the path in place of any format specifiers.queryParams - Any query parameters to add as part of the URL's
query string. These are expected to come in pairs {name1, value1,
name2, value2, ...}.formParams - Any form parameters to submit. These are expected
to come in pairs {name1, value1, name2, value2, ...}.IOExceptionJAXBException