Package io.vertx.ext.mail
Interface MailClientBuilder
-
public interface MailClientBuilder
A builder forMailClient
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MailClient
build()
Build and return the client.MailClientBuilder
shared(String poolName)
Set a shared client pool name.MailClientBuilder
with(MailConfig configuration)
Set a configuration object.MailClientBuilder
withCredentialsSupplier(Supplier<Future<UsernamePasswordCredentials>> credentialsSupplier)
Set a credentials supplier for the mail client.
-
-
-
Method Detail
-
with
MailClientBuilder with(MailConfig configuration)
Set a configuration object.- Parameters:
configuration
- to be used for sending mails- Returns:
- a reference to this, so the API can be used fluently
-
withCredentialsSupplier
MailClientBuilder withCredentialsSupplier(Supplier<Future<UsernamePasswordCredentials>> credentialsSupplier)
Set a credentials supplier for the mail client.By default, the credentials are fixed at creation time with
MailConfig.setUsername(String)
andMailConfig.setPassword(String)
.- Returns:
- a reference to this, so the API can be used fluently
-
shared
MailClientBuilder shared(String poolName)
Set a shared client pool name.The created client will share its connection pool with any other client created with the same pool name.
- Parameters:
poolName
- the shared pool name- Returns:
- a reference to this, so the API can be used fluently
-
build
MailClient build()
Build and return the client.- Returns:
- the client as configured by this builder
-
-