KickJava   Java API By Example, From Geeks To Geeks.

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


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: 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 JavaDoc
42    {
43    /**
44     * this allows us to serialize this class without 'marshalling' errors.
45     *
46     */

47    static final long serialVersionUID = 9031593818855490506L;
48
49    public String JavaDoc sessionName;
50    public String JavaDoc sessionDescription;
51    public boolean sessionIsPrivate = false;
52    public boolean autoDelete = false; // see SessionInfo.setAutoDelete
53
public ChannelDescriptionArray desiredChannels;
54    public boolean joinIfAlreadyExists = false; // if the session to be created already exists, just join it,
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
62    public CreateSessionRequest(String JavaDoc sessionName,
63                                String JavaDoc sessionDescription,
64                                boolean sessionIsPrivate,
65                                boolean autoDeleteSession, // if true, will cause channels to be deleted once empty
66
ChannelDescriptionArray desiredChannels,
67                                boolean joinIfAlreadyExists)
68       {
69       this(sessionName, sessionDescription, sessionIsPrivate, desiredChannels);
70       this.joinIfAlreadyExists = joinIfAlreadyExists;
71       this.autoDelete = autoDeleteSession;
72       }
73
74    public CreateSessionRequest(String JavaDoc sessionName,
75                                String JavaDoc sessionDescription,
76                                boolean sessionIsPrivate,
77                                ChannelDescriptionArray desiredChannels)
78       {
79       this(sessionName, sessionDescription, desiredChannels);
80       this.sessionIsPrivate = sessionIsPrivate;
81       }
82
83    public CreateSessionRequest(String JavaDoc sessionName,
84                                String JavaDoc sessionDescription,
85                                ChannelDescriptionArray desiredChannels)
86       {
87       this.sessionName = sessionName;
88       this.sessionDescription = sessionDescription;
89       this.desiredChannels = desiredChannels;
90       }
91
92    }
93
Free Books   Free Magazines  
Popular Tags