KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > datashare > client > DataShareClientInterface


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 was the Rendezvous client.
15  * The Code is now DataShare.
16  *
17  * The Initial Developer of the Original Code is
18  * Ball Aerospace & Technologies Corp, Fairborn, Ohio
19  * Portions created by the Initial Developer are Copyright (C) 2001
20  * the Initial Developer. All Rights Reserved.
21  *
22  * Contributor(s): Charles Wood <cwood@ball.com>
23  *
24  * ----- END LICENSE BLOCK ----- */

25 /* RCS $Id: DataShareClientInterface.java,v 1.1 2002/01/03 03:21:36 lizellaman Exp $
26  * $Log: DataShareClientInterface.java,v $
27  * Revision 1.1 2002/01/03 03:21:36 lizellaman
28  * existing file, moved to client package
29  *
30  * Revision 1.1.1.1 2001/10/23 13:43:48 lizellaman
31  * initial sourceforge release
32  *
33  */

34
35 package org.datashare.client;
36
37 import org.datashare.objects.DataShareObject;
38 import org.datashare.objects.UpdateAvailableMsg;
39 import javax.swing.tree.DefaultMutableTreeNode JavaDoc;
40
41 /**
42  * Must be implemented by any class that uses the DataShareClient class
43  * for a data connection to the DataShareServer. These are the callback methods
44  * that the DataShareClient will use to inform whoever implements this class
45  * about activities having to do with the DataShareServer. This class provides
46  * the methods to let the implementor know when data has arrived, when the dataConnection
47  * is ready for use, and when a problem with a connection has occured.
48  * NOTE that package names for classes that implement this interface MUST BE UNIQUE
49  * on the datashare server. You may have to change your package name if you find it is not unique
50  * or else your data may get mingled with other non-associated class's data...
51  */

52 public interface DataShareClientInterface extends ClientDataReceiverInterface
53    {
54    // the ClientDataReceiverInterface methods are used to make callbacks on the
55
// implementor of this interface for data channnel events
56

57    /**
58     * called automatically when the data connection is setup and available for use, the
59     * data channel must not be used before this gets called.
60     * @param success true if the data channel is ready for use, false if we failed
61     * to get it established.
62     */

63    public void
64    dataChannelIsReady(boolean success);
65
66    /**
67     * this method is called when the command/status connection has an error,
68     * this will be used to notify anybody that cares...
69     * @param fatalError indicates is error is fatal, non-fatal error example is when a re-connect is attempted
70     * @param errorMsg explains the nature of the error, suitable for user display
71     */

72    public void
73    commandStatusConnectionError(boolean fatalError, String JavaDoc errorMsg);
74
75    /**
76     * called when a change has occured with the session/client tree
77     */

78    public void
79    updateReceived(UpdateAvailableMsg msg);
80
81    /**
82     * called when a new tree has been received
83     */

84    public void
85    treeReceived(DefaultMutableTreeNode JavaDoc newTreeNode);
86
87    }
88
Popular Tags