subscriber.java

来自「是一个用java实现的」· Java 代码 · 共 76 行

JAVA
76
字号
/*
 * Created on Feb 7, 2004
 */
package gov.nist.applet.phone.ua.presence;

import javax.sip.Dialog;

/**
 * This class represents a suscriber to our presence
 * 
 * @author Jean Deruelle
 *
 * <a href="{@docRoot}/uncopyright.html">This code is in the public domain.</a>
 */
public class Subscriber {
	private Dialog dialog;
	private String address;
	private String status;
	/**
	 * Constructs a new instance of subscriber
	 */
	public Subscriber(String address) {
		this.address=address;
		status="offline";
	}

	/**
	 * Retrieve the Dialog from which we get the subscriber
	 * @return the Dialog from which we get the subscriber
	 */
	public Dialog getDialog(){
		return this.dialog;
	}

	/**
	 * Set the Dialog from which we get the subscriber
	 * @param dialog - the serverTransaction from which we get the subscriber
	 */
	public void setDialog(Dialog dialog){
		this.dialog=dialog;
	}
	
	/**
	 * Retrieve the address of the subscriber
	 * @return the address of the subscriber
	 */
	public String getAddress(){
		return this.address;
	}

	/**
	 * Set the address of the subscriber
	 * @param address - the address of the subscriber
	 */
	public void setAddress(String address){
		this.address=address;
	}
	
	/**
	 * Retrieve the status of the subscriber
	 * @return the status of the subscriber
	 */
	public String getStatus(){
		return this.status;
	}

	/**
	 * Set the status of the subscriber
	 * @param status - the address of the subscriber
	 */
	public void setStatus(String status){
		this.status=status;
	}
	
}

⌨️ 快捷键说明

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