Last change
on this file since 40 was 40, checked in by bart, 3 years ago |
LEARN algorithm now also available. Fixed small issues.
|
File size:
1.4 KB
|
Rev | Line | |
---|
[40] | 1 | package geniusweb.connection;
|
---|
| 2 |
|
---|
| 3 | import java.io.IOException;
|
---|
| 4 |
|
---|
| 5 | import geniusweb.references.Reference;
|
---|
| 6 | import tudelft.utilities.repository.NoResourcesNowException;
|
---|
| 7 |
|
---|
| 8 | /**
|
---|
| 9 | * factory that can turn a {@link Reference} into a connection to that
|
---|
| 10 | * reference.
|
---|
| 11 | *
|
---|
| 12 | *
|
---|
| 13 | * @param <INTYPE> the type of incoming messages. Incoming messages are
|
---|
| 14 | * received through Listener#not. Incoming messages are usually
|
---|
| 15 | * asynchronous.
|
---|
| 16 | * @param <OUTTYPE> the type of outgoing messages. Outgoing messages can be sent
|
---|
| 17 | * directly with #send.
|
---|
| 18 | */
|
---|
| 19 | public interface ConnectionFactory<INTYPE, OUTTYPE> {
|
---|
| 20 | /**
|
---|
| 21 | *
|
---|
| 22 | * @param reference the {@link Reference} to a {@link Connectable}
|
---|
| 23 | * @return connection to provided reference
|
---|
| 24 | * @throws IOException if the connection can not be made because
|
---|
| 25 | * of a network or address related problem.
|
---|
| 26 | * This points to something non-trivially
|
---|
| 27 | * that may require user intervention to fix
|
---|
| 28 | * something.
|
---|
| 29 | * @throws NoResourcesNowException if the connection can not be made at this
|
---|
| 30 | * moment because of lack of resources on
|
---|
| 31 | * the server. This suggest to retry later.
|
---|
| 32 | */
|
---|
| 33 | ConnectionEnd<INTYPE, OUTTYPE> connect(Reference reference)
|
---|
| 34 | throws IOException, NoResourcesNowException;
|
---|
| 35 |
|
---|
| 36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.