Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Abstractions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.scaleoutsoftware.digitaltwin</groupId>
<artifactId>digitaltwin-abstractions</artifactId>
<version>3.0.0</version>
<version>3.1.1</version>
<inceptionYear>2021</inceptionYear>
<url>https://scaleoutsoftware.com</url>
<name>Digital Twin Core API</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/**
* A real-time digital twin of a data source. The implementation of the real-time DigitalTwin should have a parameterless constructor for
* basic initialization.
* @param <T> the type of the {@link DigitalTwinBase} implementation.
*/
public abstract class DigitalTwinBase<T extends DigitalTwinBase<T>> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
/**
* The InitContext is passed as a parameter to the {@link DigitalTwinBase#init(InitContext)} method of an initializing
* digital twin.
* @param <T> the type of the {@link DigitalTwinBase} implementation.
*/
public abstract class InitContext<T extends DigitalTwinBase<T>> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* Context object that allows the user to send a message to a DataSource.
* @param <T> the type of the digital twin
*/
public abstract class ProcessingContext<T extends DigitalTwinBase<T>> implements Serializable {
public abstract class ProcessingContext<T extends DigitalTwinBase<T>> {
private static final long serialVersionUID = 1L;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ public int getTimerSlot() {
return timerSlot;
}

/**
* Retrieves the timer handler.
* @return the timer handler.
*/
public TimerHandler<T> getHandler() {
return handlerClass;
}
Expand Down
4 changes: 2 additions & 2 deletions Development/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.scaleoutsoftware.digitaltwin</groupId>
<artifactId>digitaltwin-development</artifactId>
<version>3.0.0</version>
<version>3.1.1</version>
<inceptionYear>2021</inceptionYear>
<url>https://scaleoutsoftware.com</url>
<name>Digital Twin Core API</name>
Expand Down Expand Up @@ -61,7 +61,7 @@
<dependency>
<groupId>com.scaleoutsoftware.digitaltwin</groupId>
<artifactId>digitaltwin-abstractions</artifactId>
<version>3.0.0</version>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@
* A simulation event result.
*/
public abstract class SimulationEventResult {
/**
* Constructs a SimulationEventResult
*/
public SimulationEventResult() {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
* send a message back to the simulated pump.
* </p>
* <pre>
* public class RealTimeCarMessageProcessor extends MessageProcessor{@literal <}RealTimeCar, TirePressureMessage{@literal >} implements Serializable {
* public class RealTimeCarMessageProcessor extends MessageProcessor{@literal <}RealTimeCar, TirePressureMessage{@literal >} {
* final int TIRE_PRESSURE_FULL = 100;
* public ProcessingResult processMessages(ProcessingContext processingContext, RealTimeCar car, Iterable{@literal <}TirePressureMessage{@literal >} messages) throws Exception {
* // apply the updates from the messages
Expand Down Expand Up @@ -158,7 +158,7 @@
* processor will update the state of the simulated pump indicating that the tire is full.
* </p>
* <pre>
* public class PumpMessageProcessor extends MessageProcessor{@literal <}SimulatedPump, TirePressureMessage{@literal >} implements Serializable {
* public class PumpMessageProcessor extends MessageProcessor{@literal <}SimulatedPump, TirePressureMessage{@literal >} {
* public ProcessingResult processMessages(ProcessingContext processingContext, SimulatedPump pump, Iterable{@literal <}TirePressureMessage{@literal >} messages) throws Exception {
* // apply the updates from the messages
* pump.setTirePressureReached();
Expand All @@ -178,7 +178,7 @@
* told to stop, it will continue sending tire pressure changes to the real-time car.
* </p>
* <pre>
* public class PumpSimulationProcessor extends SimulationProcessor{@literal <}SimulatedPump{@literal >} implements Serializable {
* public class PumpSimulationProcessor extends SimulationProcessor{@literal <}SimulatedPump{@literal >} {
* public ProcessingResult processModel(ProcessingContext processingContext, SimulatedPump simPump, Date date) {
* SimulationController controller = processingContext.getSimulationController();
* if(simPump.isTireFull()) {
Expand Down Expand Up @@ -284,11 +284,10 @@ public Workbench(int numSimulationWorkers) {
* Adds a real-time digital twin model to the workbench.
*
* @param modelName the name of the model.
* @param digitalTwinMessageProcessor the model's {@link MessageProcessor} implementation. Must be marked as {@link Serializable}.
* @param digitalTwinMessageProcessor the model's {@link MessageProcessor} implementation.
* @param dtType the model's {@link DigitalTwinBase} implementation.
* @param <T> the type of the digital twin.
* @throws WorkbenchException if any of the parameters are null or the model does not pass validation (the message
* processor must be serializable, and the digital twin implementation must have a parameterless constructor).
* @throws WorkbenchException if any of the parameters are null or the model does not pass validation (the digital twin implementation must have a parameterless constructor).
*/
public <T extends DigitalTwinBase<T>> void addRealTimeModel(String modelName, MessageProcessor<T> digitalTwinMessageProcessor, Class<T> dtType) throws WorkbenchException {
if(modelName == null || modelName.isEmpty() || digitalTwinMessageProcessor == null || dtType == null) {
Expand All @@ -302,12 +301,11 @@ public <T extends DigitalTwinBase<T>> void addRealTimeModel(String modelName, Me
* Adds a simulation digital twin model to the workbench.
*
* @param modelName the name of the model.
* @param digitalTwinMessageProcessor the model's {@link MessageProcessor} implementation. Must be marked as {@link Serializable}.
* @param simulationProcessor the model's {@link SimulationProcessor} implementation. Must be marked as {@link Serializable}.
* @param digitalTwinMessageProcessor the model's {@link MessageProcessor} implementation.
* @param simulationProcessor the model's {@link SimulationProcessor} implementation.
* @param dtType the model's {@link DigitalTwinBase} implementation.
* @param <T> the type of the digital twin.
* @throws WorkbenchException if any of the parameters are null or the model does not pass validation (the message
* processor must be serializable, and the digital twin implementation must have a parameterless constructor).
* @throws WorkbenchException if any of the parameters are null or the model does not pass validation (the digital twin implementation must have a parameterless constructor).
*/
public <T extends DigitalTwinBase<T>> void addSimulationModel(String modelName, MessageProcessor<T> digitalTwinMessageProcessor, SimulationProcessor<T> simulationProcessor, Class<T> dtType) throws WorkbenchException {
if(modelName == null || modelName.isEmpty() || digitalTwinMessageProcessor == null || simulationProcessor == null || dtType == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public SimpleMessage(String s, int i) {
}
}

public static class SimpleMessageProcessor extends MessageProcessor<SimpleDigitalTwin> implements Serializable {
public static class SimpleMessageProcessor extends MessageProcessor<SimpleDigitalTwin> {

public SimpleMessageProcessor() {}

Expand Down Expand Up @@ -156,7 +156,7 @@ public int getPressureChange() {
}
}

public static class RealTimeCarMessageProcessor extends MessageProcessor<RealTimeCar> implements Serializable {
public static class RealTimeCarMessageProcessor extends MessageProcessor<RealTimeCar> {
final int TIRE_PRESSURE_FULL = 100;
@Override
public ProcessingResult processMessage(ProcessingContext<RealTimeCar> processingContext, RealTimeCar car, byte[] message) throws Exception {
Expand Down Expand Up @@ -192,7 +192,7 @@ public boolean isTireFull() {
}
}

public static class SimulatedPumpMessageProcessor extends MessageProcessor<SimulationPump> implements Serializable {
public static class SimulatedPumpMessageProcessor extends MessageProcessor<SimulationPump> {
@Override
public ProcessingResult processMessage(ProcessingContext processingContext, SimulationPump simCar, byte[] message) throws Exception {
// apply the updates from the messages
Expand Down Expand Up @@ -225,7 +225,7 @@ public ProcessingResult onTimedMessage(String s, SimpleDigitalTwin simpleDigital
}
}

public static class SimpleSimProcessor extends SimulationProcessor<SimpleDigitalTwin> implements Serializable {
public static class SimpleSimProcessor extends SimulationProcessor<SimpleDigitalTwin> {
private Gson _gson = new Gson();
private AtomicInteger timesInvoked = new AtomicInteger(0);
private String _modelIdToMessage;
Expand Down
6 changes: 3 additions & 3 deletions docs/allclasses-index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu May 14 11:18:09 PDT 2026 -->
<title>All Classes and Interfaces (DigitalTwinAPI 3.0.0 API)</title>
<!-- Generated by javadoc (21) on Thu May 21 12:53:45 PDT 2026 -->
<title>All Classes and Interfaces (DigitalTwinAPI 3.1.0 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2026-05-14">
<meta name="dc.created" content="2026-05-21">
<meta name="description" content="class index">
<meta name="generator" content="javadoc/AllClassesIndexWriter">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
Expand Down
6 changes: 3 additions & 3 deletions docs/allpackages-index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu May 14 11:18:09 PDT 2026 -->
<title>All Packages (DigitalTwinAPI 3.0.0 API)</title>
<!-- Generated by javadoc (21) on Thu May 21 12:53:45 PDT 2026 -->
<title>All Packages (DigitalTwinAPI 3.1.0 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2026-05-14">
<meta name="dc.created" content="2026-05-21">
<meta name="description" content="package index">
<meta name="generator" content="javadoc/AllPackagesIndexWriter">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu May 14 11:18:09 PDT 2026 -->
<title>AlertMessage (DigitalTwinAPI 3.0.0 API)</title>
<!-- Generated by javadoc (21) on Thu May 21 12:53:45 PDT 2026 -->
<title>AlertMessage (DigitalTwinAPI 3.1.0 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2026-05-14">
<meta name="dc.created" content="2026-05-21">
<meta name="description" content="declaration: package: com.scaleoutsoftware.digitaltwin.abstractions, class: AlertMessage">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu May 14 11:18:09 PDT 2026 -->
<title>AzureDigitalTwinsProvider (DigitalTwinAPI 3.0.0 API)</title>
<!-- Generated by javadoc (21) on Thu May 21 12:53:45 PDT 2026 -->
<title>AzureDigitalTwinsProvider (DigitalTwinAPI 3.1.0 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2026-05-14">
<meta name="dc.created" content="2026-05-21">
<meta name="description" content="declaration: package: com.scaleoutsoftware.digitaltwin.abstractions, interface: AzureDigitalTwinsProvider">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu May 14 11:18:09 PDT 2026 -->
<title>CacheOperationStatus (DigitalTwinAPI 3.0.0 API)</title>
<!-- Generated by javadoc (21) on Thu May 21 12:53:45 PDT 2026 -->
<title>CacheOperationStatus (DigitalTwinAPI 3.1.0 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2026-05-14">
<meta name="dc.created" content="2026-05-21">
<meta name="description" content="declaration: package: com.scaleoutsoftware.digitaltwin.abstractions, enum: CacheOperationStatus">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu May 14 11:18:09 PDT 2026 -->
<title>CacheResult (DigitalTwinAPI 3.0.0 API)</title>
<!-- Generated by javadoc (21) on Thu May 21 12:53:45 PDT 2026 -->
<title>CacheResult (DigitalTwinAPI 3.1.0 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2026-05-14">
<meta name="dc.created" content="2026-05-21">
<meta name="description" content="declaration: package: com.scaleoutsoftware.digitaltwin.abstractions, interface: CacheResult">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu May 14 11:18:09 PDT 2026 -->
<title>CreateResult (DigitalTwinAPI 3.0.0 API)</title>
<!-- Generated by javadoc (21) on Thu May 21 12:53:45 PDT 2026 -->
<title>CreateResult (DigitalTwinAPI 3.1.0 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2026-05-14">
<meta name="dc.created" content="2026-05-21">
<meta name="description" content="declaration: package: com.scaleoutsoftware.digitaltwin.abstractions, enum: CreateResult">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu May 14 11:18:09 PDT 2026 -->
<title>DeleteResult (DigitalTwinAPI 3.0.0 API)</title>
<!-- Generated by javadoc (21) on Thu May 21 12:53:45 PDT 2026 -->
<title>DeleteResult (DigitalTwinAPI 3.1.0 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2026-05-14">
<meta name="dc.created" content="2026-05-21">
<meta name="description" content="declaration: package: com.scaleoutsoftware.digitaltwin.abstractions, enum: DeleteResult">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu May 14 11:18:09 PDT 2026 -->
<title>DigitalTwinBase (DigitalTwinAPI 3.0.0 API)</title>
<!-- Generated by javadoc (21) on Thu May 21 12:53:45 PDT 2026 -->
<title>DigitalTwinBase (DigitalTwinAPI 3.1.0 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2026-05-14">
<meta name="dc.created" content="2026-05-21">
<meta name="description" content="declaration: package: com.scaleoutsoftware.digitaltwin.abstractions, class: DigitalTwinBase">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
Expand Down Expand Up @@ -90,6 +90,10 @@ <h1 title="Class DigitalTwinBase" class="title">Class DigitalTwinBase&lt;T exten
<div class="inheritance">com.scaleoutsoftware.digitaltwin.abstractions.DigitalTwinBase&lt;T&gt;</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>T</code> - the type of the <a href="DigitalTwinBase.html" title="class in com.scaleoutsoftware.digitaltwin.abstractions"><code>DigitalTwinBase</code></a> implementation.</dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public abstract class </span><span class="element-name type-name-label">DigitalTwinBase&lt;T extends DigitalTwinBase&lt;T&gt;&gt;</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu May 14 11:18:09 PDT 2026 -->
<title>InitContext (DigitalTwinAPI 3.0.0 API)</title>
<!-- Generated by javadoc (21) on Thu May 21 12:53:45 PDT 2026 -->
<title>InitContext (DigitalTwinAPI 3.1.0 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2026-05-14">
<meta name="dc.created" content="2026-05-21">
<meta name="description" content="declaration: package: com.scaleoutsoftware.digitaltwin.abstractions, class: InitContext">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
Expand Down Expand Up @@ -90,6 +90,10 @@ <h1 title="Class InitContext" class="title">Class InitContext&lt;T extends <a hr
<div class="inheritance">com.scaleoutsoftware.digitaltwin.abstractions.InitContext&lt;T&gt;</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>T</code> - the type of the <a href="DigitalTwinBase.html" title="class in com.scaleoutsoftware.digitaltwin.abstractions"><code>DigitalTwinBase</code></a> implementation.</dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public abstract class </span><span class="element-name type-name-label">InitContext&lt;T extends <a href="DigitalTwinBase.html" title="class in com.scaleoutsoftware.digitaltwin.abstractions">DigitalTwinBase</a>&lt;T&gt;&gt;</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu May 14 11:18:09 PDT 2026 -->
<title>InitSimulationContext (DigitalTwinAPI 3.0.0 API)</title>
<!-- Generated by javadoc (21) on Thu May 21 12:53:45 PDT 2026 -->
<title>InitSimulationContext (DigitalTwinAPI 3.1.0 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2026-05-14">
<meta name="dc.created" content="2026-05-21">
<meta name="description" content="declaration: package: com.scaleoutsoftware.digitaltwin.abstractions, interface: InitSimulationContext">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
Expand Down
Loading