Skip to content
This repository was archived by the owner on Sep 1, 2024. It is now read-only.

Commit 3a07ea4

Browse files
committed
Documentation update
1 parent 06c2e28 commit 3a07ea4

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

eu.dariolucia.reatmetric.driver.example/Documentation.adoc

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ This part of the documentation provides a step-by-step guide on how to create, i
22
driver from scratch. This guide will assume adequate knowledge of Java and Maven.
33

44
The example driver presented here is very simple:
5+
56
- it implements a connector, that can be started and stopped.
6-
- When the connector is started, the driver publishes a single parameter value every second to the ReatMetric processing model,
7-
increasing its value by one;
7+
- When the connector is started, the driver publishes a single parameter value every second to the ReatMetric processing model, increasing its value by one;
88
- it raises one event when the counter is a multiple of 10;
99
- it handles an activity that resets the counter to 0.
1010
11-
==== Step 1: create a new Maven project
11+
==== Step 1: Create a new Maven project
12+
1213
Create an empty folder and put inside this folder the pom file and the necessary Maven folders. As a minimum, the folder
1314
src/main/java needs to exist. The pom file must contain as a minimum the dependencies to the API and Core modules.
1415

@@ -80,7 +81,7 @@ By running:
8081

8182
the project should build with errors.
8283

83-
==== Step 2: create the driver module file and the class entrypoint
84+
==== Step 2: Create the driver module file and the class entrypoint
8485

8586
Create the file module-info.java with the information about the module dependencies. As a minimum, the following dependencies
8687
shall be listed.
@@ -128,7 +129,7 @@ open module eu.dariolucia.reatmetric.driver.example {
128129
}
129130
----
130131

131-
==== Step 3: initialise the driver from the configuration
132+
==== Step 3: Initialise the driver from the configuration
132133

133134
The driver needs to know which are the IDs of the related parameter and event objects in the processing model, as well
134135
as to know the ID of the supported activity. The approach used for this example is very simple: the configuration string
@@ -172,7 +173,7 @@ public class ExampleDriver extends AbstractDriver {
172173
}
173174
----
174175

175-
==== Step 4: add a connector, implement data injection in the processing model
176+
==== Step 4: Add a connector, implement data injection in the processing model
176177

177178
Create a class in the package eu.dariolucia.reatmetric.driver.example, named ExampleConnector and extending from the
178179
AbstractConnector class, as shown below. This class is used to control the start and stop of the parameter publication.
@@ -252,6 +253,7 @@ public class ExampleConnector extends AbstractTransportConnector {
252253
----
253254

254255
The ExampleDriver class must now be extended to:
256+
255257
- Create the connector in the starting phase;
256258
- Return the connector as supported connector;
257259
- Implement the newValue(long) method.
@@ -314,7 +316,7 @@ public class ExampleDriver extends AbstractDriver {
314316
}
315317
----
316318

317-
==== Step 5: add an activity handler
319+
==== Step 5: Add an activity handler
318320

319321
Create a class in the package eu.dariolucia.reatmetric.driver.example, named ExampleHandler and implementing the
320322
IActivityHandler interface, as shown below. This class is used to manage the requests of activity executions.
@@ -384,6 +386,7 @@ public class ExampleHandler implements IActivityHandler {
384386
----
385387

386388
The ExampleDriver class must now be extended to:
389+
387390
- Create the activity handler in the starting phase;
388391
- Return the activity handler as supported connector;
389392
- Implement the necessary methods to implement the activity occurrence lifecycle.
@@ -586,7 +589,7 @@ public class ExampleConnector extends AbstractTransportConnector {
586589
}
587590
----
588591

589-
==== Step 6: prepare the processing model definition
592+
==== Step 6: Prepare the processing model definition
590593

591594
Create an XML file with the following content:
592595

0 commit comments

Comments
 (0)