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: ControlServerObject.java,v 1.1.1.1 2001/10/23 13:37:20 lizellaman Exp $
25: * $Log: ControlServerObject.java,v $
26: * Revision 1.1.1.1 2001/10/23 13:37:20 lizellaman
27: * initial sourceforge release
28: *
29: */
30:
31: package org.datashare.objects;
32:
33: /**
34: * This object is sent from the client to the server when the client wants to
35: * change some feature on the server at run time.
36: */
37: public class ControlServerObject implements java.io.Serializable {
38: /**
39: * this allows us to serialize this class without 'marshalling' errors.
40: *
41: */
42: static final long serialVersionUID = 8498534095840958404L;
43:
44: ///// this is the list of serviceType values
45: public static final int VERBOSEserviceType = 1; // valid values are ON/OFF
46:
47: ///// this is the list of valid serviceValue values (in addition to int and String values)
48: public static final int ONserviceValue = 1;
49: public static final int OFFserviceValue = 2;
50: public static final int TRUEserviceValue = 3;
51: public static final int FALSEserviceValue = 4;
52:
53: /**
54: * will hold the type of service that is requested
55: */
56: public int serviceType = 0;
57:
58: /**
59: * will hold the value for the requested service that are of type String
60: */
61: public String serviceValueString = "";
62:
63: /**
64: * will hold the value for the requested service that are of type int
65: */
66: public int serviceValueInt = Integer.MIN_VALUE;
67:
68: public ControlServerObject() {
69: }
70:
71: public ControlServerObject(int serviceType, String serviceValue) {
72: this .serviceType = serviceType;
73: serviceValueString = serviceValue;
74: }
75:
76: public ControlServerObject(int serviceType, int serviceValue) {
77: this.serviceType = serviceType;
78: serviceValueInt = serviceValue;
79: }
80:
81: }
|