KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > datashare > objects > ServerInfo


1 /* ----- BEGIN LICENSE BLOCK -----
2  * Version: MPL 1.1
3  *
4  * The contents of this file are subject to the Mozilla Public License Version
5  * 1.1 (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  * http://www.mozilla.org/MPL/
8  *
9  * Software distributed under the License is distributed on an "AS IS" basis,
10  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11  * for the specific language governing rights and limitations under the
12  * License.
13  *
14  * The Original Code is the DataShare server.
15  *
16  * The Initial Developer of the Original Code is
17  * Ball Aerospace & Technologies Corp, Fairborn, Ohio
18  * Portions created by the Initial Developer are Copyright (C) 2001
19  * the Initial Developer. All Rights Reserved.
20  *
21  * Contributor(s): Charles Wood <cwood@ball.com>
22  *
23  * ----- END LICENSE BLOCK ----- */

24 /* RCS $Id: ServerInfo.java,v 1.2 2002/02/04 19:35:20 lizellaman Exp $
25  * $Log: ServerInfo.java,v $
26  * Revision 1.2 2002/02/04 19:35:20 lizellaman
27  * correct spelling of privilege
28  *
29  * Revision 1.1.1.1 2001/10/23 13:37:19 lizellaman
30  * initial sourceforge release
31  *
32  */

33
34 package org.datashare.objects;
35
36 import java.io.Serializable JavaDoc;
37 import java.net.InetAddress JavaDoc;
38
39 /**
40  * This object is sent from the server to a client shortly after the client
41  * connects to the server's CommandStatus channel, and is used to relay server
42  * information to the client.
43  */

44 public class ServerInfo implements Serializable JavaDoc
45    {
46    /**
47     * this allows us to serialize this class without 'marshalling' errors.
48     *
49     */

50    static final long serialVersionUID = 9030593713711490535L;
51
52    public String JavaDoc serverStatus; // server puts a status string in here
53
public boolean clientRegistered; // set to true if server allows client to use its services
54
public boolean clientIsAdmin; // set to true if server decides this client has admin privileges
55
public boolean usingBeans; // set to true if the server is storing objects via EJBs
56
public String JavaDoc clientKey; // the keyValue for the client this object is going to (unique name)
57
public String JavaDoc serverStartTime; // time the server was last started
58
public boolean verbose; // true if server is printing lots to the console
59
public InetAddress JavaDoc commandStatusConnection; // commandStatus connection to the server
60

61    /**
62     * constructor, useful only for testing
63     */

64    public ServerInfo()
65       {}
66
67    public ServerInfo(boolean clientRegistered,
68                      boolean clientIsAdmin,
69                      String JavaDoc clientKey,
70                      boolean usingBeans,
71                      String JavaDoc serverStatus,
72                      String JavaDoc serverStartTime,
73                      InetAddress JavaDoc commandStatusConnection,
74                      boolean verbose)
75       {
76       this.serverStatus = serverStatus;
77       this.clientRegistered = clientRegistered;
78       this.clientIsAdmin = clientIsAdmin;
79       this.clientKey = clientKey;
80       this.usingBeans = usingBeans;
81       this.serverStartTime = serverStartTime;
82       this.commandStatusConnection = commandStatusConnection;
83       this.verbose = verbose;
84       }
85    }
86
Popular Tags