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: DataReceiverInterface.java,v 1.1.1.1 2001/10/23 13:37:19 lizellaman Exp $
25: * $Log: DataReceiverInterface.java,v $
26: * Revision 1.1.1.1 2001/10/23 13:37:19 lizellaman
27: * initial sourceforge release
28: *
29: */
30:
31: package org.datashare;
32:
33: import org.datashare.objects.DataShareObject;
34: import org.datashare.objects.DataShareConnectionDescriptor;
35:
36: /**
37: * this interface is to be implemented by any object that wishes to receive the data
38: * from our sockets. Used by the server only.
39: * @date March 01, 2001
40: * @author Charles Wood
41: * @version 1.0
42: */
43: public interface DataReceiverInterface {
44: /**
45: * this method will be called when data is received
46: */
47: void clientDataReceived(DataShareObject dso, SocketAdapter ts);
48:
49: /**
50: * this method is called when the data connection has been lost
51: */
52: void connectionLost(SocketAdapter ts);
53:
54: /**
55: * called when a new connection is made to this port
56: */
57: void newConnection(SocketAdapter ts);
58:
59: /**
60: * called when the serverSocket is lost
61: */
62: void lostServerSocket(String serverKeyValue);
63:
64: /**
65: * used to get the next port number to try for a Channel, used if problems are
66: * encountered with the provided port number
67: */
68: int getNextPort();
69:
70: }
|