public class NingClient extends java.lang.Object implements AsyncClient
| Constructor and Description |
|---|
NingClient()
Creates an uninitialized client.
|
NingClient(AsyncHttpClient asyncHttpClient)
Creates a client with a pre-configured ning client.
|
NingClient(ClientOptions options)
Creates a client with specified options.
|
| Modifier and Type | Method and Description |
|---|---|
<any> |
asyncSend(Request request)
Sends a request with default options.
|
<any> |
asyncSend(Request request,
RequestOptions options)
Sends a request with specified options.
|
void |
init(java.lang.String prefix,
java.util.Properties props,
Logger logger)
Initialize from properties.
|
Response |
send(Request request)
Sends a request with default options.
|
Response |
send(Request request,
RequestOptions options)
Sends a request with specified options.
|
void |
shutdown()
Releases resources, interrupts threads, etc.
|
public NingClient()
public NingClient(ClientOptions options)
options - The options.public NingClient(AsyncHttpClient asyncHttpClient)
asyncHttpClient - The ning client.public void init(java.lang.String prefix,
java.util.Properties props,
Logger logger)
throws InitializationException
init in interface Clientprefix - A prefix applied to all property names.props - The properties.logger - A logger.InitializationException - on initialization error.public Response send(Request request) throws java.io.IOException
Clientpublic Response send(Request request, RequestOptions options) throws java.io.IOException
Clientpublic <any> asyncSend(Request request)
AsyncClientasyncSend in interface AsyncClientrequest - The request.public <any> asyncSend(Request request, RequestOptions options)
AsyncClientasyncSend in interface AsyncClientrequest - The request.options - The request options.