Skip to content
Snippets Groups Projects
Commit 78786d4f authored by Andrea Burattin's avatar Andrea Burattin
Browse files

Completed javadoc

parent b5cf676e
Branches
Tags
No related merge requests found
......@@ -5,9 +5,14 @@ import org.apache.flink.streaming.api.functions.source.RichSourceFunction;
import beamline.events.BEvent;
/**
* This interface is supposed to bind the type of {@link RichSourceFunction} to
* {@link BEvent} and to provide minimal infrastructure to check if the sourece
* is currently running.
* This class represents the general source to generate {@link BEvent}s. The
* goal of the class is to bind the type of the underlying
* {@link RichSourceFunction} to {@link BEvent} as well as provide basic
* management for running/not running.
*
* <p>
* Since the source is a "rich" one, it means that it is possible to access the
* state from within all sources derived from this one.
*
* @author Andrea Burattin
*/
......
......@@ -20,8 +20,8 @@ import beamline.events.BEvent;
import beamline.exceptions.SourceException;
/**
* This implementation of a {@link BeamlineAbstractSource} produces events
* according to the events contained in a CSV file.
* This implementation of a {@link BeamlineAbstractSource} produces
* {@link BEvent} according to the rows contained in a CSV file.
*
* @author Andrea Burattin
*/
......
......@@ -22,8 +22,7 @@ import beamline.exceptions.SourceException;
* <p>
* Example of usage:
* <pre>
* XesSource source = new MQTTXesSource("tcp://broker.hivemq.com:1883", "topicBase", "processName");
* source.prepare();
* MQTTXesSource source = new MQTTXesSource("tcp://broker.hivemq.com:1883", "topicBase", "processName");
* </pre>
*
* <p>
......
......@@ -2,11 +2,31 @@ package beamline.sources;
import beamline.events.BEvent;
/**
* Source useful for designing new algorithm. It allows to specify sequences of
* events directly in the constructor.
*
* <p>
* Example of usage:
* <pre>
* StringTestSource s = new StringTestSource("ABC", "ADCE");
* </pre>
* This is going to emit 7 events as part of 2 traces. Each trace is a string
* provided in the constructor and each event is one character of the string.
*
* @author Andrea Burattin
*/
public class StringTestSource extends BeamlineAbstractSource {
private static final long serialVersionUID = 7657971352128040279L;
private String[] traces;
/**
* Constructs the source by providing the strings representing the events to
* emit
*
* @param traces one string for each trace, where each character is an event
*/
public StringTestSource(String...traces) {
this.traces = traces;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment