KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sessionViewer > SessionViewerUser


1 /*
2  * cacheAdmin
3  *
4  * Enhydra super-servlet
5  *
6  */

7
8 package sessionViewer;
9
10 import com.lutris.appserver.server.user.User;
11
12 /**
13  * This class provides a User object. There should only be one administrator
14  * logged in at a time, but if more than one does they will share the same
15  * User object.
16  */

17 public class SessionViewerUser implements User {
18
19    /**
20     * Use this User object when someone logs in.
21     */

22   // protected static SessionViewerUser sharedUser = new SessionViewerUser("Administrator");
23

24
25    /**
26     * The user's name.
27     */

28    private String JavaDoc username;
29
30
31    /**
32     * Only create one instance.
33     */

34    public SessionViewerUser(String JavaDoc username) {
35       this.username = username;
36    }
37
38
39    /**
40     * Returns the username of the user.
41     *
42     * @return The user's name.
43     */

44    public String JavaDoc getName() {
45       return username;
46    }
47
48 }
49
50
Popular Tags