Class MailSendingMessageHandlerSpec
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,H>
org.springframework.integration.dsl.MessageHandlerSpec<MailSendingMessageHandlerSpec,MailSendingMessageHandler>
org.springframework.integration.mail.dsl.MailSendingMessageHandlerSpec
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,DisposableBean,FactoryBean<MailSendingMessageHandler>,InitializingBean,Lifecycle,Phased,SmartLifecycle
public class MailSendingMessageHandlerSpec extends MessageHandlerSpec<MailSendingMessageHandlerSpec,MailSendingMessageHandler>
- Since:
- 5.0
- Author:
- Gary Russell, Artem Bilan
-
Field Summary
Fields Modifier and Type Field Description protected JavaMailSenderImplsenderFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target -
Constructor Summary
Constructors Modifier Constructor Description protectedMailSendingMessageHandlerSpec(String host) -
Method Summary
Modifier and Type Method Description MailSendingMessageHandlerSpeccredentials(String username, String password)Set the credentials.MailSendingMessageHandlerSpecdefaultEncoding(String defaultEncoding)Set the default encoding.MailSendingMessageHandlerSpecdefaultFileTypeMap(javax.activation.FileTypeMap defaultFileTypeMap)Set the default type map.MailSendingMessageHandlerSpecjavaMailProperties(Consumer<PropertiesBuilder> propertiesConfigurer)Set aConsumerthat will be invoked with aPropertiesBuilder; most often used with a lambda expression.MailSendingMessageHandlerSpecjavaMailProperties(Properties javaMailProperties)Set the javamail properties.MailSendingMessageHandlerSpecpassword(String password)Set the mail user password.MailSendingMessageHandlerSpecport(int port)Set the port.MailSendingMessageHandlerSpecprotocol(String protocol)Set the protocol.Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopMethods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Field Details
-
Constructor Details
-
Method Details
-
javaMailProperties
Set the javamail properties.- Parameters:
javaMailProperties- the properties.- Returns:
- the spec.
- See Also:
JavaMailSenderImpl.setJavaMailProperties(Properties)
-
javaMailProperties
public MailSendingMessageHandlerSpec javaMailProperties(Consumer<PropertiesBuilder> propertiesConfigurer)Set aConsumerthat will be invoked with aPropertiesBuilder; most often used with a lambda expression.- Parameters:
propertiesConfigurer- the consumer.- Returns:
- the spec.
-
protocol
Set the protocol.- Parameters:
protocol- the protocol.- Returns:
- the spec.
- See Also:
JavaMailSenderImpl.setProtocol(String)
-
port
Set the port.- Parameters:
port- the port.- Returns:
- the spec.
- See Also:
JavaMailSenderImpl.setPort(int)
-
credentials
public MailSendingMessageHandlerSpec credentials(@Nullable String username, @Nullable String password)Set the credentials.- Parameters:
username- the user name.password- the password.- Returns:
- the spec.
- See Also:
JavaMailSenderImpl.setUsername(String),JavaMailSenderImpl.setPassword(String)
-
password
Set the mail user password. A convenient method whenusernameis provided in the Java mail properties.- Parameters:
password- the password.- Returns:
- the spec.
- Since:
- 5.1.3
- See Also:
JavaMailSenderImpl.setPassword(String),javaMailProperties(Properties)
-
defaultEncoding
Set the default encoding.- Parameters:
defaultEncoding- the default encoding.- Returns:
- the spec.
- See Also:
JavaMailSenderImpl.setDefaultEncoding(String)
-
defaultFileTypeMap
public MailSendingMessageHandlerSpec defaultFileTypeMap(@Nullable javax.activation.FileTypeMap defaultFileTypeMap)Set the default type map.- Parameters:
defaultFileTypeMap- the default type map.- Returns:
- the spec.
- See Also:
JavaMailSenderImpl.setDefaultFileTypeMap(FileTypeMap)
-