@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","AbstractSmtpSessionFactoryConfig"}) @Immutable public final class SmtpSessionFactoryConfig extends Object
AbstractSmtpSessionFactoryConfig
.
Use the builder to create immutable instances:
SmtpSessionFactoryConfig.builder()
.
Modifier and Type | Class and Description |
---|---|
static class |
SmtpSessionFactoryConfig.Builder
Builds instances of type
SmtpSessionFactoryConfig . |
Modifier and Type | Field and Description |
---|---|
static Executor |
DIRECT_EXECUTOR
A default
Executor to use when executing CompletableFuture callbacks which simply executes
the callback in the netty event loop. |
Modifier and Type | Method and Description |
---|---|
static SmtpSessionFactoryConfig.Builder |
builder()
Creates a builder for
SmtpSessionFactoryConfig . |
boolean |
equals(Object another)
This instance is equal to all instances of
SmtpSessionFactoryConfig that have equal attribute values. |
io.netty.buffer.ByteBufAllocator |
getAllocator()
A Netty
ByteBufAllocator that will be used for all connections. |
Class<? extends io.netty.channel.Channel> |
getChannelClass()
A Netty
Channel implementation that will be used for all connections. |
io.netty.channel.EventLoopGroup |
getEventLoopGroup()
A Netty
EventLoopGroup that will be used for all connections. |
Executor |
getExecutor()
An
Executor that will be used to call CompletableFuture callbacks. |
Supplier<SSLEngine> |
getSslEngineSupplier()
Creates an
SSLEngine for use with STARTTLS connections. |
int |
hashCode()
Computes a hash code from attributes:
executor , eventLoopGroup , allocator , sslEngineSupplier , channelClass . |
static SmtpSessionFactoryConfig |
nonProductionConfig()
Creates a configuration with a default
NioEventLoopGroup and Executor . |
String |
toString()
Prints the immutable value
SmtpSessionFactoryConfig with attribute values. |
SmtpSessionFactoryConfig |
withAllocator(io.netty.buffer.ByteBufAllocator allocator)
Copy the current immutable object by setting a value for the
allocator attribute. |
SmtpSessionFactoryConfig |
withChannelClass(Class<? extends io.netty.channel.Channel> channelClass)
Copy the current immutable object by setting a value for the
channelClass attribute. |
SmtpSessionFactoryConfig |
withEventLoopGroup(io.netty.channel.EventLoopGroup eventLoopGroup)
Copy the current immutable object by setting a value for the
eventLoopGroup attribute. |
SmtpSessionFactoryConfig |
withExecutor(Executor executor)
Copy the current immutable object by setting a value for the
executor attribute. |
SmtpSessionFactoryConfig |
withSslEngineSupplier(Supplier<SSLEngine> sslEngineSupplier)
Copy the current immutable object by setting a value for the
sslEngineSupplier attribute. |
public static final Executor DIRECT_EXECUTOR
Executor
to use when executing CompletableFuture
callbacks which simply executes
the callback in the netty event loop. This Executor should only be use when you can be sure your callback code never blocks.public Executor getExecutor()
Executor
that will be used to call CompletableFuture
callbacks.public io.netty.channel.EventLoopGroup getEventLoopGroup()
EventLoopGroup
that will be used for all connections.public io.netty.buffer.ByteBufAllocator getAllocator()
ByteBufAllocator
that will be used for all connections.public Supplier<SSLEngine> getSslEngineSupplier()
SSLEngine
for use with STARTTLS connections.public Class<? extends io.netty.channel.Channel> getChannelClass()
Channel
implementation that will be used for all connections.public final SmtpSessionFactoryConfig withExecutor(Executor executor)
executor
attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this
.executor
- A new value for executorthis
objectpublic final SmtpSessionFactoryConfig withEventLoopGroup(io.netty.channel.EventLoopGroup eventLoopGroup)
eventLoopGroup
attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this
.eventLoopGroup
- A new value for eventLoopGroupthis
objectpublic final SmtpSessionFactoryConfig withAllocator(io.netty.buffer.ByteBufAllocator allocator)
allocator
attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this
.allocator
- A new value for allocatorthis
objectpublic final SmtpSessionFactoryConfig withSslEngineSupplier(Supplier<SSLEngine> sslEngineSupplier)
sslEngineSupplier
attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this
.sslEngineSupplier
- A new value for sslEngineSupplierthis
objectpublic final SmtpSessionFactoryConfig withChannelClass(Class<? extends io.netty.channel.Channel> channelClass)
channelClass
attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this
.channelClass
- A new value for channelClassthis
objectpublic boolean equals(@Nullable Object another)
SmtpSessionFactoryConfig
that have equal attribute values.public int hashCode()
executor
, eventLoopGroup
, allocator
, sslEngineSupplier
, channelClass
.public String toString()
SmtpSessionFactoryConfig
with attribute values.public static SmtpSessionFactoryConfig.Builder builder()
SmtpSessionFactoryConfig
.public static SmtpSessionFactoryConfig nonProductionConfig()
NioEventLoopGroup
and Executor
. This is
NOT suitable for a production environment but is useful for testing.Copyright © 2018. All rights reserved.