01: // serverPortForwarding.java
02: // -------------------------------------
03: // part of YACY
04: // (C) by Michael Peter Christen; mc@anomic.de
05: // first published on http://www.anomic.de
06: // Frankfurt, Germany, 2004
07: //
08: // This file ist contributed by Martin Thelian
09: //
10: // $LastChangedDate: 2006-02-20 23:57:42 +0100 (Mo, 20 Feb 2006) $
11: // $LastChangedRevision: 1715 $
12: // $LastChangedBy: borg-0300 $
13: //
14: // This program is free software; you can redistribute it and/or modify
15: // it under the terms of the GNU General Public License as published by
16: // the Free Software Foundation; either version 2 of the License, or
17: // (at your option) any later version.
18: //
19: // This program is distributed in the hope that it will be useful,
20: // but WITHOUT ANY WARRANTY; without even the implied warranty of
21: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22: // GNU General Public License for more details.
23: //
24: // You should have received a copy of the GNU General Public License
25: // along with this program; if not, write to the Free Software
26: // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27: //
28: // Using this software in any meaning (reading, learning, copying, compiling,
29: // running) means that you agree that the Author(s) is (are) not responsible
30: // for cost, loss of data or any harm that may be caused directly or indirectly
31: // by usage of this softare or this documentation. The usage of this software
32: // is on your own risk. The installation and usage (starting/running) of this
33: // software may allow other people or application to access your computer and
34: // any attached devices and is highly dependent on the configuration of the
35: // software which must be done by the user of the software; the author(s) is
36: // (are) also not responsible for proper configuration and usage of the
37: // software, even if provoked by documentation provided together with
38: // the software.
39: //
40: // Any changes to this file according to the GPL as documented in the file
41: // gpl.txt aside this file in the shipment you received can be done to the
42: // lines that follows this copyright notice here, but changes must not be
43: // done inside the copyright notive above. A re-distribution must contain
44: // the intact and unchanged copyright notice.
45: // Contributions and changes to the program code must be marked as such.
46:
47: package de.anomic.server.portForwarding;
48:
49: import java.io.IOException;
50:
51: import de.anomic.server.serverSwitch;
52:
53: public interface serverPortForwarding {
54: public void init(serverSwitch switchboard, String localHost,
55: int localPort) throws Exception;
56:
57: public String getHost();
58:
59: public int getPort();
60:
61: public void connect() throws IOException;
62:
63: public void disconnect() throws IOException;
64:
65: public boolean reconnect() throws IOException;
66:
67: public boolean isConnected();
68: }
|