package gmt.io.server.vo;
/**
 * ServiceClient정보를 관리 하기 위한 vo클래스
 * @author 박병관
 * @since 2018.07.27
 * @version 1.0
 * @see
 *
 * <pre>
 * << 개정이력(Modification Information) >>
 *
 *   수정일      				수정자          	수정내용
 *  -------------   ----------    ---------------------------
 *  2018.07.27  		박병관          	최초개발
 *  </pre>
 */

import gmt.common.vo.MonitorInfoVO;
import gmt.common.vo.MsgObjVO;
import gmt.common.vo.NetStatVO;

import java.util.ArrayDeque;
import java.util.Queue;

public class ServiceClientVO {
	//ServiceClient의 reSendQ
	private Queue<MsgObjVO> reSendQ;
	//ServiceClient 네트워크 정보 VO
	private NetStatVO netStatVO;
	//ServiceClient의 Monitor정보 VO
	private MonitorInfoVO monitorInfoVO;
	//ServiceClient id
	private int id;
	//ServiceClient의 connId
	private String connID;
	//ServiceClient가 붙은 Server Id
	private int serverID;
	//ServiceClient가 붙은 Server Port
	private int serverPort;
	//ServiceClient Name
	private String name;
	//ServiceClient Ip
	private String ip;
	//ServiceClient Port
	private int servicePort;
	//ServiceClient sndStat
	private boolean sndStat;
	//ServiceClient MsgBuffer
	private String msgBuffer;
	//ServiceClient Desc
	private String desc;
	//ServiceClient 사용자 정보
	private String userInfo;
	
	
	public ServiceClientVO() {
		reSendQ = new ArrayDeque<MsgObjVO>();
		netStatVO = new NetStatVO();
		monitorInfoVO = new MonitorInfoVO();
	}
	
	public void setInfo(int id, int serverPort, String connId, String ip, int servicePort, String name) {
		this.id = id;
		this.serverPort = serverPort;
		this.connID = connId;
		this.ip = ip;
		this.servicePort = servicePort;
		this.name = name;
		this.desc = desc;
		this.userInfo = "";
		this.msgBuffer = "";
	}
	
	public Queue<MsgObjVO> getReSendQ() {
		return reSendQ;
	}
	public void setReSendQ(Queue<MsgObjVO> reSendQ) {
		this.reSendQ = reSendQ;
	}
	public NetStatVO getNetStatVO() {
		return netStatVO;
	}
	public void setNetStatVO(NetStatVO netStatVO) {
		this.netStatVO = netStatVO;
	}
	public MonitorInfoVO getMonitorInfoVO() {
		return monitorInfoVO;
	}
	public void setMonitorInfoVO(MonitorInfoVO monitorInfoVO) {
		this.monitorInfoVO = monitorInfoVO;
	}
	public int getId() {
		return id;
	}
	public String getConnID() {
		return connID;
	}
	public int getServerID() {
		return serverID;
	}
	public int getServerPort() {
		return serverPort;
	}
	public String getName() {
		return name;
	}
	public String getIp() {
		return ip;
	}
	public int getServicePort() {
		return servicePort;
	}
	public boolean isSndStat() {
		return sndStat;
	}
	public String getMsgBuffer() {
		return msgBuffer;
	}
	public String getDesc() {
		return desc;
	}
	public String getUserInfo() {
		return userInfo;
	}
	public void setId(int id) {
		this.id = id;
	}
	public void setConnID(String connID) {
		this.connID = connID;
	}
	public void setServerID(int serverID) {
		this.serverID = serverID;
	}
	public void setServerPort(int serverPort) {
		this.serverPort = serverPort;
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	public void setServicePort(int servicePort) {
		this.servicePort = servicePort;
	}
	public void setSndStat(boolean sndStat) {
		this.sndStat = sndStat;
	}
	public void setMsgBuffer(String msgBuffer) {
		this.msgBuffer = msgBuffer;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	public void setUserInfo(String userInfo) {
		this.userInfo = userInfo;
	}
	
	public void clean() {
		reSendQ = null;
		netStatVO = null;
		monitorInfoVO = null;
		id = 0;
		connID = null;
		serverID = 0;
		serverPort = 0;
		name = null;
		ip = null;
		servicePort = 0;
		sndStat = true;
		msgBuffer = null;
		desc = null;
		userInfo = null;
		reSendQ.clear();
		reSendQ = null;
		netStatVO = null;
		/*netStatVO.setItemNull();*/
		/*monitorInfoVO = null;*/
	}
}
