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 JavaMailSenderImpl
sender
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target
-
Constructor Summary
Constructors Modifier Constructor Description protected
MailSendingMessageHandlerSpec(String host)
-
Method Summary
Modifier and Type Method Description MailSendingMessageHandlerSpec
credentials(String username, String password)
Set the credentials.MailSendingMessageHandlerSpec
defaultEncoding(String defaultEncoding)
Set the default encoding.MailSendingMessageHandlerSpec
defaultFileTypeMap(javax.activation.FileTypeMap defaultFileTypeMap)
Set the default type map.MailSendingMessageHandlerSpec
javaMailProperties(Consumer<PropertiesBuilder> propertiesConfigurer)
Set aConsumer
that will be invoked with aPropertiesBuilder
; most often used with a lambda expression.MailSendingMessageHandlerSpec
javaMailProperties(Properties javaMailProperties)
Set the javamail properties.MailSendingMessageHandlerSpec
password(String password)
Set the mail user password.MailSendingMessageHandlerSpec
port(int port)
Set the port.MailSendingMessageHandlerSpec
protocol(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, stop
Methods 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 aConsumer
that 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 whenusername
is 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)
-