public abstract class NettyAbstractClient extends NettyAbstractEndpoint
It uses a single socket towards the destination. That socket is created and connected whenever the first message is sent, or after the socket was closed by the peer.
This output is blocking, that is, if the peer is slow, this output will hang so that the peer can catch up. This makes this output's input queue grow and accumulate messages.
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
raw
dont add any '\n' at the end of Strings
|
bootstrap, host, maxPayloadLength, metricsContext, port, protocol, readSocketTimeoutAction, readSocketTimeoutMs, ssl, sslCiphers, sslProtocol, sslProvider, useNettyCompression| Constructor and Description |
|---|
NettyAbstractClient(org.thales.punch.settings.api.ISettingsMap settings,
org.thales.punch.libraries.metrics.api.IMetricContext metricsContext)
Common constructor for all clients.
|
| Modifier and Type | Method and Description |
|---|---|
protected io.netty.channel.Channel |
connect(AtomicBoolean connected)
connect to the server.
|
long |
getConnectIntervalMs() |
long |
getConnectRetryIntervalMs() |
io.netty.handler.ssl.SslContext |
getSslContext()
Return the ssl context associated to this client.
|
void |
setConnectIntervalMs(long connectIntervalMs)
Set the connection interval
|
void |
setConnectRetryIntervalMs(long connectRetryIntervalMs)
Set the connection retry interval
|
protected void |
shutdown() |
getFileFromString, getSslProviderpublic NettyAbstractClient(org.thales.punch.settings.api.ISettingsMap settings,
org.thales.punch.libraries.metrics.api.IMetricContext metricsContext)
settings - metricsContext - public long getConnectRetryIntervalMs()
public void setConnectRetryIntervalMs(long connectRetryIntervalMs)
connectRetryIntervalMs - the new intervalpublic long getConnectIntervalMs()
public void setConnectIntervalMs(long connectIntervalMs)
connectIntervalMs - the new intervalpublic io.netty.handler.ssl.SslContext getSslContext()
protected io.netty.channel.Channel connect(AtomicBoolean connected)
connected - protected void shutdown()
Copyright © 2023. All rights reserved.