Top Description Inners Fields Constructors Methods
org.apache.hc.core5.reactor

public final Class IOReactorConfig

extends Object
Class Inheritance
Annotations
@Contract
threading:IMMUTABLE
Imports
java.net.SocketAddress, java.util.concurrent.TimeUnit, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.util.Args, .TimeValue, .Timeout

I/O reactor configuration parameters.
Since
4.2

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private final int
public static final IOReactorConfig
private final int
private final int
private final TimeValue
private final int
private final SocketAddress
private final String
private final String
private final boolean
private final TimeValue
private final boolean
private final Timeout
private final boolean
private final int

Constructor Summary

AccessConstructor and Description
pack-priv
IOReactorConfig(final TimeValue selectInterval, final int ioThreadCount, final Timeout soTimeout, final boolean soReuseAddress, final TimeValue soLinger, final boolean soKeepAlive, final boolean tcpNoDelay, final int trafficClass, final int sndBufSize, final int rcvBufSize, final int backlogSize, final SocketAddress socksProxyAddress, final String socksProxyUsername, final String socksProxyPassword)

Method Summary

Modifier and TypeMethod and Description
public static IOReactorConfig.Builder
copy(final IOReactorConfig config)

public static IOReactorConfig.Builder
public int
public int
public int
public TimeValue
public int
public SocketAddress
public String
public String
public TimeValue
public Timeout
public int
public boolean
public boolean
isSoKeepalive()

Deprecated use isSoKeepAlive().
public boolean
public boolean
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

backlogSizeback to summary
private final int backlogSize
DEFAULTback to summary
public static final IOReactorConfig DEFAULT
ioThreadCountback to summary
private final int ioThreadCount
rcvBufSizeback to summary
private final int rcvBufSize
selectIntervalback to summary
private final TimeValue selectInterval
sndBufSizeback to summary
private final int sndBufSize
socksProxyAddressback to summary
private final SocketAddress socksProxyAddress
socksProxyPasswordback to summary
private final String socksProxyPassword
socksProxyUsernameback to summary
private final String socksProxyUsername
soKeepAliveback to summary
private final boolean soKeepAlive
soLingerback to summary
private final TimeValue soLinger
soReuseAddressback to summary
private final boolean soReuseAddress
soTimeoutback to summary
private final Timeout soTimeout
tcpNoDelayback to summary
private final boolean tcpNoDelay
trafficClassback to summary
private final int trafficClass

Constructor Detail

IOReactorConfigback to summary
pack-priv IOReactorConfig(final TimeValue selectInterval, final int ioThreadCount, final Timeout soTimeout, final boolean soReuseAddress, final TimeValue soLinger, final boolean soKeepAlive, final boolean tcpNoDelay, final int trafficClass, final int sndBufSize, final int rcvBufSize, final int backlogSize, final SocketAddress socksProxyAddress, final String socksProxyUsername, final String socksProxyPassword)

Method Detail

copyback to summary
public static IOReactorConfig.Builder copy(final IOReactorConfig config)
customback to summary
public static IOReactorConfig.Builder custom()
getBacklogSizeback to summary
public int getBacklogSize()
See Also
Builder#setBacklogSize(int)
getIoThreadCountback to summary
public int getIoThreadCount()
See Also
Builder#setIoThreadCount(int)
getRcvBufSizeback to summary
public int getRcvBufSize()
See Also
Builder#setRcvBufSize(int)
getSelectIntervalback to summary
public TimeValue getSelectInterval()
See Also
Builder#setSelectInterval(TimeValue)
getSndBufSizeback to summary
public int getSndBufSize()
See Also
Builder#setSndBufSize(int)
getSocksProxyAddressback to summary
public SocketAddress getSocksProxyAddress()
See Also
Builder#setSocksProxyAddress(SocketAddress)
getSocksProxyPasswordback to summary
public String getSocksProxyPassword()
See Also
Builder#setSocksProxyAddress(SocketAddress)
getSocksProxyUsernameback to summary
public String getSocksProxyUsername()
See Also
Builder#setSocksProxyUsername(String)
getSoLingerback to summary
public TimeValue getSoLinger()
See Also
Builder#setSoLinger(TimeValue)
getSoTimeoutback to summary
public Timeout getSoTimeout()
See Also
Builder#setSoTimeout(Timeout)
getTrafficClassback to summary
public int getTrafficClass()
Since
5.1
See Also
Builder#setTrafficClass(int)
isSoKeepAliveback to summary
public boolean isSoKeepAlive()
Since
5.2
See Also
Builder#setSoKeepAlive(boolean)
isSoKeepaliveback to summary
public boolean isSoKeepalive()

Deprecated

use isSoKeepAlive().

Annotations
@Deprecated
See Also
Builder#setSoKeepAlive(boolean)
isSoReuseAddressback to summary
public boolean isSoReuseAddress()
See Also
Builder#setSoReuseAddress(boolean)
isTcpNoDelayback to summary
public boolean isTcpNoDelay()
See Also
Builder#setTcpNoDelay(boolean)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
org.apache.hc.core5.reactor back to summary

public Class IOReactorConfig.Builder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private int
private static int
private int
private int
private TimeValue
private int
private SocketAddress
private String
private String
private boolean
private TimeValue
private boolean
private Timeout
private boolean
private int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public IOReactorConfig
public static int

Returns:

the default value for ioThreadCount.
getDefaultMaxIOThreadCount
()

Gets the default value for ioThreadCount.

public IOReactorConfig.Builder
setBacklogSize(final int backlogSize)

Determines the default backlog size value for server sockets binds.

public static void
setDefaultMaxIOThreadCount(final int
the default value for ioThreadCount.
defaultMaxIOThreadCount
)

Sets the default value for ioThreadCount.

public IOReactorConfig.Builder
setIoThreadCount(final int ioThreadCount)

Determines the number of I/O dispatch threads to be used by the I/O reactor.

public IOReactorConfig.Builder
setRcvBufSize(final int rcvBufSize)

Determines the default value of the java.net.SocketOptions#SO_RCVBUF parameter for newly created sockets.

public IOReactorConfig.Builder
setSelectInterval(final TimeValue selectInterval)

Determines time interval at which the I/O reactor wakes up to check for timed out sessions and session requests.

public IOReactorConfig.Builder
setSndBufSize(final int sndBufSize)

Determines the default value of the java.net.SocketOptions#SO_SNDBUF parameter for newly created sockets.

public IOReactorConfig.Builder
setSocksProxyAddress(final SocketAddress socksProxyAddress)

The address of the SOCKS proxy to use.

public IOReactorConfig.Builder
setSocksProxyPassword(final String socksProxyPassword)

The password to provide to the SOCKS proxy for username/password authentication.

public IOReactorConfig.Builder
setSocksProxyUsername(final String socksProxyUsername)

The username to provide to the SOCKS proxy for username/password authentication.

public IOReactorConfig.Builder
setSoKeepAlive(final boolean soKeepAlive)

Determines the default value of the java.net.SocketOptions#SO_KEEPALIVE parameter for newly created sockets.

public IOReactorConfig.Builder
setSoLinger(final int soLinger, final TimeUnit timeUnit)

Determines the default value of the java.net.SocketOptions#SO_LINGER parameter for newly created sockets.

public IOReactorConfig.Builder
setSoLinger(final TimeValue soLinger)

Determines the default value of the java.net.SocketOptions#SO_LINGER parameter for newly created sockets.

public IOReactorConfig.Builder
setSoReuseAddress(final boolean soReuseAddress)

Determines the default value of the java.net.SocketOptions#SO_REUSEADDR parameter for newly created sockets.

public IOReactorConfig.Builder
setSoTimeout(final int soTimeout, final TimeUnit timeUnit)

Determines the default socket timeout value for non-blocking I/O operations.

public IOReactorConfig.Builder
setSoTimeout(final Timeout soTimeout)

Determines the default socket timeout value for non-blocking I/O operations.

public IOReactorConfig.Builder
setTcpNoDelay(final boolean tcpNoDelay)

Determines the default value of the java.net.SocketOptions#TCP_NODELAY parameter for newly created sockets.

public IOReactorConfig.Builder
setTrafficClass(final int trafficClass)

Determines the default value of the java.net.SocketOptions#IP_TOS parameter for newly created sockets.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

backlogSizeback to summary
private int backlogSize
defaultMaxIOThreadCountback to summary
private static int defaultMaxIOThreadCount
ioThreadCountback to summary
private int ioThreadCount
rcvBufSizeback to summary
private int rcvBufSize
selectIntervalback to summary
private TimeValue selectInterval
sndBufSizeback to summary
private int sndBufSize
socksProxyAddressback to summary
private SocketAddress socksProxyAddress
socksProxyPasswordback to summary
private String socksProxyPassword
socksProxyUsernameback to summary
private String socksProxyUsername
soKeepAliveback to summary
private boolean soKeepAlive
soLingerback to summary
private TimeValue soLinger
soReuseAddressback to summary
private boolean soReuseAddress
soTimeoutback to summary
private Timeout soTimeout
tcpNoDelayback to summary
private boolean tcpNoDelay
trafficClassback to summary
private int trafficClass

Constructor Detail

Builderback to summary
pack-priv Builder()

Method Detail

buildback to summary
public IOReactorConfig build()
getDefaultMaxIOThreadCountback to summary
public static int getDefaultMaxIOThreadCount()

Gets the default value for ioThreadCount. Returns Runtime#availableProcessors() if setDefaultMaxIOThreadCount(int) was called with a value less <= 0.

Returns:int

the default value for ioThreadCount.

Since
4.4.10
setBacklogSizeback to summary
public IOReactorConfig.Builder setBacklogSize(final int backlogSize)

Determines the default backlog size value for server sockets binds.

Default: 0 (system default)

Since
4.4
setDefaultMaxIOThreadCountback to summary
public static void setDefaultMaxIOThreadCount(final int defaultMaxIOThreadCount)

Sets the default value for ioThreadCount. Use a value <= 0 to cause getDefaultMaxIOThreadCount() to return Runtime#availableProcessors().

Parameters
defaultMaxIOThreadCount:int

the default value for ioThreadCount.

Since
4.4.10
setIoThreadCountback to summary
public IOReactorConfig.Builder setIoThreadCount(final int ioThreadCount)

Determines the number of I/O dispatch threads to be used by the I/O reactor.

Default: 2

setRcvBufSizeback to summary
public IOReactorConfig.Builder setRcvBufSize(final int rcvBufSize)

Determines the default value of the java.net.SocketOptions#SO_RCVBUF parameter for newly created sockets.

Default: 0 (system default)

See Also
java.net.SocketOptions#SO_RCVBUF
setSelectIntervalback to summary
public IOReactorConfig.Builder setSelectInterval(final TimeValue selectInterval)

Determines time interval at which the I/O reactor wakes up to check for timed out sessions and session requests.

Default: 1000 milliseconds.

setSndBufSizeback to summary
public IOReactorConfig.Builder setSndBufSize(final int sndBufSize)

Determines the default value of the java.net.SocketOptions#SO_SNDBUF parameter for newly created sockets.

Default: 0 (system default)

See Also
java.net.SocketOptions#SO_SNDBUF
setSocksProxyAddressback to summary
public IOReactorConfig.Builder setSocksProxyAddress(final SocketAddress socksProxyAddress)

The address of the SOCKS proxy to use.

setSocksProxyPasswordback to summary
public IOReactorConfig.Builder setSocksProxyPassword(final String socksProxyPassword)

The password to provide to the SOCKS proxy for username/password authentication.

setSocksProxyUsernameback to summary
public IOReactorConfig.Builder setSocksProxyUsername(final String socksProxyUsername)

The username to provide to the SOCKS proxy for username/password authentication.

setSoKeepAliveback to summary
public IOReactorConfig.Builder setSoKeepAlive(final boolean soKeepAlive)

Determines the default value of the java.net.SocketOptions#SO_KEEPALIVE parameter for newly created sockets.

Default: -1

See Also
java.net.SocketOptions#SO_KEEPALIVE
setSoLingerback to summary
public IOReactorConfig.Builder setSoLinger(final int soLinger, final TimeUnit timeUnit)

Determines the default value of the java.net.SocketOptions#SO_LINGER parameter for newly created sockets.

Default: -1

See Also
java.net.SocketOptions#SO_LINGER
setSoLingerback to summary
public IOReactorConfig.Builder setSoLinger(final TimeValue soLinger)

Determines the default value of the java.net.SocketOptions#SO_LINGER parameter for newly created sockets.

Default: -1

See Also
java.net.SocketOptions#SO_LINGER
setSoReuseAddressback to summary
public IOReactorConfig.Builder setSoReuseAddress(final boolean soReuseAddress)

Determines the default value of the java.net.SocketOptions#SO_REUSEADDR parameter for newly created sockets.

Default: false

See Also
java.net.SocketOptions#SO_REUSEADDR
setSoTimeoutback to summary
public IOReactorConfig.Builder setSoTimeout(final int soTimeout, final TimeUnit timeUnit)

Determines the default socket timeout value for non-blocking I/O operations.

Default: 0 (no timeout)

See Also
java.net.SocketOptions#SO_TIMEOUT
setSoTimeoutback to summary
public IOReactorConfig.Builder setSoTimeout(final Timeout soTimeout)

Determines the default socket timeout value for non-blocking I/O operations.

Default: 0 (no timeout)

See Also
java.net.SocketOptions#SO_TIMEOUT
setTcpNoDelayback to summary
public IOReactorConfig.Builder setTcpNoDelay(final boolean tcpNoDelay)

Determines the default value of the java.net.SocketOptions#TCP_NODELAY parameter for newly created sockets.

Default: false

See Also
java.net.SocketOptions#TCP_NODELAY
setTrafficClassback to summary
public IOReactorConfig.Builder setTrafficClass(final int trafficClass)

Determines the default value of the java.net.SocketOptions#IP_TOS parameter for newly created sockets.

Default: 0

Since
5.1
See Also
java.net.SocketOptions#IP_TOS