Class MailSendingMessageHandlerSpec
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<S,H>
org.springframework.integration.dsl.MessageHandlerSpec<MailSendingMessageHandlerSpec,MailSendingMessageHandler>
org.springframework.integration.mail.dsl.MailSendingMessageHandlerSpec
- All Implemented Interfaces:
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 inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
logger, PARSER, target
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncredentials
(String username, String password) Set the credentials.defaultEncoding
(String defaultEncoding) Set the default encoding.defaultFileTypeMap
(FileTypeMap defaultFileTypeMap) Set the default type map.javaMailProperties
(Consumer<PropertiesBuilder> propertiesConfigurer) Set aConsumer
that will be invoked with aPropertiesBuilder
; most often used with a lambda expression.javaMailProperties
(Properties javaMailProperties) Set the javamail properties.Set the mail user password.port
(int port) Set the port.Set the protocol.Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, afterPropertiesSet, destroy, doGet, get, getId, getObject, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.FactoryBean
isSingleton
-
Field Details
-
sender
-
-
Constructor Details
-
MailSendingMessageHandlerSpec
-
-
Method Details
-
javaMailProperties
Set the javamail properties.- Parameters:
javaMailProperties
- the properties.- Returns:
- the spec.
- See Also:
-
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:
-
port
Set the port.- Parameters:
port
- the port.- Returns:
- the spec.
- See Also:
-
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:
-
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:
-
defaultEncoding
Set the default encoding.- Parameters:
defaultEncoding
- the default encoding.- Returns:
- the spec.
- See Also:
-
defaultFileTypeMap
Set the default type map.- Parameters:
defaultFileTypeMap
- the default type map.- Returns:
- the spec.
- See Also:
-