IN
- The type that will be received by the clientOUT
- The type that will be sent by the clientpublic static class Spec.HttpClientSpec<IN,OUT> extends DispatcherComponentSpec<Spec.HttpClientSpec<IN,OUT>,HttpClient<IN,OUT>>
HttpClient
Modifier and Type | Method and Description |
---|---|
Spec.HttpClientSpec<IN,OUT> |
codec(Codec<Buffer,IN,OUT> codec)
The
Codec to use to encode and decode data. |
protected HttpClient<IN,OUT> |
configure(Dispatcher dispatcher,
Environment environment) |
Spec.HttpClientSpec<IN,OUT> |
connect(InetSocketAddress connectAddress)
The address to which this client should connect.
|
Spec.HttpClientSpec<IN,OUT> |
connect(String host,
int port)
The host and port to which this client should connect.
|
Spec.HttpClientSpec<IN,OUT> |
connect(Supplier<InetSocketAddress> connectAddress)
The address to which this client should connect.
|
Spec.HttpClientSpec<IN,OUT> |
options(ClientSocketOptions options)
Set the common
ClientSocketOptions for connections made in this client. |
Spec.HttpClientSpec<IN,OUT> |
ssl(SslOptions sslOptions)
Set the options to use for configuring SSL.
|
defaultDispatcher, dispatcher, dispatcher, env, get, synchronousDispatcher
public Spec.HttpClientSpec<IN,OUT> options(ClientSocketOptions options)
ClientSocketOptions
for connections made in this client.options
- The socket options to apply to new connections.public Spec.HttpClientSpec<IN,OUT> ssl(@Nullable SslOptions sslOptions)
null
means don't use SSL at all (the
default).sslOptions
- The options to set when configuring SSLpublic Spec.HttpClientSpec<IN,OUT> connect(@Nonnull String host, int port)
host
- The host to connect to.port
- The port to connect to.public Spec.HttpClientSpec<IN,OUT> connect(@Nonnull InetSocketAddress connectAddress)
connectAddress
- The address to connect to.public Spec.HttpClientSpec<IN,OUT> connect(@Nonnull Supplier<InetSocketAddress> connectAddress)
connectAddress
- The address to connect to.public Spec.HttpClientSpec<IN,OUT> codec(@Nullable Codec<Buffer,IN,OUT> codec)
Codec
to use to encode and decode data.codec
- The codec to use.protected HttpClient<IN,OUT> configure(Dispatcher dispatcher, Environment environment)
configure
in class DispatcherComponentSpec<Spec.HttpClientSpec<IN,OUT>,HttpClient<IN,OUT>>
Copyright © 2017. All rights reserved.