Last change
on this file since 47 was 47, checked in by bart, 3 years ago |
Refactor to help reusing partiesserver.
|
File size:
718 bytes
|
Rev | Line | |
---|
[47] | 1 | package 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 | */
|
---|
| 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 | */
|
---|
| 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.