当前位置: 首页>>代码示例>>Java>>正文


Java EmailAddressCriteria类代码示例

本文整理汇总了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);
}
 
开发者ID:bbottema,项目名称:simple-java-mail,代码行数:29,代码来源:MailerGenericBuilder.java

示例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));
	}
}
 
开发者ID:bbottema,项目名称:email-rfc2822-validator,代码行数:7,代码来源:TestClass.java

示例3: getEmailAddressCriteria

import org.hazlewood.connor.bottema.emailaddress.EmailAddressCriteria; //导入依赖的package包/类
/**
 * @see #withEmailAddressCriteria(EnumSet)
 */
public EnumSet<EmailAddressCriteria> getEmailAddressCriteria() {
	return emailAddressCriteria;
}
 
开发者ID:bbottema,项目名称:simple-java-mail,代码行数:7,代码来源:MailerGenericBuilder.java

示例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;
}
 
开发者ID:bbottema,项目名称:simple-java-mail,代码行数:8,代码来源:Mailer.java

示例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;
}
 
开发者ID:QianWorks,项目名称:qianworks-meican,代码行数:8,代码来源:Mailer.java

示例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;
}
 
开发者ID:bbottema,项目名称:simple-java-mail,代码行数:14,代码来源:MailerGenericBuilder.java

示例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);
}
 
开发者ID:bbottema,项目名称:simple-java-mail,代码行数:10,代码来源:MailerGenericBuilder.java

示例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));
}
 
开发者ID:bbottema,项目名称:simple-java-mail,代码行数:10,代码来源:MailerGenericBuilder.java


注:本文中的org.hazlewood.connor.bottema.emailaddress.EmailAddressCriteria类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。