usertag.java

来自「First of all, the Applet-phone is a SIP 」· Java 代码 · 共 117 行

JAVA
117
字号
/* * UserTag.java * * Created on October 31, 2002, 9:15 PM */package gov.nist.security.authentication;/** * Class representing a user * @author  deruelle */public class UserTag {    /**user name of the user*/    private String userName;    /**realm of the user*/    private String userRealm;    /**password of the user*/    private String userPassword;    /**group of the user*/    private String userGroup;    /**the sip URI with which the services of the user will register with our stateless proxy*/    private String uri;        /** Creates a new instance of UserTag */    public UserTag() {        userName=null;        userRealm=null;        userPassword=null;        userGroup=null;        uri=null;    }    /**     * Set the user name of the user     * @param userName - the user name of the user     */    public void setUserName(String userName) {        this.userName=userName;    }    /**     * Set the realm of the user     * @param userRealm - the realm of the user     */     public void setUserRealm(String userRealm) {        this.userRealm=userRealm;    }    /**     * Set the password of the user     * @param userPassword - the password of the user     */       public void setUserPassword(String userPassword) {        this.userPassword=userPassword;    }    /**     * Set the group of the user     * @param userGroup - the group of the user     */    public void setUserGroup(String userGroup) {        this.userGroup=userGroup;    }    /**     * Retrieve the group of the user     * @return the group of the user     */    public String  getUserGroup() {        return userGroup;    }    /**     * Retrieve the user name of the user     * @return the user name of the user     */    public String  getUserName() {        return userName;    }    /**     * Retrieve the realm of the user     * @return the realm of the user     */    public String  getUserRealm() {        return userRealm;    }    /**     * Retrieve the password of the user     * @return the password of the user     */     public String  getUserPassword() {        return userPassword;    }    /**     * Set the sip URI with which the services of the user will register with our stateless proxy     * @param uri - the sip URI with which the services of the user will register with our stateless proxy     */    public void setUri(String uri) {        this.uri=uri;    }    /**     * Retrieve the sip URI with which the services of the user will register with our stateless proxy     * @return the sip URI with which the services of the user will register with our stateless proxy     */    public String getUri() {        return uri;    }    /**     * Get XML String representation of the user     * @return the XML String representation of the user     */    public String toString() {        String res="<User ";        if (userName!=null ) res+="name="+"\""+userName+"\" ";                if (userPassword!=null ) res+="password="+"\""+userPassword+"\" ";                if (uri!=null ) res+="uri="+"\""+uri+"\" ";                res+="/>\n";                return res;    }    }

⌨️ 快捷键说明

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