48 | | The following class diagram displays the classes and interfaces present in the java service framework. There is an abstract base class `Channel` on the one hand which provides methods for sending and receiving messages and several concrete implementations and on the other hand an abstract base class `Service` that provides the concrete `PollService` and `PushService`. Each Channel has a corresponding factory which implements `IChannelFactory`. |
49 | | |
50 | | [[Image(ExternalEvaluationServiceCD.png)]] |
51 | | |
52 | | In the source you will also find some test applications that provide very simple examples of how to use the service framework. They do not really evaluate a solution, but return a random number in the interval [0;1) for every received solution. |
53 | | |
54 | | [[Image(ExternalEvaluationServiceTestCD.png)]] |
55 | | |
| 48 | Attached to this wiki page you can find a java library that enables a quick connection with HeuristicLab over a TCP/IP connection. In this library there is an abstract base class `Channel` on the one hand which provides methods for sending and receiving messages and several concrete implementations and on the other hand an abstract base class `Service` that provides the concrete `PollService` and `PushService`. A `Listener` listens for connections and opens several channels out of which the service will receive solutions and send back qualities. As a user of the library you will prepare an `IListenerFactory` and hand this to your service instance. Then, depending on the type of service, you can get solutions out of it and push the qualities back. It is quite easy. |
| 49 | |
| 50 | Similarly a C# port of this library has also been added, which is handy when your application cannot be compiled to a dll and called directly from your C# problem plugin. |
| 51 | |
| 52 | In the following code sample you may find some test applications that provide very simple examples of how to use the service framework. They do not really evaluate a solution, but return a random number in the interval [0;1) for every received solution. |