KickJava   Java API By Example, From Geeks To Geeks.

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


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: 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    /**
50     * This method is called automatically whenever new
51     * data is received from the server in this Channel.
52     *
53     * @param dataShareObject the data object received from the DataShareServer
54     */

55    public void
56    newDataReceived(DataShareObject dataShareObject);
57
58    /**
59     * called automatically when the data connection is setup and available for use, the
60     * data channel must not be used before this gets called.
61     *
62     * @param success true if the data channel is ready for use, false if we
63     * failed to get it established.
64     */

65    public void
66    dataChannelIsReady(boolean success);
67
68    /**
69     * this method is called automatically when the data connection has been lost,
70     * this will be used to notify anybody that cares...
71     */

72    public void
73    dataConnectionLost();
74
75    /**
76     * this method is called automatically when the command/status connection has been lost,
77     * this will be used to notify anybody that cares...
78     */

79    public void
80    commandStatusConnectionLost();
81
82    }
83
Popular Tags