01: /* ----- BEGIN LICENSE BLOCK -----
02: * Version: MPL 1.1
03: *
04: * The contents of this file are subject to the Mozilla Public License Version
05: * 1.1 (the "License"); you may not use this file except in compliance with
06: * the License. You may obtain a copy of the License at
07: * http://www.mozilla.org/MPL/
08: *
09: * 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;
37: import java.net.InetAddress;
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 {
45: /**
46: * this allows us to serialize this class without 'marshalling' errors.
47: *
48: */
49: static final long serialVersionUID = 9030593713711490535L;
50:
51: public String serverStatus; // server puts a status string in here
52: public boolean clientRegistered; // set to true if server allows client to use its services
53: public boolean clientIsAdmin; // set to true if server decides this client has admin privileges
54: public boolean usingBeans; // set to true if the server is storing objects via EJBs
55: public String clientKey; // the keyValue for the client this object is going to (unique name)
56: public String serverStartTime; // time the server was last started
57: public boolean verbose; // true if server is printing lots to the console
58: public InetAddress commandStatusConnection; // commandStatus connection to the server
59:
60: /**
61: * constructor, useful only for testing
62: */
63: public ServerInfo() {
64: }
65:
66: public ServerInfo(boolean clientRegistered, boolean clientIsAdmin,
67: String clientKey, boolean usingBeans, String serverStatus,
68: String serverStartTime,
69: InetAddress commandStatusConnection, boolean verbose) {
70: this.serverStatus = serverStatus;
71: this.clientRegistered = clientRegistered;
72: this.clientIsAdmin = clientIsAdmin;
73: this.clientKey = clientKey;
74: this.usingBeans = usingBeans;
75: this.serverStartTime = serverStartTime;
76: this.commandStatusConnection = commandStatusConnection;
77: this.verbose = verbose;
78: }
79: }
|