Skip to content

Commit 1ad9a55

Browse files
author
Aaron
committed
Checkpoint
1 parent ab7a293 commit 1ad9a55

File tree

6 files changed

+14
-11
lines changed

6 files changed

+14
-11
lines changed

dslink-v2/src/main/java/com/acuity/iot/dsa/dslink/protocol/v1/DS1LinkConnection.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ public void updateSalt(String salt) {
9393

9494
@Override
9595
protected void checkConfig() {
96-
configOk();
9796
}
9897

9998
protected DS1ConnectionInit initializeConnection() {

dslink-v2/src/main/java/org/iot/dsa/dslink/requester/AbstractListHandler.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@
33
/**
44
* Convenience implementation of the handler passed to the invoke method in the requester.
55
* <p>
6-
* <p>
7-
* <p>
86
* onUpdate will be called until the initial state is fully loaded. After which onInitialized will
97
* be called. After that, onUpdate and onRemove will be called for state changes.
108
* <p>
11-
* <p>
12-
* <p>
139
* Configs, or node metadata names start with $. Attributes start with @. Anything else represents
1410
* a child. Child maps will only contain configs/node metadata.
1511
*
@@ -45,8 +41,6 @@ public OutboundStream getStream() {
4541
/**
4642
* Sets the fields so they can be accessed with the corresponding getters.
4743
* <p>
48-
* <p>
49-
* <p>
5044
* {@inheritDoc}
5145
*/
5246
@Override

dslink-v2/src/main/java/org/iot/dsa/node/DSNode.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,8 @@ public DSIValue getValue(String name) {
597597
}
598598

599599
/**
600-
* Override point. By default routes the request to the action.
600+
* Override point. It is safe to use the calling thread for long lived operations. By
601+
* default, this routes the request to the action's invoke method.
601602
*
602603
* @param action Info for the action being invoked.
603604
* @param target Info for the target (parent) of the action. Could be this node,

dslink-v2/src/main/java/org/iot/dsa/node/action/DSAction.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,9 @@ public ResultType getResultType() {
260260
}
261261

262262
/**
263-
* Execute the action invocation for the given target.
263+
* Execute the action invocation for the given target. It is safe to use the calling thread
264+
* for long lived operations. If the return type is void, perform the full operation on the
265+
* calling thread so that errors will be properly reported.
264266
* <p>
265267
* To report an error, simply throw a runtime exception from this method, or call
266268
* ActionInvocation.close(Exception) when processing asynchronously.

dslink-v2/src/main/java/org/iot/dsa/time/DSDuration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public class DSDuration extends DSValue {
2020
/////////////////////////////////////////////////////////////////
2121

2222
public static DSDuration NULL = new DSDuration();
23+
public static DSDuration DEFAULT = new DSDuration();
2324

2425
/////////////////////////////////////////////////////////////////
2526
// Instance Fields
@@ -184,8 +185,7 @@ public int getYears() {
184185

185186
@Override
186187
public int hashCode() {
187-
int ret = millis + seconds + minutes + hours + days + months + years;
188-
return negative ? -ret : ret;
188+
return toString().hashCode();
189189
}
190190

191191
/**

dslink-v2/src/main/java/org/iot/dsa/util/DSStatusNode.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ public String getStatusText() {
5555
return statusText.getElement().toString();
5656
}
5757

58+
/**
59+
* True if the status is good.
60+
*/
61+
public boolean isOperational() {
62+
return getStatus().isGood();
63+
}
64+
5865
///////////////////////////////////////////////////////////////////////////
5966
// Protected Methods
6067
///////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)