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 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;
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
53: ClientDataReceiverInterface {
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 dataChannelIsReady(boolean success);
64:
65: /**
66: * this method is called when the command/status connection has an error,
67: * this will be used to notify anybody that cares...
68: * @param fatalError indicates is error is fatal, non-fatal error example is when a re-connect is attempted
69: * @param errorMsg explains the nature of the error, suitable for user display
70: */
71: public void commandStatusConnectionError(boolean fatalError,
72: String errorMsg);
73:
74: /**
75: * called when a change has occured with the session/client tree
76: */
77: public void updateReceived(UpdateAvailableMsg msg);
78:
79: /**
80: * called when a new tree has been received
81: */
82: public void treeReceived(DefaultMutableTreeNode newTreeNode);
83:
84: }
|