Class SendGridSender
java.lang.Object
org.frankframework.senders.AbstractSender
org.frankframework.senders.AbstractSenderWithParameters
org.frankframework.senders.AbstractMailSender
org.frankframework.senders.SendGridSender
- All Implemented Interfaces:
FrankElement, HasApplicationContext, HasName, IConfigurable, IScopeProvider, ISender, ISenderWithParameters, IWithParameters, NameAware, HasKeystore, HasTruststore, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle
Sender that sends a mail via SendGrid v3 (cloud-based SMTP provider).
Sample XML file can be found in the path: iaf-core/src/test/resources/emailSamplesXML/emailSample.xml
- Author:
- alisihab
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class AbstractMailSender
AbstractMailSender.EMail, AbstractMailSender.MailAttachmentBase<T>, AbstractMailSender.MailAttachmentStream, AbstractMailSender.MailSessionBase -
Field Summary
Fields inherited from class AbstractSenderWithParameters
parameterNamesMustBeUnique, paramListFields inherited from class AbstractSender
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigure this component.protected SendGridSender.GridMailSessionOverride getter to delegate to httpSessionOverride getter to delegate to httpSessionvoidsendEmail(AbstractMailSender.MailSessionBase mailSession) voidsetFollowRedirects(boolean b) voidsetKeystoreConfiguration(KeystoreConfiguration keystoreConfiguration) Set theKeystoreConfigurationobjectvoidsetMaxConnections(int i) voidsetMaxExecuteRetries(int i) voidsetProtocol(String protocol) voidsetProxyAuthAlias(String string) voidsetProxyHost(String string) voidsetProxyPassword(String string) voidsetProxyPort(int i) voidsetProxyRealm(String string) voidsetProxyUsername(String string) voidsetStaleChecking(boolean b) voidsetStaleTimeout(int timeout) voidsetTimeout(int i) Timeout in milliseconds for socket connection timeout and socket i/o timeoutsvoidsetTruststoreConfiguration(TruststoreConfiguration truststoreConfiguration) voidstart()This method will be called to start the sender.voidstop()Stop/close the sender and deallocate resources.Methods inherited from class AbstractMailSender
extract, isSynchronous, sendMessage, setAuthAlias, setBounceAddress, setDefaultAttachmentName, setDefaultFrom, setDefaultMessageBase64, setDefaultMessageType, setDefaultSubject, setDomainWhitelist, setPassword, setUserIdMethods inherited from class AbstractSenderWithParameters
addParameter, checkStringAttributeOrParameter, consumesSessionVariable, getParameterList, getParameterOverriddenAttributeValue, getParameterOverriddenAttributeValue, getParameterValueListMethods inherited from class AbstractSender
createBean, getLogPrefix, getName, isRunning, setApplicationContext, setNameMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContextMethods inherited from interface FrankElement
addConfigWarningMethods inherited from interface HasApplicationContext
getApplicationContext, getConfigurationClassLoaderMethods inherited from interface HasKeystore
createKeystoreConfiguration, getKeyManagerAlgorithm, getKeystore, getKeystoreAlias, getKeystoreAliasAuthAlias, getKeystoreAliasPassword, getKeystoreAuthAlias, getKeystorePassword, getKeystoreType, setKeyManagerAlgorithm, setKeystore, setKeystoreAlias, setKeystoreAliasAuthAlias, setKeystoreAliasPassword, setKeystoreAuthAlias, setKeystorePassword, setKeystoreTypeMethods inherited from interface HasTruststore
createTruststoreConfiguration, getTrustManagerAlgorithm, getTruststore, getTruststoreAuthAlias, getTruststorePassword, getTruststoreType, isAllowSelfSignedCertificates, isIgnoreCertificateExpiredException, isVerifyHostname, setAllowSelfSignedCertificates, setIgnoreCertificateExpiredException, setTrustManagerAlgorithm, setTruststore, setTruststoreAuthAlias, setTruststorePassword, setTruststoreType, setVerifyHostnameMethods inherited from interface ISender
sendMessageOrThrow
-
Constructor Details
-
SendGridSender
public SendGridSender()
-
-
Method Details
-
configure
Description copied from interface:IConfigurableConfigure this component.configure()is called once at startup of the framework in the configure method of the owner of thisIConfigurable. Purpose of this method is to check whether the static configuration of the object is correct. As much as possible class-instantiating should take place in theconfigure(), to improve performance.In the case of a container, this will propagate the configure signal to all components that apply.
- Specified by:
configurein interfaceIConfigurable- Overrides:
configurein classAbstractMailSender- Throws:
ConfigurationException- in case it was not able to configure the component.
-
start
public void start()Description copied from interface:ISenderThis method will be called to start the sender. After this method is called the sendMessage method may be called. Purpose of this method is to reduce creating connections to databases etc. in thesendMessage()method.- Specified by:
startin interfaceISender- Specified by:
startin interfaceorg.springframework.context.Lifecycle- Overrides:
startin classAbstractSender
-
stop
public void stop()Description copied from interface:ISenderStop/close the sender and deallocate resources.- Specified by:
stopin interfaceISender- Specified by:
stopin interfaceorg.springframework.context.Lifecycle- Overrides:
stopin classAbstractSender
-
sendEmail
- Specified by:
sendEmailin classAbstractMailSender- Throws:
SenderException
-
createMailSession
- Specified by:
createMailSessionin classAbstractMailSender- Throws:
SenderException
-
setTimeout
Description copied from class:AbstractMailSenderTimeout in milliseconds for socket connection timeout and socket i/o timeouts- Overrides:
setTimeoutin classAbstractMailSender
-
setMaxConnections
-
setMaxExecuteRetries
-
setProxyHost
-
setProxyPort
-
setProxyAuthAlias
-
setProxyUsername
-
setProxyPassword
-
setProxyRealm
-
setKeystoreConfiguration
Description copied from interface:HasKeystoreSet theKeystoreConfigurationobject- Specified by:
setKeystoreConfigurationin interfaceHasKeystore
-
getKeystoreConfiguration
Override getter to delegate to httpSession- Specified by:
getKeystoreConfigurationin interfaceHasKeystore
-
setTruststoreConfiguration
- Specified by:
setTruststoreConfigurationin interfaceHasTruststore
-
getTruststoreConfiguration
Override getter to delegate to httpSession- Specified by:
getTruststoreConfigurationin interfaceHasTruststore
-
setFollowRedirects
-
setStaleChecking
-
setStaleTimeout
-
setProtocol
-