本文整理汇总了Java中org.hazlewood.connor.bottema.emailaddress.EmailAddressCriteria类的典型用法代码示例。如果您正苦于以下问题:Java EmailAddressCriteria类的具体用法?Java EmailAddressCriteria怎么用?Java EmailAddressCriteria使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EmailAddressCriteria类属于org.hazlewood.connor.bottema.emailaddress包,在下文中一共展示了EmailAddressCriteria类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MailerGenericBuilder
import org.hazlewood.connor.bottema.emailaddress.EmailAddressCriteria; //导入依赖的package包/类
/**
* Sets defaults configured for proxy host, proxy port, proxy username, proxy password and proxy bridge port (used in authenticated proxy).
* <p>
* <strong>Note:</strong> Any builder methods invoked after this will override the default value.
*/
MailerGenericBuilder() {
if (hasProperty(PROXY_HOST)) {
withProxyHost((String) getProperty(PROXY_HOST));
}
if (hasProperty(PROXY_PORT)) {
withProxyPort((Integer) getProperty(PROXY_PORT));
}
if (hasProperty(PROXY_USERNAME)) {
withProxyUsername((String) getProperty(PROXY_USERNAME));
}
if (hasProperty(PROXY_PASSWORD)) {
withProxyPassword((String) getProperty(PROXY_PASSWORD));
}
withProxyBridgePort(ConfigLoader.valueOrProperty(null, Property.PROXY_SOCKS5BRIDGE_PORT, DEFAULT_PROXY_BRIDGE_PORT));
withDebugLogging(ConfigLoader.valueOrProperty(null, Property.JAVAXMAIL_DEBUG, false));
withSessionTimeout(ConfigLoader.valueOrProperty(null, Property.DEFAULT_SESSION_TIMEOUT_MILLIS, DEFAULT_SESSION_TIMEOUT_MILLIS));
withThreadPoolSize(ConfigLoader.valueOrProperty(null, Property.DEFAULT_POOL_SIZE, DEFAULT_POOL_SIZE));
withTransportModeLoggingOnly(ConfigLoader.valueOrProperty(null, Property.TRANSPORT_MODE_LOGGING_ONLY, DEFAULT_TRANSPORT_MODE_LOGGING_ONLY));
withEmailAddressCriteria(EmailAddressCriteria.RFC_COMPLIANT);
trustingAllHosts(true);
}
示例2: assertEmail
import org.hazlewood.connor.bottema.emailaddress.EmailAddressCriteria; //导入依赖的package包/类
private static void assertEmail(String emailaddress, boolean expected) {
final boolean isValid = EmailAddressValidator.isValid(emailaddress, EmailAddressCriteria.RFC_COMPLIANT);
if (isValid != expected) {
throw new IllegalArgumentException(String.format("%s (expected: %s, but was: %s)", emailaddress, expected, isValid));
}
}
示例3: getEmailAddressCriteria
import org.hazlewood.connor.bottema.emailaddress.EmailAddressCriteria; //导入依赖的package包/类
/**
* @see #withEmailAddressCriteria(EnumSet)
*/
public EnumSet<EmailAddressCriteria> getEmailAddressCriteria() {
return emailAddressCriteria;
}
示例4: getEmailAddressCriteria
import org.hazlewood.connor.bottema.emailaddress.EmailAddressCriteria; //导入依赖的package包/类
/**
* @return The effective validation criteria used for email validation. Returns an empty set if no validation should be done.
*/
@Nonnull
public EnumSet<EmailAddressCriteria> getEmailAddressCriteria() {
return emailAddressCriteria;
}
示例5: setEmailAddressCriteria
import org.hazlewood.connor.bottema.emailaddress.EmailAddressCriteria; //导入依赖的package包/类
/**
* Overrides the default email address validation restrictions {@link #emailAddressCriteria} when validating and sending emails using the current
* <code>Mailer</code> instance.
*/
public void setEmailAddressCriteria(final EnumSet<EmailAddressCriteria> emailAddressCriteria) {
this.emailAddressCriteria = emailAddressCriteria;
}
示例6: withEmailAddressCriteria
import org.hazlewood.connor.bottema.emailaddress.EmailAddressCriteria; //导入依赖的package包/类
/**
* Sets the email address validation restrictions when validating and sending emails using the current <code>Mailer</code> instance.
* <p>
* Defaults to {@link EmailAddressCriteria#RFC_COMPLIANT} if not overridden with a ({@code null}) value.
*
* @see EmailAddressCriteria
* @see #clearEmailAddressCriteria()
* @see #resetEmailAddressCriteria()
*/
public T withEmailAddressCriteria(@Nonnull final EnumSet<EmailAddressCriteria> emailAddressCriteria) {
this.emailAddressCriteria = emailAddressCriteria.clone();
return (T) this;
}
示例7: resetEmailAddressCriteria
import org.hazlewood.connor.bottema.emailaddress.EmailAddressCriteria; //导入依赖的package包/类
/**
* Resets emailAddressCriteria to {@link EmailAddressCriteria#RFC_COMPLIANT}.
*
* @see #withEmailAddressCriteria(EnumSet)
* @see #clearEmailAddressCriteria()
*/
public T resetEmailAddressCriteria() {
return withEmailAddressCriteria(EmailAddressCriteria.RFC_COMPLIANT);
}
示例8: clearEmailAddressCriteria
import org.hazlewood.connor.bottema.emailaddress.EmailAddressCriteria; //导入依赖的package包/类
/**
* Removes all email address criteria, meaning validation won't take place.
*
* @see #withEmailAddressCriteria(EnumSet)
* @see #resetEmailAddressCriteria()
*/
public T clearEmailAddressCriteria() {
return withEmailAddressCriteria(EnumSet.noneOf(EmailAddressCriteria.class));
}