KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > quickserver > net > server > AuthStatus


1 /*
2  * This file is part of the QuickServer library
3  * Copyright (C) 2003-2005 QuickServer.org
4  *
5  * Use, modification, copying and distribution of this software is subject to
6  * the terms and conditions of the GNU Lesser General Public License.
7  * You should have received a copy of the GNU LGP License along with this
8  * library; if not, you can download a copy from <http://www.quickserver.org/>.
9  *
10  * For questions, suggestions, bug-reports, enhancement-requests etc.
11  * visit http://www.quickserver.org
12  *
13  */

14
15 package org.quickserver.net.server;
16 /**
17  * This class defines the state of authentication.
18  * @since 1..4.6
19  * @author Akshathkumar Shetty
20  */

21 public class AuthStatus {
22     private int status;
23     private String JavaDoc desc;
24
25     private AuthStatus(int status) {
26         this.status = status;
27         if(status==1) {
28             desc = "Success";
29         } else {
30             desc = "Failure";
31         }
32     }
33
34     public String JavaDoc toString() {
35         return desc;
36     }
37
38     public static final AuthStatus FAILURE = new AuthStatus(0);
39     public static final AuthStatus SUCCESS = new AuthStatus(1);
40 }
Popular Tags