IN - The type that will be received by this clientOUT - The type that will be sent by this clientpublic abstract class HttpClient<IN,OUT> extends ReactorClient<IN,OUT,HttpChannel<IN,OUT>>
PINGstarted| Modifier | Constructor and Description |
|---|---|
protected |
HttpClient(Environment env,
Dispatcher dispatcher,
Codec<Buffer,IN,OUT> codec,
ClientSocketOptions options) |
| Modifier and Type | Method and Description |
|---|---|
Promise<? extends HttpChannel<IN,OUT>> |
delete(String url)
HTTP DELETE the passed URL.
|
Promise<? extends HttpChannel<IN,OUT>> |
delete(String url,
ReactorChannelHandler<IN,OUT,HttpChannel<IN,OUT>> handler)
HTTP DELETE the passed URL.
|
Promise<? extends HttpChannel<IN,OUT>> |
get(String url)
HTTP GET the passed URL.
|
Promise<? extends HttpChannel<IN,OUT>> |
get(String url,
ReactorChannelHandler<IN,OUT,HttpChannel<IN,OUT>> handler)
HTTP GET the passed URL.
|
Promise<? extends HttpChannel<IN,OUT>> |
post(String url,
ReactorChannelHandler<IN,OUT,HttpChannel<IN,OUT>> handler)
HTTP POST the passed URL.
|
Promise<? extends HttpChannel<IN,OUT>> |
put(String url,
ReactorChannelHandler<IN,OUT,HttpChannel<IN,OUT>> handler)
HTTP PUT the passed URL.
|
abstract Promise<? extends HttpChannel<IN,OUT>> |
request(Method method,
String url,
ReactorChannelHandler<IN,OUT,HttpChannel<IN,OUT>> handler)
Use the passed HTTP method to send to the given URL.
|
Promise<? extends HttpChannel<IN,OUT>> |
ws(String url)
WebSocket to the passed URL.
|
Promise<? extends HttpChannel<IN,OUT>> |
ws(String url,
ReactorChannelHandler<IN,OUT,HttpChannel<IN,OUT>> handler)
WebSocket to the passed URL.
|
doStart, startdoShutdown, doStart, getDefaultCodec, getDefaultDispatcher, getDefaultEnvironment, getDefaultPrefetchSize, shutdown, startprotected HttpClient(Environment env, Dispatcher dispatcher, Codec<Buffer,IN,OUT> codec, ClientSocketOptions options)
public final Promise<? extends HttpChannel<IN,OUT>> get(String url, ReactorChannelHandler<IN,OUT,HttpChannel<IN,OUT>> handler)
url - the target remote URLhandler - the ReactorChannelHandler to invoke on open channelPromise of the HttpChannel ready to consume for responsepublic final Promise<? extends HttpChannel<IN,OUT>> get(String url)
url - the target remote URLPromise of the HttpChannel ready to consume for responsepublic final Promise<? extends HttpChannel<IN,OUT>> post(String url, ReactorChannelHandler<IN,OUT,HttpChannel<IN,OUT>> handler)
url - the target remote URLhandler - the ReactorChannelHandler to invoke on open channelPromise of the HttpChannel ready to consume for responsepublic final Promise<? extends HttpChannel<IN,OUT>> put(String url, ReactorChannelHandler<IN,OUT,HttpChannel<IN,OUT>> handler)
url - the target remote URLhandler - the ReactorChannelHandler to invoke on open channelPromise of the HttpChannel ready to consume for responsepublic final Promise<? extends HttpChannel<IN,OUT>> delete(String url, ReactorChannelHandler<IN,OUT,HttpChannel<IN,OUT>> handler)
url - the target remote URLhandler - the ReactorChannelHandler to invoke on open channelPromise of the HttpChannel ready to consume for responsepublic final Promise<? extends HttpChannel<IN,OUT>> delete(String url)
url - the target remote URLPromise of the HttpChannel ready to consume for responsepublic final Promise<? extends HttpChannel<IN,OUT>> ws(String url)
url - the target remote URLPromise of the HttpChannel ready to consume for responsepublic final Promise<? extends HttpChannel<IN,OUT>> ws(String url, ReactorChannelHandler<IN,OUT,HttpChannel<IN,OUT>> handler)
url - the target remote URLhandler - the ReactorChannelHandler to invoke on open channelPromise of the HttpChannel ready to consume for responsepublic abstract Promise<? extends HttpChannel<IN,OUT>> request(Method method, String url, ReactorChannelHandler<IN,OUT,HttpChannel<IN,OUT>> handler)
method - the HTTP method to sendurl - the target remote URLhandler - the ReactorChannelHandler to invoke on open channelPromise of the HttpChannel ready to consume for responseCopyright © 2016. All rights reserved.