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

Last change on this file since 20 was 9, checked in by bart, 5 years ago

Release 1.1.0

File size: 718 bytes
RevLine 
[1]1package geniusweb.connection;
2
3/**
[9]4 * A Connectable is an object that can connect on request with a provided
5 * {@link ConnectionEnd} and then respond to incoming and outgong signals.
[1]6 *
[9]7 * @param <INTYPE> the type of incoming messages
[1]8 * @param <OUTTYPE> the type of outgoing messages
9 */
10public interface Connectable<INTYPE, OUTTYPE> {
11 /**
12 * creates the connection. Only called if not yet connected.
13 *
14 * @param connection the new connection
15 */
[9]16 void connect(ConnectionEnd<INTYPE, OUTTYPE> connection);
[1]17
18 /**
19 * Removes the connection from a connectable; the previously given
20 * connection can not be used anymore after this call. Only called if
21 * previously connected.
22 *
23 */
24 void disconnect();
25}
Note: See TracBrowser for help on using the repository browser.