Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: dr/davmgr/protocol/Authorization.java


1   package dr.davmgr.protocol;
2   
3   public class Authorization
4   {
5     public final static int BASIC_AUTHORIZATION = 1;
6     public final static int DIGEST_AUTHORIZATION = 2;
7     public final static int PROXY_BASIC_AUTHORIZATION = 3;
8     public final static int PROXY_DIGEST_AUTHORIZATION = 4;
9     String login = null,
10           password = null,
11     realm = null;
12    int type = BASIC_AUTHORIZATION;   
13    public Authorization(String login, String password, String realm, int type) {
14      this.login=login;
15      this.password=password;
16      this.realm=realm;
17      this.type=type;
18    }
19    public void setType(int type) {
20      this.type=type;
21    }
22    public int getType() {  
23      return type;
24    }
25    public void setLogin(String login) {
26      this.login=login;
27    }
28    public String getLogin() {
29      return login;
30    }  
31    public void setPassword(String password) {
32      this.password=password;
33    }
34    public String getPassword() {
35      return password;
36    }
37    public void setRealm(String realm) {
38      this.realm=realm;
39    }
40    public String getRealm() {
41      return realm;
42    }  
43    public String toString() {
44      return getClass().getName()+
45             "[realm=\"" + realm + "\"" +
46       "; login=" + login + "; password=" + password;
47    }
48    public void finalize() {
49      login=null; password=null; realm=null;
50    }
51  }