BuilderT
- The concrete type of this builder.public abstract class AbstractChannelBuilder<BuilderT extends AbstractChannelBuilder<BuilderT>> extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractChannelBuilder.ChannelEssentials
The essentials required for creating a channel.
|
Constructor and Description |
---|
AbstractChannelBuilder() |
Modifier and Type | Method and Description |
---|---|
ChannelImpl |
build()
Builds a channel using the given parameters.
|
protected abstract AbstractChannelBuilder.ChannelEssentials |
buildEssentials() |
BuilderT |
executor(ExecutorService executor)
Provides a custom executor.
|
public final BuilderT executor(ExecutorService executor)
It's an optional parameter. If the user has not provided an executor when the channel is built, the builder will use a static cached thread pool.
The channel won't take ownership of the given executor. It's caller's responsibility to shut down the executor when it's desired.
public ChannelImpl build()
protected abstract AbstractChannelBuilder.ChannelEssentials buildEssentials()