source: references/src/main/java/geniusweb/connection/Connectable.java@ 8

Last change on this file since 8 was 1, checked in by bart, 5 years ago

Initial Release

File size: 610 bytes
RevLine 
[1]1package geniusweb.connection;
2
3/**
4 * a socket for a general two-way connection
5 *
6 * @param <INTYPE> the type of incoming messages
7 * @param <OUTTYPE> the type of outgoing messages
8 */
9public interface Connectable<INTYPE, OUTTYPE> {
10 /**
11 * creates the connection. Only called if not yet connected.
12 *
13 * @param connection the new connection
14 */
15 void connect(Connection<INTYPE, OUTTYPE> connection);
16
17 /**
18 * Removes the connection from a connectable; the previously given
19 * connection can not be used anymore after this call. Only called if
20 * previously connected.
21 *
22 */
23 void disconnect();
24}
Note: See TracBrowser for help on using the repository browser.