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: CreateSessionRequest.java,v 1.2 2002/01/29 20:57:16 lizellaman Exp $
25: * $Log: CreateSessionRequest.java,v $
26: * Revision 1.2 2002/01/29 20:57:16 lizellaman
27: * Added LoggingInterface, modified the PropertiesInterface implementation
28: *
29: * Revision 1.1.1.1 2001/10/23 13:37:20 lizellaman
30: * initial sourceforge release
31: *
32: */
33:
34: package org.datashare.objects;
35:
36: /**
37: * This object is sent from the Client to the Server when a Client wishes to have
38: * a new session created. The server will respond with a clientSessionInfo objet that gives
39: * details about what sockets to use for the session that was created.
40: */
41: public class CreateSessionRequest implements java.io.Serializable {
42: /**
43: * this allows us to serialize this class without 'marshalling' errors.
44: *
45: */
46: static final long serialVersionUID = 9031593818855490506L;
47:
48: public String sessionName;
49: public String sessionDescription;
50: public boolean sessionIsPrivate = false;
51: public boolean autoDelete = false; // see SessionInfo.setAutoDelete
52: public ChannelDescriptionArray desiredChannels;
53: public boolean joinIfAlreadyExists = false; // if the session to be created already exists, just join it,
54:
55: // don't create it. Note that this should probably be true
56: // only for clients that create just one Session for all Clients
57:
58: private CreateSessionRequest() {
59: }
60:
61: public CreateSessionRequest(String sessionName,
62: String sessionDescription,
63: boolean sessionIsPrivate,
64: boolean autoDeleteSession, // if true, will cause channels to be deleted once empty
65: ChannelDescriptionArray desiredChannels,
66: boolean joinIfAlreadyExists) {
67: this (sessionName, sessionDescription, sessionIsPrivate,
68: desiredChannels);
69: this .joinIfAlreadyExists = joinIfAlreadyExists;
70: this .autoDelete = autoDeleteSession;
71: }
72:
73: public CreateSessionRequest(String sessionName,
74: String sessionDescription, boolean sessionIsPrivate,
75: ChannelDescriptionArray desiredChannels) {
76: this (sessionName, sessionDescription, desiredChannels);
77: this .sessionIsPrivate = sessionIsPrivate;
78: }
79:
80: public CreateSessionRequest(String sessionName,
81: String sessionDescription,
82: ChannelDescriptionArray desiredChannels) {
83: this.sessionName = sessionName;
84: this.sessionDescription = sessionDescription;
85: this.desiredChannels = desiredChannels;
86: }
87:
88: }
|