public class ClientOptions extends NettyOptions<io.netty.bootstrap.Bootstrap,ClientOptions>
| Modifier and Type | Class and Description |
|---|---|
static class |
ClientOptions.Builder<BUILDER extends ClientOptions.Builder<BUILDER>> |
afterChannelInit, afterNettyContextInit, DEFAULT_PORT| Modifier | Constructor and Description |
|---|---|
protected |
ClientOptions(ClientOptions.Builder<?> builder)
Deep-copy all references from the passed builder into this new
NettyOptions instance. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
asDetailedString() |
java.lang.String |
asSimpleString() |
static <BUILDER extends ClientOptions.Builder<BUILDER>> |
builder()
Creates a builder for
ClientOptions |
static <BUILDER extends ClientOptions.Builder<BUILDER>> |
builder(io.netty.bootstrap.Bootstrap bootstrap)
Creates a builder for
ClientOptions |
protected java.net.InetSocketAddress |
createInetSocketAddress(java.lang.String hostname,
int port,
boolean resolve) |
ClientOptions |
duplicate()
Return a copy of all options and references such as
NettyOptions.Builder.onChannelInit(Predicate). |
io.netty.bootstrap.Bootstrap |
get() |
java.net.SocketAddress |
getAddress()
Return a new eventual
SocketAddress |
PoolResources |
getPoolResources()
Get the configured Pool Resources if any
|
ClientProxyOptions |
getProxyOptions() |
java.lang.String |
toString() |
protected boolean |
useDatagramChannel()
Return true if
DatagramChannel should be used |
boolean |
useProxy(java.net.SocketAddress address)
Return true if proxy options have been set and the host is not
configured to bypass the proxy.
|
boolean |
useProxy(java.lang.String hostName)
Return true if proxy options have been set and the host is not
configured to bypass the proxy.
|
afterChannelInit, afterNettyContextInit, defaultSslContext, getLoopResources, getSslHandler, isSecure, onChannelInit, preferNative, sslCloseNotifyFlushTimeoutMillis, sslCloseNotifyReadTimeoutMillis, sslContext, sslHandshakeTimeoutMillisprotected ClientOptions(ClientOptions.Builder<?> builder)
NettyOptions instance.builder - the ClientOptions builderpublic static <BUILDER extends ClientOptions.Builder<BUILDER>> ClientOptions.Builder<BUILDER> builder()
ClientOptionsBUILDER - A ClientOptions.Builder subclasspublic static <BUILDER extends ClientOptions.Builder<BUILDER>> ClientOptions.Builder<BUILDER> builder(io.netty.bootstrap.Bootstrap bootstrap)
ClientOptionsBUILDER - A ClientOptions.Builder subclassbootstrap - the bootstrap reference to usepublic ClientOptions duplicate()
NettyOptionsNettyOptions.Builder.onChannelInit(Predicate). Further option uses on the returned builder will
be fully isolated from this option builder.duplicate in class NettyOptions<io.netty.bootstrap.Bootstrap,ClientOptions>public io.netty.bootstrap.Bootstrap get()
get in interface java.util.function.Supplier<io.netty.bootstrap.Bootstrap>get in class NettyOptions<io.netty.bootstrap.Bootstrap,ClientOptions>public final java.net.SocketAddress getAddress()
NettyOptionsSocketAddressgetAddress in class NettyOptions<io.netty.bootstrap.Bootstrap,ClientOptions>SocketAddress or nullpublic final PoolResources getPoolResources()
PoolResourcespublic final ClientProxyOptions getProxyOptions()
protected boolean useDatagramChannel()
DatagramChannel should be usedDatagramChannel should be usedpublic boolean useProxy(java.net.SocketAddress address)
address - The address to which this client should connect.public boolean useProxy(java.lang.String hostName)
hostName - The host name to which this client should connect.public java.lang.String asSimpleString()
asSimpleString in class NettyOptions<io.netty.bootstrap.Bootstrap,ClientOptions>public java.lang.String asDetailedString()
asDetailedString in class NettyOptions<io.netty.bootstrap.Bootstrap,ClientOptions>public java.lang.String toString()
toString in class NettyOptions<io.netty.bootstrap.Bootstrap,ClientOptions>protected java.net.InetSocketAddress createInetSocketAddress(java.lang.String hostname,
int port,
boolean resolve)