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

Last change on this file since 52 was 52, checked in by ruud, 14 months ago

Fixed small issues in domaineditor.

File size: 718 bytes
Line 
1package geniusweb.connection;
2
3/**
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.
6 *
7 * @param <INTYPE> the type of incoming messages
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 */
16 void connect(ConnectionEnd<INTYPE, OUTTYPE> connection);
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.