All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.featherfly.common.net.mail.MailServer Maven / Gradle / Ivy


package cn.featherfly.common.net.mail;

import cn.featherfly.common.lang.AssertIllegalArgument;

/**
 * 

* MailServer *

* * @author 钟冀 */ public class MailServer { private String host; private int port; private String protocol; /** */ public MailServer(String host, int port, String protocol) { AssertIllegalArgument.isNotEmpty(host, "host不能为空"); AssertIllegalArgument.isNotNull(port, "port不能为空"); AssertIllegalArgument.isNotEmpty(protocol, "protocol不能为空"); this.host = host; this.port = port; this.protocol = protocol; } /** * 返回host * @return host */ public String getHost() { return host; } /** * 返回port * @return port */ public int getPort() { return port; } /** * 返回protocol * @return protocol */ public String getProtocol() { return protocol; } /** * {@inheritDoc} */ @Override public String toString() { return protocol + "://" + host + ":" + port; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy