KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > rift > coad > lib > interceptor > credentials > Credential


1 /*
2  * CoadunationClient: The client libraries for Coadunation. (RMI/CORBA)
3  * Copyright (C) 2006 Rift IT Contracting
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * Credential.java
20  *
21  * The base of the credential object hierachy tree.
22  */

23
24 package com.rift.coad.lib.interceptor.credentials;
25
26 // java packages
27
import java.io.Serializable JavaDoc;
28
29 /**
30  * The base of the credential object hierachy tree.
31  *
32  * @author Brett Chaldecott
33  */

34 public class Credential implements Serializable JavaDoc {
35     
36     // private member variables
37
private String JavaDoc username = null;
38     
39     /**
40      * Creates a new instance of Credential
41      */

42     public Credential() {
43     }
44     
45     
46     /**
47      * Creates a new instance of Credential
48      *
49      * @param username The username for authentication purposes.
50      */

51     public Credential(String JavaDoc username) {
52         this.username = username;
53     }
54     
55     
56     /**
57      * This method returns the username of object.
58      *
59      * @return The string containing the username of this credential.
60      */

61     public String JavaDoc getUsername() {
62         return username;
63     }
64     
65     
66     /**
67      * This method sets the username for these credentials.
68      *
69      * @param username The name of the user.
70      */

71     public void setUsername(String JavaDoc username) {
72         this.username = username;
73     }
74 }
75
Popular Tags