configuration.java

来自「一个java实现的邮件服务器系统 使用邮件客户端工具」· Java 代码 · 共 73 行

JAVA
73
字号

import java.io.Serializable;

//用户配置类
public class Configuration implements Serializable {
	static String strName;		//用户名称
	static String strAccount;	//用户帐户
	static String strPassword;	//用户密码
	static String strPOP3;		//POP3设置
	static String strSMTP;		//SMTP设置
	static boolean bAuthenticateNeeded;	//是否需要身份验证标识

	//设置用户名称
	public static void setName(String StrName) {
		strName = StrName;
	}
	
	//设置用户帐户
	public static void setAccount(String StrAccount) {
		strAccount = StrAccount;
	}
	
	//设置用户密码
	public static void setPassword(String StrPassword) {
		strPassword = StrPassword;
	}
	
	//设置POP3设置
	public static void setPOP3(String StrPOP3) {
		strPOP3 = StrPOP3;
	}
	
	//设置SMTP设置
	public static void setSMTP(String StrSMTP) {
		strSMTP = StrSMTP;
	}
	
	//设置是否需要身份验证标识
	public static void setBAuthenticateNeeded(boolean BAuthenticateNeeded) {
		bAuthenticateNeeded = BAuthenticateNeeded;
	}

	//得到用户名称
	public static String getName() {
		return strName;
	}
	
	//用户帐户
	public static String getAccount() {
		return strAccount;
	}
	
	//用户密码
	public static String getPassword() {
		return strPassword;
	}
	
	//POP3设置
	public static String getPOP3() {
		return strPOP3;
	}
	
	//SMTP设置
	public static String getSMTP() {
		return strSMTP;
	}
	
	//是否需要身份验证标识
	public static boolean getBAuthenticateNeeded() {
		return bAuthenticateNeeded;
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?