public class SendGridSender extends MailSenderBase implements HasKeystore, HasTruststore
Modifier and Type | Class and Description |
---|---|
class |
SendGridSender.GridMailSession |
MailSenderBase.EMail, MailSenderBase.MailAttachmentBase<T>, MailSenderBase.MailAttachmentStream, MailSenderBase.MailSessionBase
parameterNamesMustBeUnique, paramList
log
Constructor and Description |
---|
SendGridSender() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Stop/close the sender and deallocate resources.
|
void |
configure()
configure() is called once at startup of the framework in the configure method of the owner of this sender. |
protected SendGridSender.GridMailSession |
createMailSession() |
String |
getKeyManagerAlgorithm() |
String |
getKeystore() |
String |
getKeystoreAlias() |
String |
getKeystoreAliasAuthAlias() |
String |
getKeystoreAliasPassword() |
String |
getKeystoreAuthAlias() |
String |
getKeystorePassword() |
KeystoreType |
getKeystoreType() |
String |
getTrustManagerAlgorithm() |
String |
getTruststore() |
String |
getTruststoreAuthAlias() |
String |
getTruststorePassword() |
KeystoreType |
getTruststoreType() |
boolean |
isAllowSelfSignedCertificates() |
boolean |
isIgnoreCertificateExpiredException() |
boolean |
isVerifyHostname() |
void |
open()
This method will be called to start the sender.
|
String |
sendEmail(MailSenderBase.MailSessionBase mailSession) |
void |
setAllowSelfSignedCertificates(boolean testModeNoCertificatorCheck)
If
true , self signed certificates are accepted |
void |
setCertificate(String string)
Deprecated.
|
void |
setCertificateAuthAlias(String string)
Deprecated.
|
void |
setCertificatePassword(String string)
Deprecated.
|
void |
setCertificateType(KeystoreType value)
Deprecated.
|
void |
setFollowRedirects(boolean b) |
void |
setIgnoreCertificateExpiredException(boolean ignoreCertificateExpiredException)
If
true , CertificateExpiredExceptions are ignored |
void |
setKeyManagerAlgorithm(String keyManagerAlgorithm)
Key manager algorithm.
|
void |
setKeystore(String keystore)
Resource url to keystore or certificate.
|
void |
setKeystoreAlias(String keystoreAlias)
Alias to obtain specific certificate or key in keystore
|
void |
setKeystoreAliasAuthAlias(String keystoreAliasAuthAlias)
Authentication alias to authenticate access to certificate or key indicated by
keystoreAlias |
void |
setKeystoreAliasPassword(String keystoreAliasPassword)
Default password to authenticate access to certificate or key indicated by
keystoreAlias |
void |
setKeystoreAuthAlias(String keystoreAuthAlias)
Authentication alias used to obtain keystore password
|
void |
setKeystorePassword(String keystorePassword)
Default password to access keystore
|
void |
setKeystoreType(KeystoreType keystoreType)
Type of keystore
|
void |
setMaxConnections(int i) |
void |
setMaxExecuteRetries(int i) |
void |
setProtocol(String protocol) |
void |
setProxyAuthAlias(String string) |
void |
setProxyHost(String string) |
void |
setProxyPassword(String string) |
void |
setProxyPort(int i) |
void |
setProxyRealm(String string) |
void |
setProxyUsername(String string) |
void |
setProxyUserName(String string)
Deprecated.
|
void |
setStaleChecking(boolean b) |
void |
setStaleTimeout(int timeout) |
void |
setTimeout(int i)
Timeout in milliseconds for socket connection timeout and socket i/o timeouts
|
void |
setTrustManagerAlgorithm(String trustManagerAlgorithm)
Trust manager algorithm.
|
void |
setTruststore(String truststore)
Resource url to truststore.
|
void |
setTruststoreAuthAlias(String truststoreAuthAlias)
Authentication alias used to obtain truststore password
|
void |
setTruststorePassword(String truststorePassword)
Default password to access truststore
|
void |
setTruststoreType(KeystoreType truststoreType)
Type of truststore
|
void |
setVerifyHostname(boolean verifyHostname)
If
true , the hostname in the certificate will be checked against the actual hostname of the peer |
extract, isSynchronous, sendMessage, setAuthAlias, setBounceAddress, setDefaultAttachmentName, setDefaultFrom, setDefaultMessageBase64, setDefaultMessageType, setDefaultSubject, setDomainWhitelist, setPassword, setSmtpAuthAlias, setSmtpPassword, setSmtpUserid, setUserId
addParameter, checkStringAttributeOrParameter, consumesSessionVariable, getParameterList, getParameterOverriddenAttributeValue, getParameterOverriddenAttributeValue, getParameterValueList
createBean, getLogPrefix, getName, setApplicationContext, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getApplicationContext, getName
getConfigurationClassLoader
setApplicationContext
sendMessageOrThrow
getName, setName
public void configure() throws ConfigurationException
ISender
configure()
is called once at startup of the framework in the configure method of the owner of this sender.
Purpose of this method is to check whether the static configuration of the sender is correct.
As much as possible class-instantiating should take place in the configure()
or open()
method, to improve performance.configure
in interface IConfigurable
configure
in interface ISender
configure
in class MailSenderBase
ConfigurationException
public void open() throws SenderException
ISender
sendMessage()
method.open
in interface ISender
open
in class SenderBase
SenderException
public void close() throws SenderException
ISender
close
in interface ISender
close
in class SenderBase
SenderException
public String sendEmail(MailSenderBase.MailSessionBase mailSession) throws SenderException
sendEmail
in class MailSenderBase
SenderException
protected SendGridSender.GridMailSession createMailSession() throws SenderException
createMailSession
in class MailSenderBase
SenderException
@ReferTo(value=HttpSessionBase.class) public void setTimeout(int i)
MailSenderBase
setTimeout
in class MailSenderBase
@ReferTo(value=HttpSessionBase.class) public void setMaxConnections(int i)
@ReferTo(value=HttpSessionBase.class) public void setMaxExecuteRetries(int i)
@ReferTo(value=HttpSessionBase.class) public void setProxyHost(String string)
@ReferTo(value=HttpSessionBase.class) public void setProxyPort(int i)
@ReferTo(value=HttpSessionBase.class) public void setProxyAuthAlias(String string)
@ReferTo(value=HttpSessionBase.class) public void setProxyUsername(String string)
@Deprecated @ConfigurationWarning(value="Please use \"proxyUsername\" instead") public void setProxyUserName(String string)
@ReferTo(value=HttpSessionBase.class) public void setProxyPassword(String string)
@ReferTo(value=HttpSessionBase.class) public void setProxyRealm(String string)
@Deprecated @ConfigurationWarning(value="Please use attribute keystore instead") public void setCertificate(String string)
@Deprecated @ConfigurationWarning(value="has been replaced with keystoreType") public void setCertificateType(KeystoreType value)
@Deprecated @ConfigurationWarning(value="Please use attribute keystoreAuthAlias instead") public void setCertificateAuthAlias(String string)
@Deprecated @ConfigurationWarning(value="Please use attribute keystorePassword instead") public void setCertificatePassword(String string)
@ReferTo(value=HttpSessionBase.class) public void setKeystore(String keystore)
HasKeystore
setKeystore
in interface HasKeystore
public String getKeystore()
getKeystore
in interface HasKeystore
@ReferTo(value=HttpSessionBase.class) public void setKeystoreType(KeystoreType keystoreType)
HasKeystore
setKeystoreType
in interface HasKeystore
public KeystoreType getKeystoreType()
getKeystoreType
in interface HasKeystore
@ReferTo(value=HttpSessionBase.class) public void setKeystoreAuthAlias(String keystoreAuthAlias)
HasKeystore
setKeystoreAuthAlias
in interface HasKeystore
public String getKeystoreAuthAlias()
getKeystoreAuthAlias
in interface HasKeystore
@ReferTo(value=HttpSessionBase.class) public void setKeystorePassword(String keystorePassword)
HasKeystore
setKeystorePassword
in interface HasKeystore
public String getKeystorePassword()
getKeystorePassword
in interface HasKeystore
@ReferTo(value=HttpSessionBase.class) public void setKeystoreAlias(String keystoreAlias)
HasKeystore
setKeystoreAlias
in interface HasKeystore
public String getKeystoreAlias()
getKeystoreAlias
in interface HasKeystore
@ReferTo(value=HttpSessionBase.class) public void setKeystoreAliasAuthAlias(String keystoreAliasAuthAlias)
HasKeystore
keystoreAlias
setKeystoreAliasAuthAlias
in interface HasKeystore
public String getKeystoreAliasAuthAlias()
getKeystoreAliasAuthAlias
in interface HasKeystore
@ReferTo(value=HttpSessionBase.class) public void setKeystoreAliasPassword(String keystoreAliasPassword)
HasKeystore
keystoreAlias
setKeystoreAliasPassword
in interface HasKeystore
public String getKeystoreAliasPassword()
getKeystoreAliasPassword
in interface HasKeystore
@ReferTo(value=HttpSessionBase.class) public void setKeyManagerAlgorithm(String keyManagerAlgorithm)
HasKeystore
setKeyManagerAlgorithm
in interface HasKeystore
public String getKeyManagerAlgorithm()
getKeyManagerAlgorithm
in interface HasKeystore
@ReferTo(value=HttpSessionBase.class) public void setTruststore(String truststore)
HasTruststore
setTruststore
in interface HasTruststore
public String getTruststore()
getTruststore
in interface HasTruststore
@ReferTo(value=HttpSessionBase.class) public void setTruststoreType(KeystoreType truststoreType)
HasTruststore
setTruststoreType
in interface HasTruststore
public KeystoreType getTruststoreType()
getTruststoreType
in interface HasTruststore
@ReferTo(value=HttpSessionBase.class) public void setTruststoreAuthAlias(String truststoreAuthAlias)
HasTruststore
setTruststoreAuthAlias
in interface HasTruststore
public String getTruststoreAuthAlias()
getTruststoreAuthAlias
in interface HasTruststore
@ReferTo(value=HttpSessionBase.class) public void setTruststorePassword(String truststorePassword)
HasTruststore
setTruststorePassword
in interface HasTruststore
public String getTruststorePassword()
getTruststorePassword
in interface HasTruststore
@ReferTo(value=HttpSessionBase.class) public void setTrustManagerAlgorithm(String trustManagerAlgorithm)
HasTruststore
setTrustManagerAlgorithm
in interface HasTruststore
public String getTrustManagerAlgorithm()
getTrustManagerAlgorithm
in interface HasTruststore
@ReferTo(value=HttpSessionBase.class) public void setVerifyHostname(boolean verifyHostname)
HasTruststore
true
, the hostname in the certificate will be checked against the actual hostname of the peersetVerifyHostname
in interface HasTruststore
public boolean isVerifyHostname()
isVerifyHostname
in interface HasTruststore
@ReferTo(value=HttpSessionBase.class) public void setAllowSelfSignedCertificates(boolean testModeNoCertificatorCheck)
HasTruststore
true
, self signed certificates are acceptedsetAllowSelfSignedCertificates
in interface HasTruststore
public boolean isAllowSelfSignedCertificates()
isAllowSelfSignedCertificates
in interface HasTruststore
@ReferTo(value=HttpSessionBase.class) public void setIgnoreCertificateExpiredException(boolean ignoreCertificateExpiredException)
HasTruststore
true
, CertificateExpiredExceptions are ignoredsetIgnoreCertificateExpiredException
in interface HasTruststore
public boolean isIgnoreCertificateExpiredException()
isIgnoreCertificateExpiredException
in interface HasTruststore
@ReferTo(value=HttpSessionBase.class) public void setFollowRedirects(boolean b)
@ReferTo(value=HttpSessionBase.class) public void setStaleChecking(boolean b)
@ReferTo(value=HttpSessionBase.class) public void setStaleTimeout(int timeout)
@ReferTo(value=HttpSessionBase.class) public void setProtocol(String protocol)
Copyright © 2023 Frank!Framework. All rights reserved.