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: BroadCastInterface.java,v 1.2 2002/01/20 23:30:24 lizellaman Exp $
25: * $Log: BroadCastInterface.java,v $
26: * Revision 1.2 2002/01/20 23:30:24 lizellaman
27: * javadoc updates
28: *
29: * Revision 1.1 2002/01/03 03:21:36 lizellaman
30: * existing file, moved to client package
31: *
32: */
33:
34: package org.datashare.client;
35:
36: import org.datashare.objects.DataShareObject;
37:
38: /**
39: * Must be implemented by any class that uses the BroadCastClient class
40: * for a data connection to the DataShareServer. These are the callback methods
41: * that the BroadCastClient will use to inform whoever implements this class
42: * about activities having to do with the DataShareServer. This class provides
43: * the methods to let the implementing class know when data has arrived, when
44: * the dataConnection is ready for use, and when a problem with a connection has occured.
45: */
46: public interface BroadCastInterface {
47:
48: /**
49: * This method is called automatically whenever new
50: * data is received from the server in this Channel.
51: *
52: * @param dataShareObject the data object received from the DataShareServer
53: */
54: public void newDataReceived(DataShareObject dataShareObject);
55:
56: /**
57: * called automatically when the data connection is setup and available for use, the
58: * data channel must not be used before this gets called.
59: *
60: * @param success true if the data channel is ready for use, false if we
61: * failed to get it established.
62: */
63: public void dataChannelIsReady(boolean success);
64:
65: /**
66: * this method is called automatically when the data connection has been lost,
67: * this will be used to notify anybody that cares...
68: */
69: public void dataConnectionLost();
70:
71: /**
72: * this method is called automatically when the command/status connection has been lost,
73: * this will be used to notify anybody that cares...
74: */
75: public void commandStatusConnectionLost();
76:
77: }
|