Rev | Line | |
---|
[1] | 1 | package 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 | */
|
---|
| 10 | public 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.