TYPE - the configurable object type.public static final class ChannelConfiguration.Builder<TYPE> extends Object
| Constructor and Description |
|---|
ChannelConfiguration.Builder(ChannelConfiguration.Configurable<? extends TYPE> configurable)
Constructor.
|
ChannelConfiguration.Builder(ChannelConfiguration.Configurable<? extends TYPE> configurable,
ChannelConfiguration initialConfiguration)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
TYPE |
set()
Sets the configuration and returns the configurable object.
|
ChannelConfiguration.Builder<TYPE> |
with(ChannelConfiguration configuration)
Applies the specified configuration to this builder.
|
ChannelConfiguration.Builder<TYPE> |
withAsyncRunner(Runner runner)
Sets the asynchronous runner instance.
|
ChannelConfiguration.Builder<TYPE> |
withChannelMaxSize(int maxSize)
Sets the maximum number of data that the channel can retain before they are consumed.
|
ChannelConfiguration.Builder<TYPE> |
withChannelOrder(InvocationConfiguration.OrderType orderType)
Sets the order in which data are collected from the channel.
|
ChannelConfiguration.Builder<TYPE> |
withChannelTimeout(long timeout,
TimeUnit timeUnit)
Sets the timeout for the channel to have room for additional data.
|
ChannelConfiguration.Builder<TYPE> |
withChannelTimeout(TimeDuration timeout)
Sets the timeout for the channel to have room for additional data.
|
ChannelConfiguration.Builder<TYPE> |
withLog(Log log)
Sets the log instance.
|
ChannelConfiguration.Builder<TYPE> |
withLogLevel(Log.Level level)
Sets the log level.
|
ChannelConfiguration.Builder<TYPE> |
withReadTimeout(long timeout,
TimeUnit timeUnit)
Sets the timeout for the channel instance to produce a readable output.
Note that this is just the initial configuration, since the output timeout can be dynamically changed through the dedicated methods. |
ChannelConfiguration.Builder<TYPE> |
withReadTimeout(TimeDuration timeout)
Sets the timeout for the channel instance to produce a readable output.
|
ChannelConfiguration.Builder<TYPE> |
withReadTimeoutAction(InvocationConfiguration.TimeoutActionType actionType)
Sets the action to be taken if the timeout elapses before an output can be read from the
output channel.
|
public ChannelConfiguration.Builder(@NotNull
ChannelConfiguration.Configurable<? extends TYPE> configurable)
configurable - the configurable instance.public ChannelConfiguration.Builder(@NotNull
ChannelConfiguration.Configurable<? extends TYPE> configurable,
@NotNull
ChannelConfiguration initialConfiguration)
configurable - the configurable instance.initialConfiguration - the initial configuration.@NotNull public TYPE set()
@NotNull public ChannelConfiguration.Builder<TYPE> with(@Nullable ChannelConfiguration configuration)
configuration - the channel configuration.@NotNull public ChannelConfiguration.Builder<TYPE> withAsyncRunner(@Nullable Runner runner)
runner - the runner instance.@NotNull public ChannelConfiguration.Builder<TYPE> withChannelMaxSize(int maxSize)
DEFAULT value means that it is up to the specific
implementation to choose a default one.maxSize - the maximum size.IllegalArgumentException - if the number is less than 1.@NotNull public ChannelConfiguration.Builder<TYPE> withChannelOrder(@Nullable InvocationConfiguration.OrderType orderType)
orderType - the order type.@NotNull public ChannelConfiguration.Builder<TYPE> withChannelTimeout(long timeout, @NotNull TimeUnit timeUnit)
timeout - the timeout.timeUnit - the timeout time unit.IllegalArgumentException - if the specified timeout is negative.@NotNull public ChannelConfiguration.Builder<TYPE> withChannelTimeout(@Nullable TimeDuration timeout)
timeout - the timeout.@NotNull public ChannelConfiguration.Builder<TYPE> withLog(@Nullable Log log)
log - the log instance.@NotNull public ChannelConfiguration.Builder<TYPE> withLogLevel(@Nullable Log.Level level)
level - the log level.@NotNull public ChannelConfiguration.Builder<TYPE> withReadTimeout(long timeout, @NotNull TimeUnit timeUnit)
timeout - the timeout.timeUnit - the timeout time unit.IllegalArgumentException - if the specified timeout is negative.@NotNull public ChannelConfiguration.Builder<TYPE> withReadTimeout(@Nullable TimeDuration timeout)
timeout - the timeout.@NotNull public ChannelConfiguration.Builder<TYPE> withReadTimeoutAction(@Nullable InvocationConfiguration.TimeoutActionType actionType)
actionType - the action type.