Line | |
---|
1 | package 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 | */
|
---|
9 | public 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.