diff --git a/build.gradle b/build.gradle index b68f028f..4d318744 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'java' apply plugin: 'maven' group 'org.iot.dsa' -version '0.16.0' +version '0.17.0' sourceCompatibility = 1.6 targetCompatibility = 1.6 diff --git a/docs/javadoc/allclasses-frame.html b/docs/javadoc/allclasses-frame.html index ef514b25..444015ef 100644 --- a/docs/javadoc/allclasses-frame.html +++ b/docs/javadoc/allclasses-frame.html @@ -1,126 +1,261 @@ - + - -All Classes (dslink-core 0.15.0 API) - - - + + All Classes (dslink-core 0.15.0 API) + + +

All Classes

- +
diff --git a/docs/javadoc/allclasses-noframe.html b/docs/javadoc/allclasses-noframe.html index 3e0d3f43..2ff5918b 100644 --- a/docs/javadoc/allclasses-noframe.html +++ b/docs/javadoc/allclasses-noframe.html @@ -1,126 +1,237 @@ - + - -All Classes (dslink-core 0.15.0 API) - - - + + All Classes (dslink-core 0.15.0 API) + + +

All Classes

- +
diff --git a/docs/javadoc/constant-values.html b/docs/javadoc/constant-values.html index 74b4f420..c5782d41 100644 --- a/docs/javadoc/constant-values.html +++ b/docs/javadoc/constant-values.html @@ -1,12 +1,13 @@ - + - -Constant Field Values (dslink-core 0.15.0 API) - - - + + Constant Field Values (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + + + +
-

Constant Field Values

-

Contents

- +

Constant Field Values

+

Contents

+
- + -

org.iot.*

- - - - - +

org.iot.*

+ + + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + + + + diff --git a/docs/javadoc/deprecated-list.html b/docs/javadoc/deprecated-list.html index bf50e5ba..01eb9a19 100644 --- a/docs/javadoc/deprecated-list.html +++ b/docs/javadoc/deprecated-list.html @@ -1,12 +1,13 @@ - + - -Deprecated List (dslink-core 0.15.0 API) - - - + + Deprecated List (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + + + +
-

Deprecated API

-

Contents

+

Deprecated API

+

Contents

- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + + + + diff --git a/docs/javadoc/help-doc.html b/docs/javadoc/help-doc.html index 1a1f8b40..b0482021 100644 --- a/docs/javadoc/help-doc.html +++ b/docs/javadoc/help-doc.html @@ -1,12 +1,13 @@ - + - -API Help (dslink-core 0.15.0 API) - - - + + API Help (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + + + +
-

How This API Document Is Organized

-
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages + corresponding to the items in the navigation bar, described as follows. +
- -This help file applies to API documentation generated using the standard doclet.
+ + This help file applies to API documentation generated using the standard doclet. +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + + + + diff --git a/docs/javadoc/index-all.html b/docs/javadoc/index-all.html index 6a584c73..4827d597 100644 --- a/docs/javadoc/index-all.html +++ b/docs/javadoc/index-all.html @@ -1,12 +1,13 @@ - + - -Index (dslink-core 0.15.0 API) - - - + + Index (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + + + + -
A B C D E F G H I J K L M N O P R S T U V W  - - -

A

-
-
AbstractInvokeHandler - Class in org.iot.dsa.dslink.requester
-
-
Convenience implementation of the callback passed to the invoke method in the requester.
-
-
AbstractInvokeHandler() - Constructor for class org.iot.dsa.dslink.requester.AbstractInvokeHandler
-
 
-
AbstractJsonWriter - Class in org.iot.dsa.io.json
-
 
-
AbstractJsonWriter() - Constructor for class org.iot.dsa.io.json.AbstractJsonWriter
-
 
-
AbstractListHandler - Class in org.iot.dsa.dslink.requester
-
-
Convenience implementation of the handler passed to the invoke method in the requester.
-
-
AbstractListHandler() - Constructor for class org.iot.dsa.dslink.requester.AbstractListHandler
-
 
-
AbstractReader - Class in org.iot.dsa.io
-
-
Basic implementation of DSReader.
-
-
AbstractReader() - Constructor for class org.iot.dsa.io.AbstractReader
-
 
-
AbstractSubscribeHandler - Class in org.iot.dsa.dslink.requester
-
-
Convenience implementation of the handler passed to the subscribe method in the requester.
-
-
AbstractSubscribeHandler() - Constructor for class org.iot.dsa.dslink.requester.AbstractSubscribeHandler
-
 
-
AbstractWriter - Class in org.iot.dsa.io
-
-
Basic implementation of DSWriter.
-
-
AbstractWriter() - Constructor for class org.iot.dsa.io.AbstractWriter
-
 
-
ActionInvocation - Interface in org.iot.dsa.node.action
-
-
Encapsulates the details of an action invocation and provides the mechanism for updating and open - stream.
-
-
ActionResult - Interface in org.iot.dsa.node.action
-
-
Super interface for possible results of an action.
-
-
ActionSpec - Interface in org.iot.dsa.node.action
-
-
Defines an invokable node in the DSA model.
-
-
ActionSpec.ResultType - Enum in org.iot.dsa.node.action
-
-
Defines what the action returns.
-
-
ActionTable - Interface in org.iot.dsa.node.action
-
-
Provides access to the columns and rows of a table.
-
-
ActionValues - Interface in org.iot.dsa.node.action
-
-
Simple set of return values from an action.
-
-
add(DSElement) - Method in class org.iot.dsa.node.DSList
-
-
Adds the value and returns this.
-
-
add(boolean) - Method in class org.iot.dsa.node.DSList
-
-
Appends the primitive and returns this.
-
-
add(double) - Method in class org.iot.dsa.node.DSList
-
-
Appends the primitive and returns this.
-
-
add(long) - Method in class org.iot.dsa.node.DSList
-
-
Appends the primitive and returns this.
-
-
add(String) - Method in class org.iot.dsa.node.DSList
-
-
Appends the primitive and returns this.
-
-
add(int) - Method in class org.iot.dsa.node.DSList
-
-
Appends the primitive and returns this.
-
-
add(String, DSIObject) - Method in class org.iot.dsa.node.DSNode
-
-
Adds the named child only if the name is not already in use.
-
-
addAll(DSList) - Method in class org.iot.dsa.node.DSList
-
-
Add all elements of the argument to this list and returns this.
-
-
addDays(int, Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Adds or subtracts the corresponding time field, does not perform any alignment.
-
-
addDays(int, long) - Static method in class org.iot.dsa.time.DSTime
-
-
Adds or subtracts the corresponding time field, does not perform any alignment.
-
-
addDefaultParameter(String, DSIValue, String) - Method in class org.iot.dsa.node.action.DSAction
-
-
A convenience which calls addParameter with the same arguments, and also sets the metadata - for default value.
-
-
addHours(int, Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Adds or subtracts the corresponding time field, does not perform any alignment.
-
-
addHours(int, long) - Static method in class org.iot.dsa.time.DSTime
-
-
Adds or subtracts the corresponding time field, does not perform any alignment.
-
-
addList() - Method in class org.iot.dsa.node.DSList
-
-
Appends a new list and returns it.
-
-
addListener(DSLinkConnection.Listener) - Method in class org.iot.dsa.dslink.DSLinkConnection
-
-
Adds a listener for connection events.
-
-
addMap() - Method in class org.iot.dsa.node.DSList
-
-
Appends a new map and returns it.
-
-
addMinutes(int, Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Adds or subtracts the corresponding time field, does not perform any alignment.
-
-
addMinutes(int, long) - Static method in class org.iot.dsa.time.DSTime
-
-
Adds or subtracts the corresponding time field, does not perform any alignment.
-
-
addMonths(int, Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Adds or subtracts the corresponding time field, does not perform any alignment.
-
-
addMonths(int, long) - Static method in class org.iot.dsa.time.DSTime
-
-
Adds or subtracts the corresponding time field, does not perform any alignment.
-
-
addNull() - Method in class org.iot.dsa.node.DSList
-
-
Appends null and returns this.
-
-
addParameter(DSMap) - Method in class org.iot.dsa.node.action.DSAction
-
-
Fully describes a parameter for method invocation.
-
-
addParameter(String, DSIValue, String) - Method in class org.iot.dsa.node.action.DSAction
-
-
Creates a DSMetadata, calls setName and setType on it, adds the internal map to the parameter - list and returns the metadata instance for further configuration.
-
-
addParameter(String, DSValueType, String) - Method in class org.iot.dsa.node.action.DSAction
-
-
Creates a DSMetadata, calls setName and setType on it, adds the internal map to the parameter - list and returns the metadata instance for further configuration.
-
-
addSeconds(int, Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Adds or subtracts the corresponding time field, does not perform any alignment.
-
-
addSeconds(int, long) - Static method in class org.iot.dsa.time.DSTime
-
-
Adds or subtracts the corresponding time field, does not perform any alignment.
-
-
addValueResult(DSMap) - Method in class org.iot.dsa.node.action.DSAction
-
-
Fully describes a return value when the result type is VALUES.
-
-
addValueResult(String, DSIValue) - Method in class org.iot.dsa.node.action.DSAction
-
-
Creates a DSMetadata, calls setName and setType on it, adds the internal map to the results - list and returns the metadata instance for further configuration.
-
-
addValueResult(String, DSValueType) - Method in class org.iot.dsa.node.action.DSAction
-
-
Creates a DSMetadata, calls setName and setType on it, adds the internal map to the results - list and returns the metadata instance for further configuration.
-
-
addWeeks(int, Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Adds or subtracts the corresponding time field, does not perform any alignment.
-
-
addWeeks(int, long) - Static method in class org.iot.dsa.time.DSTime
-
-
Adds or subtracts the corresponding time field, does not perform any alignment.
-
-
addYears(int, Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Adds or subtracts the corresponding time field, does not perform any alignment.
-
-
addYears(int, long) - Static method in class org.iot.dsa.time.DSTime
-
-
Adds or subtracts the corresponding time field, does not perform any alignment.
-
-
alignDay(Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Aligns the time fields to the start of the day.
-
-
alignDays(int, Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Aligns the time fields to the start of given interval.
-
-
alignHour(Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Aligns the time fields to the start of the hour.
-
-
alignHours(int, Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Aligns the time fields to the start of given interval.
-
-
alignMinute(Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Aligns the time fields to the start of the minute.
-
-
alignMinutes(int, Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Aligns the time fields to the start of given interval.
-
-
alignMonth(Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Aligns the time fields to the start of the month.
-
-
alignSecond(Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Aligns the time fields to the start of the second.
-
-
alignSeconds(int, Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Aligns the time fields to the start of given interval.
-
-
alignWeek(Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Aligns the time fields to the start of the week.
-
-
alignYear(Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Aligns the time fields to the start of the year.
-
-
ApiObject - Interface in org.iot.dsa.dslink.responder
-
-
Can be a node, value or an action.
-
-
append(char[], int, int) - Method in class org.iot.dsa.io.json.AbstractJsonWriter
-
-
Append the characters and return this.
-
-
append(char) - Method in class org.iot.dsa.io.json.JsonAppender
-
-
Append the char and return this.
-
-
append(char[], int, int) - Method in class org.iot.dsa.io.json.JsonAppender
-
-
Append the chars and return this.
-
-
append(CharSequence) - Method in class org.iot.dsa.io.json.JsonAppender
-
-
Append the chars and return this.
-
-
append(CharSequence, int, int) - Method in class org.iot.dsa.io.json.JsonAppender
-
-
Append the chars and return this.
-
-
append(CharSequence) - Method in class org.iot.dsa.io.json.JsonWriter
-
 
-
append(char) - Method in class org.iot.dsa.io.json.JsonWriter
-
 
-
append(CharSequence, int, int) - Method in class org.iot.dsa.io.json.JsonWriter
-
-
Append the chars and return this.
-
-
append(char[], int, int) - Method in class org.iot.dsa.io.json.JsonWriter
-
-
Append the chars and return this.
-
-
AsyncLogHandler - Class in org.iot.dsa.logging
-
-
Enqueues logging records which are then processed by separate thread.
-
-
AsyncLogHandler() - Constructor for class org.iot.dsa.logging.AsyncLogHandler
-
 
-
- - - -

B

-
-
beginList() - Method in class org.iot.dsa.io.AbstractWriter
-
 
-
beginList(int) - Method in class org.iot.dsa.io.AbstractWriter
-
 
-
beginList() - Method in interface org.iot.dsa.io.DSIWriter
-
-
Start a new list and return this.
-
-
beginList(int) - Method in interface org.iot.dsa.io.DSIWriter
-
-
Start a new list of the given size and return this.
-
-
beginMap() - Method in class org.iot.dsa.io.AbstractWriter
-
 
-
beginMap(int) - Method in class org.iot.dsa.io.AbstractWriter
-
 
-
beginMap() - Method in interface org.iot.dsa.io.DSIWriter
-
-
Start a new map and return this.
-
-
beginMap(int) - Method in interface org.iot.dsa.io.DSIWriter
-
-
Start a new map of the given size and return this.
-
-
BOOLEAN_RANGE - Static variable in class org.iot.dsa.node.DSMetadata
-
 
-
byteBuffer - Variable in class org.iot.dsa.io.msgpack.MsgpackWriter
-
 
-
- - - -

C

-
-
cancel() - Method in class org.iot.dsa.DSRuntime.Timer
-
-
Cancel execution, will not impact current running tasks and will have no effect if - already cancelled.
-
-
CFG_AUTH_TOKEN - Static variable in class org.iot.dsa.dslink.DSLinkConfig
-
 
-
CFG_BROKER_URL - Static variable in class org.iot.dsa.dslink.DSLinkConfig
-
 
-
CFG_CONNECTION_TYPE - Static variable in class org.iot.dsa.dslink.DSLinkConfig
-
 
-
CFG_IS_REQUESTER - Static variable in class org.iot.dsa.dslink.DSLinkConfig
-
 
-
CFG_IS_RESPONDER - Static variable in class org.iot.dsa.dslink.DSLinkConfig
-
 
-
CFG_KEY_FILE - Static variable in class org.iot.dsa.dslink.DSLinkConfig
-
 
-
CFG_LOG_FILE - Static variable in class org.iot.dsa.dslink.DSLinkConfig
-
 
-
CFG_LOG_LEVEL - Static variable in class org.iot.dsa.dslink.DSLinkConfig
-
 
-
CFG_MAIN_TYPE - Static variable in class org.iot.dsa.dslink.DSLinkConfig
-
 
-
CFG_NODE_FILE - Static variable in class org.iot.dsa.dslink.DSLinkConfig
-
 
-
CFG_PROTOCOL_VERSION - Static variable in class org.iot.dsa.dslink.DSLinkConfig
-
 
-
CFG_READ_TIMEOUT - Static variable in class org.iot.dsa.dslink.DSLinkConfig
-
 
-
CFG_SAVE_INTERVAL - Static variable in class org.iot.dsa.dslink.DSLinkConfig
-
 
-
CFG_STABLE_DELAY - Static variable in class org.iot.dsa.dslink.DSLinkConfig
-
 
-
CFG_WS_TRANSPORT_FACTORY - Static variable in class org.iot.dsa.dslink.DSLinkConfig
-
 
-
childAdded(ApiObject) - Method in interface org.iot.dsa.dslink.responder.InboundListRequest
-
-
The responder should call this whenever a child is added.
-
-
childCount() - Method in class org.iot.dsa.node.DSNode
-
-
The number of children.
-
-
childRemoved(ApiObject) - Method in interface org.iot.dsa.dslink.responder.InboundListRequest
-
-
The responder should call this whenever a child is removed.
-
-
clear() - Method in class org.iot.dsa.node.DSGroup
-
-
Removes all items.
-
-
clear() - Method in class org.iot.dsa.node.DSList
-
 
-
clear() - Method in class org.iot.dsa.node.DSMap
-
 
-
clear() - Method in class org.iot.dsa.node.DSMetadata
-
 
-
clear(String) - Method in class org.iot.dsa.node.DSMetadata
-
 
-
clear() - Method in class org.iot.dsa.node.DSNode
-
-
Removes non-permanent children.
-
-
clearAllRows() - Method in interface org.iot.dsa.node.action.ActionInvocation
-
-
Only use with stream and open tables, instructs the requester to clear all existing rows.
-
-
close() - Method in interface org.iot.dsa.dslink.responder.InboundListRequest
-
-
Allows the responder to forcefully close the list stream.
-
-
close(Exception) - Method in interface org.iot.dsa.dslink.responder.InboundListRequest
-
-
Allows the responder to forcefully close the list stream.
-
-
close() - Method in interface org.iot.dsa.dslink.responder.InboundSubscribeRequest
-
-
Allows the responder to forcefully terminate the subscription.
-
-
close() - Method in interface org.iot.dsa.io.DSIReader
-
-
Close the input.
-
-
close() - Method in interface org.iot.dsa.io.DSIWriter
-
-
Close the stream.
-
-
close() - Method in class org.iot.dsa.io.json.JsonAppender
-
 
-
close() - Method in class org.iot.dsa.io.json.JsonReader
-
 
-
close() - Method in class org.iot.dsa.io.json.JsonWriter
-
 
-
close() - Method in class org.iot.dsa.io.msgpack.MsgpackReader
-
 
-
close() - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
-
Does nothing.
-
-
close() - Method in class org.iot.dsa.logging.AsyncLogHandler
-
-
Closes the PrintStream, terminates the write thread and performs houseKeeping.
-
-
close() - Static method in class org.iot.dsa.logging.DSLogging
-
-
Closes all async log handlers.
-
-
close() - Method in interface org.iot.dsa.node.action.ActionInvocation
-
-
For use with streams and open tables, will have no effect if the stream is already closed.
-
-
close(Exception) - Method in interface org.iot.dsa.node.action.ActionInvocation
-
-
Close and send and error.
-
-
closeStream() - Method in interface org.iot.dsa.dslink.requester.OutboundStream
-
-
Allows the requester to close the stream.
-
-
config() - Method in class org.iot.dsa.logging.DSLogger
-
-
True if the level is loggable.
-
-
config(Object) - Method in class org.iot.dsa.logging.DSLogger
-
 
-
CONFIG_FAULT - Static variable in class org.iot.dsa.node.DSStatus
-
-
Bad, a configuration error has been indentified within DSA.
-
-
CONFIG_FAULT_STR - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
configFault - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
contains(DSElement) - Method in class org.iot.dsa.node.DSList
-
 
-
contains(String) - Method in class org.iot.dsa.node.DSMap
-
 
-
contains(String) - Method in class org.iot.dsa.node.DSNode
-
-
Whether or not this node has a child with the given name.
-
-
copy() - Method in class org.iot.dsa.node.action.DSAction
-
 
-
copy() - Method in class org.iot.dsa.node.DSElement
-
-
If an object is mutable (list or map) then this should clone it, immutable objects can simply - return themselves.
-
-
copy() - Method in class org.iot.dsa.node.DSFlexEnum
-
 
-
copy() - Method in class org.iot.dsa.node.DSInfo
-
 
-
copy() - Method in interface org.iot.dsa.node.DSIObject
-
-
Return a copy if it makes sense, but return this otherwise.
-
-
copy() - Method in class org.iot.dsa.node.DSList
-
 
-
copy() - Method in class org.iot.dsa.node.DSMap
-
 
-
copy() - Method in class org.iot.dsa.node.DSNode
-
-
Returns a clone of this node and its subtree.
-
-
copy() - Method in class org.iot.dsa.node.DSNull
-
-
Returns this.
-
-
copy() - Method in class org.iot.dsa.node.DSValue
-
-
Returns this.
-
-
copy() - Method in class org.iot.dsa.node.event.DSTopic
-
-
Returns this.
-
-
count(long, long) - Method in enum org.iot.dsa.time.DSInterval
-
-
Returns the number of intervals for the given time range, or -1 if indeterminate.
-
-
currentTime() - Static method in class org.iot.dsa.time.DSDateTime
-
-
The current time.
-
-
- - - -

D

-
-
DBL_NAN - Static variable in interface org.iot.dsa.io.json.JsonConstants
-
-
How Double.NaN is encoded: "\\u001BNaN"
-
-
DBL_NEG_INF - Static variable in interface org.iot.dsa.io.json.JsonConstants
-
-
How Double.NEGATIVE_INFINITY is encoded: "\\u001B-Infinity"
-
-
DBL_POS_INF - Static variable in interface org.iot.dsa.io.json.JsonConstants
-
-
How Double.POSITIVE_INFINITY is encoded: "\\u001BInfinity"
-
-
DECIMAL_PLACES - Static variable in class org.iot.dsa.node.DSMetadata
-
 
-
declareDefault(String, DSIObject) - Method in class org.iot.dsa.node.DSNode
-
-
Use this in the declareDefaults method to create a non-removable child.
-
-
declareDefaults() - Method in class org.iot.dsa.dslink.DSLink
-
-
Adds the save action, overrides should call super if they want this action.
-
-
declareDefaults() - Method in class org.iot.dsa.node.DSNode
-
-
The is only called once for each class.
-
-
decode(String) - Static method in class org.iot.dsa.io.DSBase64
-
-
Decodes a base 64 encoded string.
-
-
decode(DSIReader) - Static method in class org.iot.dsa.io.NodeDecoder
-
-
Reads a node tree from the given input.
-
-
decode(String) - Static method in class org.iot.dsa.node.DSBytes
-
 
-
decode() - Method in class org.iot.dsa.security.DSPasswordAes
-
-
Returns the decrypted password.
-
-
decode(String) - Static method in class org.iot.dsa.time.DSTime
-
-
This is a convenience that uses reuses and recycles a calendar instance to get the time in - millis.
-
-
decode(String, Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Converts a DSA encoded timestamp into a Java Calendar.
-
-
decodeKeys(String) - Static method in class org.iot.dsa.security.DSKeys
-
-
Decodes an instance that was encoded with encodeKeys().
-
-
decodePath(String) - Static method in class org.iot.dsa.node.DSPath
-
-
Splits the path and decodes each individual name.
-
-
decodePathName(String) - Static method in class org.iot.dsa.node.DSPath
-
-
Un-escapes a name.
-
-
decodePrivate(byte[]) - Static method in class org.iot.dsa.security.DSKeys
-
-
Decodes the X9.63 encoding of a public key.
-
-
decodePublic(byte[]) - Static method in class org.iot.dsa.security.DSKeys
-
-
Decodes the X9.63 encoding of a public key.
-
-
decodeState(DSElement) - Method in class org.iot.dsa.node.DSInfo
-
 
-
DEFAULT - Static variable in class org.iot.dsa.dslink.requester.SimpleRequestHandler
-
-
An instance that can be used for those requests where the callbacks don't really matter.
-
-
DEFAULT - Static variable in class org.iot.dsa.node.action.DSAction
-
-
Use this when you have no-arg, no-return actions.
-
-
DEFAULT - Static variable in class org.iot.dsa.node.DSMetadata
-
 
-
DEFAULT_BACKUP_THRESHOLD - Static variable in class org.iot.dsa.logging.DSLogging
-
-
This is the threshold, not a hard limit: 10 megs by default.
-
-
DEFAULT_MAX_BACKUPS - Static variable in class org.iot.dsa.logging.DSLogging
-
-
The default number of backups to retain: 10 by default.
-
-
DEFAULT_MAX_QUEUE - Static variable in class org.iot.dsa.logging.DSLogging
-
-
Max async queue size: 2500 by default.
-
-
DESCRIPTION - Static variable in class org.iot.dsa.node.DSMetadata
-
 
-
DISABLED - Static variable in class org.iot.dsa.node.DSStatus
-
-
Bad, the object has been disabled within DSA.
-
-
disabled - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
DISABLED_STR - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
disconnect() - Method in class org.iot.dsa.dslink.DSLinkConnection
-
-
Forcefully closes an open connection.
-
-
DISPLAY_NAME - Static variable in class org.iot.dsa.node.DSMetadata
-
 
-
DOWN - Static variable in class org.iot.dsa.node.DSStatus
-
-
Bad, communications are down within DSA.
-
-
down - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
DOWN_STR - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
DSAction - Class in org.iot.dsa.node.action
-
-
Fully describes an action and routes invocations to DSNode.onInvoke.
-
-
DSAction() - Constructor for class org.iot.dsa.node.action.DSAction
-
 
-
DSBase64 - Class in org.iot.dsa.io
-
-
Thread-safe Base64 encoder and decoder.
-
-
DSBase64() - Constructor for class org.iot.dsa.io.DSBase64
-
 
-
DSBool - Class in org.iot.dsa.node
-
-
Represents a boolean value.
-
-
DSBytes - Class in org.iot.dsa.node
-
-
Byte array that gets encoded as a base64 string.
-
-
DSDateTime - Class in org.iot.dsa.time
-
-
Wrapper for Java time.
-
-
DSDouble - Class in org.iot.dsa.node
-
-
A 64 bit floating point (Java double).
-
-
DSElement - Class in org.iot.dsa.node
-
-
The primitives of the node model.
-
-
DSElement() - Constructor for class org.iot.dsa.node.DSElement
-
 
-
DSElementType - Enum in org.iot.dsa.node
-
-
The core set of elements that translate directly to a JSON type.
-
-
DSException - Exception in org.iot.dsa.util
-
-
An runtime exception that forwards most calls to the inner exception.
-
-
DSException(Throwable) - Constructor for exception org.iot.dsa.util.DSException
-
 
-
DSFlexEnum - Class in org.iot.dsa.node
-
-
An enum where the value and range can be created at runtime, primarily intended for defining - action parameters.
-
-
DSFloat - Class in org.iot.dsa.node
-
-
A Java float.
-
-
DSGroup - Class in org.iot.dsa.node
-
-
An index accessible collection of primitives.
-
-
DSGroup() - Constructor for class org.iot.dsa.node.DSGroup
-
 
-
DSIBoolean - Interface in org.iot.dsa.node
-
-
Indicates something that is/has a boolean value.
-
-
DSIEnum - Interface in org.iot.dsa.node
-
-
DSA Enum mapping.
-
-
DSIEvent - Interface in org.iot.dsa.node.event
-
-
This is an empty interface, DSTopics are allowed to define events however they wish.
-
-
DSIMetadata - Interface in org.iot.dsa.node
-
-
Nodes and values can implement this to provide meta-data about themselves.
-
-
DSInfo - Class in org.iot.dsa.node
-
-
All node children have corresponding DSInfo instances.
-
-
DSInfoTopic - Class in org.iot.dsa.node.event
-
-
This topic is for info related events on DSNodes.
-
-
DSInfoTopic.Event - Enum in org.iot.dsa.node.event
-
-
The possible events for this topic.
-
-
DSInt - Class in org.iot.dsa.node
-
-
A Java int.
-
-
DSInterval - Enum in org.iot.dsa.time
-
-
Enum representing periods of time.
-
-
DSINumber - Interface in org.iot.dsa.node
-
-
Indicates something that is/has a numeric value.
-
-
DSInvalidPathException - Exception in org.iot.dsa.dslink
-
-
Indicates a request path was invalid.
-
-
DSInvalidPathException(String) - Constructor for exception org.iot.dsa.dslink.DSInvalidPathException
-
 
-
DSIObject - Interface in org.iot.dsa.node
-
-
Super class of anything found in the node tree.
-
-
DSIPassword - Interface in org.iot.dsa.security
-
-
Defines the api for verifying passwords.
-
-
DSIReader - Interface in org.iot.dsa.io
-
-
A decoder that can be used to get an entire graph in pieces, or one large group, or somewhere in - between.
-
-
DSIReader.Token - Enum in org.iot.dsa.io
-
-
Represents the state of the reader, and determines which getter should be called next.
-
-
DSIRequester - Interface in org.iot.dsa.dslink
-
-
Interface for submitting outbound requests.
-
-
DSIResponder - Interface in org.iot.dsa.dslink
-
-
Interface for nodes in the node tree to manually handle requests.
-
-
DSIStatus - Interface in org.iot.dsa.node
-
-
Indicates something that is/has a quality.
-
-
DSIStorable - Interface in org.iot.dsa.node
-
-
Enables custom serialization for non-node values in the configuration database.
-
-
DSISubscriber - Interface in org.iot.dsa.node.event
-
-
DSISubscribers subscribe to DSTopics on DSNodes.
-
-
DSIValue - Interface in org.iot.dsa.node
-
-
How data values are represented in the node tree.
-
-
DSIWriter - Interface in org.iot.dsa.io
-
-
An encoder that can be used to encode large graphs with or without object instances.
-
-
DSJavaEnum - Class in org.iot.dsa.node
-
-
Wrapper for Java enums.
-
-
DSKeys - Class in org.iot.dsa.security
-
-
DSA public private key pair.
-
-
DSKeys(File) - Constructor for class org.iot.dsa.security.DSKeys
-
-
Creates a DSKeys object by decoding existing keys from the given file.
-
-
DSKeys(KeyPair) - Constructor for class org.iot.dsa.security.DSKeys
-
-
Creates a DSKeys object for an existing key pair.
-
-
DSKeys.Signer - Class in org.iot.dsa.security
-
-
Signs bytes.
-
-
DSKeys.Verifier - Class in org.iot.dsa.security
-
-
Verifies signatures.
-
-
DSLink - Class in org.iot.dsa.dslink
-
-
Represents an upstream connection, a node tree, and manages the lifecycle of both.
-
-
DSLink() - Constructor for class org.iot.dsa.dslink.DSLink
-
-
Use the load method to create links.
-
-
DSLinkConfig - Class in org.iot.dsa.dslink
-
-
Configuration options for starting a link.
-
-
DSLinkConfig() - Constructor for class org.iot.dsa.dslink.DSLinkConfig
-
-
This will create an empty unvalidated getConfig.
-
-
DSLinkConfig(File) - Constructor for class org.iot.dsa.dslink.DSLinkConfig
-
-
Can be use to change the working dir from the default process working dir.
-
-
DSLinkConfig(String) - Constructor for class org.iot.dsa.dslink.DSLinkConfig
-
-
Constructor for simulating a command line invocation, the argument will be split on the space - character.
-
-
DSLinkConfig(String[]) - Constructor for class org.iot.dsa.dslink.DSLinkConfig
-
-
Constructor for the arguments pass to a main method.
-
-
DSLinkConnection - Class in org.iot.dsa.dslink
-
-
Represents an upstream connection with a broker.
-
-
DSLinkConnection() - Constructor for class org.iot.dsa.dslink.DSLinkConnection
-
 
-
DSLinkConnection.Listener - Interface in org.iot.dsa.dslink
-
-
Intended for requester functionality so that requesters can know when to - start and stop making requests.
-
-
DSList - Class in org.iot.dsa.node
-
-
Indexed collection of elements.
-
-
DSList() - Constructor for class org.iot.dsa.node.DSList
-
 
-
DSLogger - Class in org.iot.dsa.logging
-
-
Adds a convenience layer to Java Util Logging.
-
-
DSLogger() - Constructor for class org.iot.dsa.logging.DSLogger
-
 
-
DSLogging - Class in org.iot.dsa.logging
-
-
Static utilities for configuring the logging subsystem.
-
-
DSLong - Class in org.iot.dsa.node
-
-
A 64 bit integer (a Java long).
-
-
DSMainNode - Class in org.iot.dsa.dslink
-
-
The root DSNode that triggers a link's custom functionality .
-
-
DSMainNode() - Constructor for class org.iot.dsa.dslink.DSMainNode
-
 
-
DSMap - Class in org.iot.dsa.node
-
-
String keyed collection of elements that preserves the order of addition.
-
-
DSMap() - Constructor for class org.iot.dsa.node.DSMap
-
 
-
DSMap.Entry - Class in org.iot.dsa.node
-
-
Allows values to be accessed quickly by index in the list, rather than having to do a key - lookup in the map.
-
-
DSMetadata - Class in org.iot.dsa.node
-
-
Utility fon constructing metadata maps.
-
-
DSMetadata() - Constructor for class org.iot.dsa.node.DSMetadata
-
 
-
DSMetadata(DSMap) - Constructor for class org.iot.dsa.node.DSMetadata
-
 
-
DSNode - Class in org.iot.dsa.node
-
-
The organizational unit of the node tree.
-
-
DSNode() - Constructor for class org.iot.dsa.node.DSNode
-
 
-
DSNull - Class in org.iot.dsa.node
-
-
Try not to use, it is for decoding raw json.
-
-
DSPasswordAes - Class in org.iot.dsa.security
-
-
Stores an encrypted password which can be decrypted.
-
-
DSPasswordSha256 - Class in org.iot.dsa.security
-
-
Stores and verifies passwords using a SHA-256 hash of the text.
-
-
DSPath - Class in org.iot.dsa.node
-
-
Represents a path in the node tree.
-
-
DSPath(String) - Constructor for class org.iot.dsa.node.DSPath
-
 
-
DSPermission - Enum in org.iot.dsa.security
-
-
Used to define the required permissions for various objects.
-
-
DSPermissionException - Exception in org.iot.dsa.dslink
-
-
Indicates a request has insufficient permissions.
-
-
DSPermissionException(String) - Constructor for exception org.iot.dsa.dslink.DSPermissionException
-
 
-
DSRegistry - Class in org.iot.dsa.node
-
-
Static type related meta-data.
-
-
DSRegistry() - Constructor for class org.iot.dsa.node.DSRegistry
-
 
-
DSRequestException - Exception in org.iot.dsa.dslink
-
-
Indicates something was wrong with a request.
-
-
DSRequestException() - Constructor for exception org.iot.dsa.dslink.DSRequestException
-
 
-
DSRequestException(String) - Constructor for exception org.iot.dsa.dslink.DSRequestException
-
 
-
DSRuntime - Class in org.iot.dsa
-
-
DSA thread pool and timers.
-
-
DSRuntime.Timer - Class in org.iot.dsa
-
-
Can be used to inspect and cancel tasks passed to the run methods in DSRuntime.
-
-
DSStatus - Class in org.iot.dsa.node
-
-
Represent the health, quality or condition of an object.
-
-
DSString - Class in org.iot.dsa.node
-
-
String wrapper.
-
-
DSTime - Class in org.iot.dsa.time
-
-
Misc time utility functions.
-
-
DSTopic - Class in org.iot.dsa.node.event
-
-
DSISubscribers subscribe to DSTopics on DSNodes.
-
-
DSTopic() - Constructor for class org.iot.dsa.node.event.DSTopic
-
 
-
DSUtil - Class in org.iot.dsa.util
-
-
Common utilities.
-
-
DSValue - Class in org.iot.dsa.node
-
-
A convenience that provides some common default behavior.
-
-
DSValue() - Constructor for class org.iot.dsa.node.DSValue
-
 
-
DSValueNode - Class in org.iot.dsa.node
-
-
A convenience implementation of a node that is also a value.
-
-
DSValueNode() - Constructor for class org.iot.dsa.node.DSValueNode
-
 
-
DSValueTopic - Class in org.iot.dsa.node.event
-
-
This topic is for change of value events on DSNodes.
-
-
DSValueTopic.Event - Enum in org.iot.dsa.node.event
-
-
The possible events from this topic.
-
-
DSValueType - Enum in org.iot.dsa.node
-
-
These are the primitive types in the DSA protocol.
-
-
- - - -

E

-
-
EDITOR - Static variable in class org.iot.dsa.node.DSMetadata
-
 
-
EMPTY - Static variable in class org.iot.dsa.node.DSString
-
-
The string of length 0.
-
-
encode(byte[]) - Static method in class org.iot.dsa.io.DSBase64
-
-
Encodes the bytes into a single line string with no padding.
-
-
encode(byte[], int) - Static method in class org.iot.dsa.io.DSBase64
-
-
Encodes the buffer into a String with the given line length.
-
-
encode(DSIWriter, DSNode) - Static method in class org.iot.dsa.io.NodeEncoder
-
-
Writes the node tree to the given writer.
-
-
encode(byte[]) - Static method in class org.iot.dsa.node.DSBytes
-
 
-
encode(byte[]) - Static method in class org.iot.dsa.security.DSPasswordAes
-
-
Encrypts the given bytes.
-
-
encode(String) - Static method in class org.iot.dsa.security.DSPasswordAes
-
-
Encrypts the given text.
-
-
encode(byte[]) - Static method in class org.iot.dsa.security.DSPasswordSha256
-
-
SHA-256 hash of the bytes encoded as url safe base 64..
-
-
encode(String) - Static method in class org.iot.dsa.security.DSPasswordSha256
-
-
SHA-256 hash of the UTF-8 bytes, encoded as url safe base 64..
-
-
encode(long, boolean) - Static method in class org.iot.dsa.time.DSTime
-
-
Converts a Java Calendar into a DSA encoded timestamp.
-
-
encode(long, boolean, StringBuilder) - Static method in class org.iot.dsa.time.DSTime
-
-
Converts a Java Calendar into a DSA encoded timestamp.
-
-
encode(Calendar, boolean, StringBuilder) - Static method in class org.iot.dsa.time.DSTime
-
-
Converts a Java Calendar into a DSA encoded timestamp.
-
-
encodeForFiles(Calendar, StringBuilder) - Static method in class org.iot.dsa.time.DSTime
-
-
Converts a Java Calendar into a number safe for file names: YYMMDDHHMMSS.
-
-
encodeForLogs(Calendar, StringBuilder) - Static method in class org.iot.dsa.time.DSTime
-
-
Converts a Java Calendar into a shorter human readable timestamp for use in logging files.
-
-
encodeKeys() - Method in class org.iot.dsa.security.DSKeys
-
-
Encodes the key pair which can be then decoded with decodeKeys().
-
-
encodeName(String) - Static method in class org.iot.dsa.node.DSPath
-
-
Encodes a name for being in a path.
-
-
encodeName(String, StringBuilder) - Static method in class org.iot.dsa.node.DSPath
-
-
Encodes a name for being in a path.
-
-
encodePath(DSNode) - Static method in class org.iot.dsa.node.DSPath
-
-
Ascends the tree and encodes all the node names into a path.
-
-
encodePublic() - Method in class org.iot.dsa.security.DSKeys
-
-
X9.63 encoding of the public key.
-
-
encodePublicHashDsId() - Method in class org.iot.dsa.security.DSKeys
-
-
Base64 encoding (no padding and url safe) of the SHA256 hash of the public key.
-
-
encodeState() - Method in class org.iot.dsa.node.DSInfo
-
 
-
encodeUrl(byte[]) - Static method in class org.iot.dsa.io.DSBase64
-
-
Encodes to a URL safe base64 string.
-
-
endList() - Method in class org.iot.dsa.io.AbstractWriter
-
 
-
endList() - Method in interface org.iot.dsa.io.DSIWriter
-
-
End the current list.
-
-
endMap() - Method in class org.iot.dsa.io.AbstractWriter
-
 
-
endMap() - Method in interface org.iot.dsa.io.DSIWriter
-
-
End the current map.
-
-
ENUM_RANGE - Static variable in class org.iot.dsa.node.DSMetadata
-
 
-
equal(Object, Object) - Static method in class org.iot.dsa.util.DSUtil
-
-
Comparison that takes null into account; null == null.
-
-
equals(Object) - Method in class org.iot.dsa.node.DSBool
-
 
-
equals(Object) - Method in class org.iot.dsa.node.DSBytes
-
-
True if the argument is a DSINumber and the values are equal or they are both isNull.
-
-
equals(Object) - Method in class org.iot.dsa.node.DSDouble
-
-
True if the argument is a DSINumber and the values are equal or they are both isNull.
-
-
equals(Object) - Method in class org.iot.dsa.node.DSFlexEnum
-
-
True if the argument is a DSFlexEnum and the values are equal or they are both isNull.
-
-
equals(Object) - Method in class org.iot.dsa.node.DSFloat
-
-
True if the argument is a DSINumber and the values are equal or they are both isNull.
-
-
equals(Object) - Method in class org.iot.dsa.node.DSGroup
-
 
-
equals(Object) - Method in class org.iot.dsa.node.DSInfo
-
 
-
equals(Object) - Method in class org.iot.dsa.node.DSInt
-
-
True if the argument is a DSINumber and the values are equal or they are both isNull.
-
-
equals(Object) - Method in class org.iot.dsa.node.DSJavaEnum
-
-
True if the argument is a DSDynamicEnum and the values are equal or they are both isNull.
-
-
equals(Object) - Method in class org.iot.dsa.node.DSLong
-
-
True if the argument is a DSINumber and the values are equal or they are both isNull.
-
-
equals(Object) - Method in class org.iot.dsa.node.DSMap.Entry
-
 
-
equals(Object) - Method in class org.iot.dsa.node.DSMap
-
 
-
equals(Object) - Method in class org.iot.dsa.node.DSNull
-
-
True of the arg == this.
-
-
equals(Object) - Method in class org.iot.dsa.node.DSStatus
-
 
-
equals(Object) - Method in class org.iot.dsa.node.DSString
-
 
-
equals(Object) - Method in class org.iot.dsa.security.DSPasswordAes
-
 
-
equals(Object) - Method in class org.iot.dsa.security.DSPasswordSha256
-
 
-
equals(Object) - Method in class org.iot.dsa.time.DSDateTime
-
 
-
equalsDefault() - Method in class org.iot.dsa.node.DSInfo
-
-
True if this proxies a default and the state and value match the default.
-
-
equalsDefaultState() - Method in class org.iot.dsa.node.DSInfo
-
-
True if the state matches the default state.
-
-
equalsDefaultType() - Method in class org.iot.dsa.node.DSInfo
-
-
True if this proxies a default and the value type matches the default.
-
-
equalsDefaultValue() - Method in class org.iot.dsa.node.DSInfo
-
-
True if this proxies a default and the value matches the default.
-
-
- - - -

F

-
-
FALSE - Static variable in class org.iot.dsa.node.DSBool
-
 
-
FAULT - Static variable in class org.iot.dsa.node.DSStatus
-
-
Bad, an operational error (exception) has occurred within DSA.
-
-
fault - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
FAULT_STR - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
FileLogHandler - Class in org.iot.dsa.logging
-
-
Logs records to a file.
-
-
fine() - Method in class org.iot.dsa.logging.DSLogger
-
-
True if the level is loggable.
-
-
fine(Object) - Method in class org.iot.dsa.logging.DSLogger
-
-
Log a frequent event.
-
-
fine(Object, Throwable) - Method in class org.iot.dsa.logging.DSLogger
-
-
Log a frequent event.
-
-
finer() - Method in class org.iot.dsa.logging.DSLogger
-
-
True if the level is loggable.
-
-
finer(Object) - Method in class org.iot.dsa.logging.DSLogger
-
-
Log a debug event.
-
-
finer(Object, Throwable) - Method in class org.iot.dsa.logging.DSLogger
-
-
Log a debug event.
-
-
finest() - Method in class org.iot.dsa.logging.DSLogger
-
-
True if the level is loggable.
-
-
finest(Object) - Method in class org.iot.dsa.logging.DSLogger
-
-
Log a trace or verbose event.
-
-
finest(Object, Throwable) - Method in class org.iot.dsa.logging.DSLogger
-
-
Log a trace or verbose event.
-
-
fire(DSTopic, DSIEvent, DSInfo) - Method in class org.iot.dsa.node.DSNode
-
-
Notifies subscribers of the event.
-
-
fire(DSTopic, DSIEvent, DSInfo, Object...) - Method in class org.iot.dsa.node.DSNode
-
-
Notifies subscribers of the event.
-
-
first() - Method in class org.iot.dsa.node.DSGroup
-
-
Returns the item at index 0.
-
-
flush() - Method in interface org.iot.dsa.io.DSIWriter
-
-
Flush the stream.
-
-
flush() - Method in class org.iot.dsa.io.json.JsonAppender
-
 
-
flush() - Method in class org.iot.dsa.io.json.JsonWriter
-
 
-
flush() - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
-
Does nothing.
-
-
flush() - Method in class org.iot.dsa.logging.AsyncLogHandler
-
 
-
forString(String) - Static method in enum org.iot.dsa.security.DSPermission
-
 
-
- - - -

G

-
-
generateHmacSHA256Signature(byte[], byte[]) - Static method in class org.iot.dsa.security.DSKeys
-
 
-
generateSharedSecret(byte[]) - Method in class org.iot.dsa.security.DSKeys
-
-
Uses the given public key to generate an ECDH shared secret.
-
-
generateSharedSecret(String) - Method in class org.iot.dsa.security.DSKeys
-
-
Uses the given public key to generate an ECDH shared secret.
-
-
get(int) - Method in class org.iot.dsa.node.DSGroup
-
-
Returns the value at the given index.
-
-
get(int, boolean) - Method in class org.iot.dsa.node.DSGroup
-
-
Optional getter.
-
-
get(int, double) - Method in class org.iot.dsa.node.DSGroup
-
-
Optional getter.
-
-
get(int, int) - Method in class org.iot.dsa.node.DSGroup
-
-
Optional getter.
-
-
get(int, long) - Method in class org.iot.dsa.node.DSGroup
-
-
Optional getter.
-
-
get(int, String) - Method in class org.iot.dsa.node.DSGroup
-
-
Optional getter.
-
-
get(int) - Method in class org.iot.dsa.node.DSList
-
 
-
get(int) - Method in class org.iot.dsa.node.DSMap
-
 
-
get(String) - Method in class org.iot.dsa.node.DSMap
-
-
Returns the value for the given key.
-
-
get(String, boolean) - Method in class org.iot.dsa.node.DSMap
-
-
Optional getter, returns the provided default if the value mapped to the key is null or not - convertible.
-
-
get(String, double) - Method in class org.iot.dsa.node.DSMap
-
-
Optional getter, returns the provided default if the value mapped to the key is null.
-
-
get(String, int) - Method in class org.iot.dsa.node.DSMap
-
-
Optional getter, returns the provided default if the value mapped to the key is null or not - convertible.
-
-
get(String, long) - Method in class org.iot.dsa.node.DSMap
-
-
Optional getter, returns the provided default if the value mapped to the key is null or not - convertible.
-
-
get(String, String) - Method in class org.iot.dsa.node.DSMap
-
-
Optional getter, returns the provided default if the value mapped to the key is null.
-
-
get(String) - Method in class org.iot.dsa.node.DSNode
-
-
Returns the child value with the given name, or null.
-
-
getAction() - Method in interface org.iot.dsa.dslink.responder.ApiObject
-
-
The action, should only be called if isAction() returns true.
-
-
getAction() - Method in interface org.iot.dsa.node.action.ActionResult
-
-
The action that was invoked.
-
-
getAction() - Method in class org.iot.dsa.node.DSInfo
-
 
-
getBackups() - Method in class org.iot.dsa.logging.FileLogHandler
-
-
Backup files for this logging, found in the same directory as the active logging.
-
-
getBit(int, int) - Static method in class org.iot.dsa.util.DSUtil
-
-
Returns true if the bit at the given index is set.
-
-
getBoolean() - Method in class org.iot.dsa.io.AbstractReader
-
 
-
getBoolean() - Method in interface org.iot.dsa.io.DSIReader
-
-
Returns the value when last() == BOOLEAN.
-
-
getBoolean(int) - Method in class org.iot.dsa.node.DSGroup
-
-
Primitive getter.
-
-
getBoolean(String) - Method in class org.iot.dsa.node.DSMap
-
-
Primitive getter.
-
-
getBooleanRange() - Method in class org.iot.dsa.node.DSMetadata
-
-
The boolean range, or null.
-
-
getBrokerUri() - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
If not set, will look for the getConfig in dslink.json.
-
-
getBytes() - Method in class org.iot.dsa.io.AbstractReader
-
 
-
getBytes() - Method in interface org.iot.dsa.io.DSIReader
-
-
Returns the value when last() == BYTES.
-
-
getBytes() - Method in class org.iot.dsa.node.DSBytes
-
-
The raw bytes, do not modify.
-
-
getCalendar() - Static method in class org.iot.dsa.time.DSTime
-
-
Attempts to reuse a calendar instance, the timezone will be set to TimeZone.getDefault().
-
-
getCalendar(long) - Static method in class org.iot.dsa.time.DSTime
-
-
Attempts to reuse a calendar instance and sets the time in millis to the argument and the - timezone to TimeZone.getDefault().
-
-
getCause() - Method in exception org.iot.dsa.util.DSException
-
 
-
getChildren() - Method in interface org.iot.dsa.dslink.responder.ApiObject
-
-
Iterator of child objects, should only be called if hasChildren() returns true.
-
-
getChildren() - Method in class org.iot.dsa.node.DSInfo
-
 
-
getColumns() - Method in interface org.iot.dsa.node.action.ActionTable
-
-
Column definitions, optional but highly recommended.
-
-
getConfig() - Method in class org.iot.dsa.dslink.DSLink
-
 
-
getConfig(String, boolean) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Looks for the value in dslink.json and if not found, returns the fallback.
-
-
getConfig(String, double) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Looks for the value in dslink.json and if not found, returns the fallback.
-
-
getConfig(String, int) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Looks for the value in dslink.json and if not found, returns the fallback.
-
-
getConfig(String, long) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Looks for the value in dslink.json and if not found, returns the fallback.
-
-
getConfig(String, String) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Looks for the value in dslink.json and if not found, returns the fallback.
-
-
getConnection() - Method in class org.iot.dsa.dslink.DSLink
-
 
-
getConnectionId() - Method in class org.iot.dsa.dslink.DSLinkConnection
-
-
A unique descriptive tag such as a combination of the link name and the broker host.
-
-
getDecimalPlaces() - Method in class org.iot.dsa.node.DSMetadata
-
-
The decimal precision or null.
-
-
getDecoder(Class) - Static method in class org.iot.dsa.node.DSRegistry
-
-
The instance to use for decoding.
-
-
getDefault() - Method in class org.iot.dsa.node.DSMetadata
-
-
The default value for an action parameter, or null.
-
-
getDefaultLogger() - Static method in class org.iot.dsa.logging.DSLogging
-
-
The default logger.
-
-
getDefaultObject() - Method in class org.iot.dsa.node.DSInfo
-
-
If this represents a dynamic child, this just returns the current value.
-
-
getDepth() - Method in class org.iot.dsa.io.AbstractWriter
-
-
Current depth in the tree, will be needed by writeNewLineIndent.
-
-
getDescription() - Method in class org.iot.dsa.node.DSMetadata
-
-
The description, or null.
-
-
getDetail() - Method in exception org.iot.dsa.dslink.DSRequestException
-
-
Additional information to supply to the remote endpoint.
-
-
getDisplayName() - Method in class org.iot.dsa.node.DSMetadata
-
-
The alternate display name, or null.
-
-
getDouble() - Method in class org.iot.dsa.io.AbstractReader
-
 
-
getDouble() - Method in interface org.iot.dsa.io.DSIReader
-
-
Returns the value when last() == DOUBLE.
-
-
getDouble(int) - Method in class org.iot.dsa.node.DSGroup
-
-
Primitive getter.
-
-
getDouble(String) - Method in class org.iot.dsa.node.DSMap
-
-
Primitive getter.
-
-
getDsId() - Method in class org.iot.dsa.dslink.DSLink
-
-
Returns the unique id of the connection.
-
-
getDslinkJson() - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
If not set, this will attempt to open dslink.json in the working the process directory.
-
-
getEditor() - Method in class org.iot.dsa.node.DSMetadata
-
-
The editor, or null.
-
-
getElement() - Method in class org.iot.dsa.io.AbstractReader
-
 
-
getElement() - Method in interface org.iot.dsa.io.DSIReader
-
-
Returns the DSElement when last() == raw type or ROOT.
-
-
getElement() - Method in class org.iot.dsa.node.DSInfo
-
-
A convenience that casts getObject().
-
-
getElement(String) - Method in class org.iot.dsa.node.DSNode
-
-
A convenience for (DSElement) get(name).
-
-
getElementType() - Method in class org.iot.dsa.node.DSBool
-
 
-
getElementType() - Method in class org.iot.dsa.node.DSBytes
-
 
-
getElementType() - Method in class org.iot.dsa.node.DSDouble
-
 
-
getElementType() - Method in class org.iot.dsa.node.DSElement
-
-
For switch statements.
-
-
getElementType() - Method in class org.iot.dsa.node.DSList
-
 
-
getElementType() - Method in class org.iot.dsa.node.DSLong
-
 
-
getElementType() - Method in class org.iot.dsa.node.DSMap
-
 
-
getElementType() - Method in class org.iot.dsa.node.DSNull
-
 
-
getElementType() - Method in class org.iot.dsa.node.DSString
-
 
-
getEntry(int) - Method in class org.iot.dsa.node.DSMap
-
 
-
getEntry(String) - Method in class org.iot.dsa.node.DSMap
-
 
-
getEnumRange() - Method in class org.iot.dsa.node.DSMetadata
-
-
The editor, or null.
-
-
getEnums(DSList) - Method in class org.iot.dsa.node.DSFlexEnum
-
 
-
getEnums(DSList) - Method in interface org.iot.dsa.node.DSIEnum
-
-
Adds the range of possible values to the given bucket.
-
-
getEnums(DSList) - Method in class org.iot.dsa.node.DSJavaEnum
-
 
-
getFirst() - Method in class org.iot.dsa.node.DSNode
-
-
The first child, or null.
-
-
getFirstInfo() - Method in class org.iot.dsa.node.DSNode
-
-
The first child info, or null.
-
-
getFirstNodeInfo() - Method in class org.iot.dsa.node.DSNode
-
-
The info for the first child node, or null.
-
-
getFloat(int) - Method in class org.iot.dsa.node.DSGroup
-
-
Primitive getter.
-
-
getHandler(File) - Static method in class org.iot.dsa.logging.FileLogHandler
-
-
Will return an existing handler for the given file, or create a new one.
-
-
getHelpText() - Static method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Help text for command line options.
-
-
getHouseKeepingIntervalMillis() - Method in class org.iot.dsa.logging.AsyncLogHandler
-
-
Ten seconds by default, this is a guideline more than anything else.
-
-
getInfo() - Method in class org.iot.dsa.node.DSNode
-
-
DSInfo for this node in its parent, or null if un-parented.
-
-
getInfo(String) - Method in class org.iot.dsa.node.DSNode
-
-
Returns the info for the child with the given name, or null.
-
-
getInt(int) - Method in class org.iot.dsa.node.DSGroup
-
-
Primitive getter.
-
-
getInt(String) - Method in class org.iot.dsa.node.DSMap
-
-
Primitive getter.
-
-
getInterval() - Method in class org.iot.dsa.DSRuntime.Timer
-
-
The interval between runs, zero or less for no interval.
-
-
getKey() - Method in class org.iot.dsa.node.DSMap.Entry
-
 
-
getKey(int) - Method in class org.iot.dsa.node.DSMap
-
-
Returns the key at the given index.
-
-
getKeys() - Method in class org.iot.dsa.dslink.DSLink
-
-
Public / private keys of the link, used to prove identity with brokers.
-
-
getKeys() - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
If not set, will attempt to use the getConfig in dslink.json and fall back to '.key' in the - process directory if necessary.
-
-
getKeys() - Method in class org.iot.dsa.security.DSKeys
-
-
The public and private keys.
-
-
getLast() - Method in class org.iot.dsa.node.DSNode
-
-
The last child, or null.
-
-
getLastInfo() - Method in class org.iot.dsa.node.DSNode
-
-
The last child info, or null.
-
-
getLastPathElement() - Method in class org.iot.dsa.node.DSPath
-
 
-
getLevel() - Method in enum org.iot.dsa.security.DSPermission
-
 
-
getLink() - Method in class org.iot.dsa.dslink.DSLinkConnection
-
-
The link using this connection.
-
-
getLink() - Method in class org.iot.dsa.dslink.DSMainNode
-
-
The parent link or null.
-
-
getLinkName() - Method in class org.iot.dsa.dslink.DSLink
-
-
As defined in dslink.json.
-
-
getLinkName() - Method in class org.iot.dsa.dslink.DSLinkConfig
-
 
-
getList() - Method in class org.iot.dsa.io.AbstractReader
-
 
-
getList() - Method in interface org.iot.dsa.io.DSIReader
-
-
This should only be called when last() == BEGIN_LIST and it will decodeKeys the entire - list.
-
-
getList(int) - Method in class org.iot.dsa.node.DSGroup
-
-
Primitive getter.
-
-
getList(String) - Method in class org.iot.dsa.node.DSMap
-
-
Return the list, or null.
-
-
getLocalizedMessage() - Method in exception org.iot.dsa.util.DSException
-
 
-
getLogFile() - Method in class org.iot.dsa.dslink.DSLinkConfig
-
 
-
getLogger() - Method in class org.iot.dsa.dslink.DSLink
-
-
The logger as defined in dslink.json.
-
-
getLogger() - Method in class org.iot.dsa.dslink.DSLinkConnection
-
 
-
getLogger(String) - Method in class org.iot.dsa.dslink.DSMainNode
-
-
Creates a child logger of the link.
-
-
getLogger() - Method in class org.iot.dsa.logging.DSLogger
-
-
Override point, returns the console logger by default.
-
-
getLogger(String, File) - Static method in class org.iot.dsa.logging.DSLogging
-
-
Adds a FileLogHandler to the named logger, if there isn't one already.
-
-
getLogger() - Method in class org.iot.dsa.node.DSNode
-
-
Ascends the tree until a logger is found.
-
-
getLogLevel() - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
If not set, will attempt to use the getConfig in dslink.json but fall back to 'info' if - necessary.
-
-
getLong() - Method in class org.iot.dsa.io.AbstractReader
-
 
-
getLong() - Method in interface org.iot.dsa.io.DSIReader
-
-
Returns the value when last() == LONG.
-
-
getLong(int) - Method in class org.iot.dsa.node.DSGroup
-
-
Primitive getter.
-
-
getLong(String) - Method in class org.iot.dsa.node.DSMap
-
-
Primitive getter.
-
-
getMain() - Method in class org.iot.dsa.dslink.DSLink
-
-
Returns the root of the node tree.
-
-
getMainType() - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
The type of the root node.
-
-
getMap() - Method in class org.iot.dsa.io.AbstractReader
-
 
-
getMap() - Method in interface org.iot.dsa.io.DSIReader
-
-
This should only be called when last() == BEGIN_MAP and it will decodeKeys the entire map.
-
-
getMap(int) - Method in class org.iot.dsa.node.DSGroup
-
-
Primitive getter.
-
-
getMap(String) - Method in class org.iot.dsa.node.DSMap
-
-
Returns the map value for the given key, or null.
-
-
getMap() - Method in class org.iot.dsa.node.DSMetadata
-
 
-
getMaxBackups() - Method in class org.iot.dsa.logging.FileLogHandler
-
-
The number of backup files to retain.
-
-
getMaxValue() - Method in class org.iot.dsa.node.DSMetadata
-
-
The max value, or null.
-
-
getMessage() - Method in exception org.iot.dsa.util.DSException
-
 
-
getMetadata(DSMap) - Method in interface org.iot.dsa.dslink.responder.ApiObject
-
 
-
getMetadata(DSMap) - Method in class org.iot.dsa.node.DSFlexEnum
-
 
-
getMetadata(DSMap) - Method in interface org.iot.dsa.node.DSIMetadata
-
-
The entity should add any metadata about itself to the given map.
-
-
getMetadata(DSMap) - Method in class org.iot.dsa.node.DSInfo
-
 
-
getMetadata(DSMap) - Method in class org.iot.dsa.node.DSJavaEnum
-
 
-
getMetadata(DSInfo, DSMap) - Static method in class org.iot.dsa.node.DSMetadata
-
-
Fully acquires metadata about the info.
-
-
getMetadata(DSInfo, DSMap) - Method in class org.iot.dsa.node.DSNode
-
-
Override point, add any meta data for the given info to the provided bucket.
-
-
getMinValue() - Method in class org.iot.dsa.node.DSMetadata
-
-
The min value, or null.
-
-
getName() - Method in interface org.iot.dsa.dslink.responder.ApiObject
-
-
The display name.
-
-
getName() - Method in class org.iot.dsa.node.DSInfo
-
 
-
getName() - Method in class org.iot.dsa.node.DSMetadata
-
-
The name, or null.
-
-
getName() - Method in class org.iot.dsa.node.DSNode
-
-
Returns the name of this node in its parent, or null if un-parented.
-
-
getNode() - Method in class org.iot.dsa.node.DSInfo
-
-
A convenience that casts getObject().
-
-
getNode(String) - Method in class org.iot.dsa.node.DSNode
-
-
A convenience for (DSNode) get(name).
-
-
getNodesFile() - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
If not set, will attempt to use the getConfig in dslink.json but fall back to 'nodes.zip' in - the process directory if necessary.
-
-
getObject() - Method in class org.iot.dsa.node.DSInfo
-
 
-
getOut() - Method in class org.iot.dsa.logging.AsyncLogHandler
-
-
The sink for formatted messages.
-
-
getParameters() - Method in interface org.iot.dsa.node.action.ActionInvocation
-
-
The parameters supplied by the requester, or null.
-
-
getParameters() - Method in interface org.iot.dsa.node.action.ActionSpec
-
-
Returns an iterator for each parameter.
-
-
getParameters() - Method in class org.iot.dsa.node.action.DSAction
-
 
-
getParameters() - Static method in class org.iot.dsa.security.DSKeys
-
-
The AlgorithmParameterSpec for the predefined elliptic curve secp256r1.
-
-
getParams() - Method in class org.iot.dsa.dslink.requester.AbstractInvokeHandler
-
-
Returns the value passed to onInit.
-
-
getParent() - Method in class org.iot.dsa.node.DSInfo
-
 
-
getParent() - Method in class org.iot.dsa.node.DSNode
-
-
Returns the parent node, or null.
-
-
getPath() - Method in class org.iot.dsa.dslink.requester.AbstractInvokeHandler
-
-
Returns the value passed to onInit.
-
-
getPath() - Method in class org.iot.dsa.dslink.requester.AbstractListHandler
-
-
Returns the value passed to onInit.
-
-
getPath() - Method in class org.iot.dsa.dslink.requester.AbstractSubscribeHandler
-
-
Returns the value passed to onInit.
-
-
getPath() - Method in interface org.iot.dsa.dslink.responder.InboundRequest
-
-
The target of the request.
-
-
getPath() - Method in class org.iot.dsa.node.DSNode
-
-
The DSA path, properly encoded.
-
-
getPath() - Method in class org.iot.dsa.node.DSPath
-
-
The raw fully encoded path.
-
-
getPathElements() - Method in class org.iot.dsa.node.DSPath
-
-
The individual, decoded path elements.
-
-
getPermission() - Method in interface org.iot.dsa.dslink.responder.InboundSetRequest
-
-
The permission to set with.
-
-
getPermission() - Method in interface org.iot.dsa.node.action.ActionInvocation
-
-
The permission level of the invoker, should be verified against the permission level required - by the action.
-
-
getPermission() - Method in interface org.iot.dsa.node.action.ActionSpec
-
-
Minimum permission level required to invoke.
-
-
getPermission() - Method in class org.iot.dsa.node.action.DSAction
-
 
-
getPlaceHolder() - Method in class org.iot.dsa.node.DSMetadata
-
-
Placeholder text for text fields, or null.
-
-
getPrivateKey() - Method in class org.iot.dsa.security.DSKeys
-
-
A convenience that casts the private key.
-
-
getPublicKey() - Method in class org.iot.dsa.security.DSKeys
-
-
A convenience that casts the public key.
-
-
getQos() - Method in class org.iot.dsa.dslink.requester.AbstractSubscribeHandler
-
-
Returns the value passed to onInit.
-
-
getRequester() - Method in class org.iot.dsa.dslink.DSLinkConnection
-
 
-
getRequestId() - Method in interface org.iot.dsa.dslink.responder.InboundRequest
-
-
Unique ID of the request, or 0 for subscriptions.
-
-
getResultType() - Method in interface org.iot.dsa.node.action.ActionSpec
-
-
What the action returns.
-
-
getResultType() - Method in class org.iot.dsa.node.action.DSAction
-
 
-
getRows() - Method in interface org.iot.dsa.node.action.ActionTable
-
-
This should return an iterator for the initial set of rows, or null if there aren't any.
-
-
getRunnable() - Method in class org.iot.dsa.DSRuntime.Timer
-
-
The runnable being managed by this timer.
-
-
getSignature() - Method in class org.iot.dsa.security.DSKeys.Signer
-
-
The signature for all bytes passed to the update method.
-
-
getSignatureBase64() - Method in class org.iot.dsa.security.DSKeys.Signer
-
-
The base 64 encoding of the signature for all bytes passed to the update method.
-
-
getStackTrace() - Method in exception org.iot.dsa.util.DSException
-
 
-
getStream() - Method in class org.iot.dsa.dslink.requester.AbstractInvokeHandler
-
-
Returns the value passed to onInit.
-
-
getStream() - Method in class org.iot.dsa.dslink.requester.AbstractListHandler
-
-
Returns the value passed to onInit.
-
-
getStream() - Method in class org.iot.dsa.dslink.requester.AbstractSubscribeHandler
-
-
Returns the value passed to onInit.
-
-
getString() - Method in class org.iot.dsa.io.AbstractReader
-
 
-
getString() - Method in interface org.iot.dsa.io.DSIReader
-
-
Returns the value when last() == STRING.
-
-
getString(int) - Method in class org.iot.dsa.node.DSGroup
-
-
Primitive getter.
-
-
getString(String) - Method in class org.iot.dsa.node.DSMap
-
-
Returns the String value for the given key, or null.
-
-
getSubscriptionId() - Method in interface org.iot.dsa.dslink.responder.InboundSubscribeRequest
-
-
Unique subscription id for this path.
-
-
getTarget() - Method in interface org.iot.dsa.dslink.responder.OutboundListResponse
-
-
The object that represents the path of the request.
-
-
getThreadName() - Method in class org.iot.dsa.logging.AsyncLogHandler
-
-
Used to name the thread that processes logging records.
-
-
getThreadName() - Method in class org.iot.dsa.logging.FileLogHandler
-
 
-
getThreadName() - Method in class org.iot.dsa.logging.PrintStreamLogHandler
-
 
-
getToken() - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Authentication token for the broker, this can return null.
-
-
getTransport() - Method in class org.iot.dsa.dslink.DSLinkConnection
-
 
-
getType() - Method in class org.iot.dsa.node.DSMetadata
-
-
The type for action parameters, can be used to override types in the responder api.
-
-
getUnit() - Method in class org.iot.dsa.node.DSMetadata
-
-
Value if defined, otherwise null.
-
-
getValue() - Method in interface org.iot.dsa.dslink.responder.ApiObject
-
-
Value of the object, should only be called if isValue() returns true.
-
-
getValue() - Method in interface org.iot.dsa.dslink.responder.InboundSetRequest
-
-
The value to set.
-
-
getValue() - Method in class org.iot.dsa.node.DSInfo
-
-
A convenience that casts getObject().
-
-
getValue() - Method in class org.iot.dsa.node.DSMap.Entry
-
 
-
getValue(String) - Method in class org.iot.dsa.node.DSNode
-
-
A convenience for (DSIValue) get(name).
-
-
getValueChild() - Method in class org.iot.dsa.node.DSValueNode
-
-
Subclasses must store the node value in a child value and provide the info for that child - here.
-
-
getValueResults() - Method in interface org.iot.dsa.node.action.ActionSpec
-
-
This is only called for the VALUES result type.
-
-
getValueResults() - Method in class org.iot.dsa.node.action.DSAction
-
 
-
getValues() - Method in interface org.iot.dsa.node.action.ActionValues
-
 
-
getValueType() - Method in class org.iot.dsa.node.DSBool
-
 
-
getValueType() - Method in class org.iot.dsa.node.DSBytes
-
 
-
getValueType() - Method in class org.iot.dsa.node.DSDouble
-
 
-
getValueType() - Method in class org.iot.dsa.node.DSElement
-
-
The DSA value type mapping.
-
-
getValueType() - Method in class org.iot.dsa.node.DSFlexEnum
-
 
-
getValueType() - Method in class org.iot.dsa.node.DSFloat
-
 
-
getValueType() - Method in class org.iot.dsa.node.DSInt
-
 
-
getValueType() - Method in interface org.iot.dsa.node.DSIValue
-
-
The DSA type mapping.
-
-
getValueType() - Method in class org.iot.dsa.node.DSJavaEnum
-
 
-
getValueType() - Method in class org.iot.dsa.node.DSList
-
 
-
getValueType() - Method in class org.iot.dsa.node.DSLong
-
 
-
getValueType() - Method in class org.iot.dsa.node.DSMap
-
 
-
getValueType() - Method in class org.iot.dsa.node.DSNull
-
 
-
getValueType() - Method in class org.iot.dsa.node.DSStatus
-
-
String.
-
-
getValueType() - Method in class org.iot.dsa.node.DSString
-
 
-
getValueType() - Method in class org.iot.dsa.node.DSValueNode
-
 
-
getValueType() - Method in class org.iot.dsa.security.DSPasswordAes
-
 
-
getValueType() - Method in class org.iot.dsa.security.DSPasswordSha256
-
 
-
getValueType() - Method in class org.iot.dsa.time.DSDateTime
-
-
String.
-
-
- - - -

H

-
-
hasChildren() - Method in interface org.iot.dsa.dslink.responder.ApiObject
-
-
True if getChildren() can be called.
-
-
hasChildren() - Method in class org.iot.dsa.node.DSInfo
-
 
-
hashCode() - Method in class org.iot.dsa.node.DSBool
-
 
-
hashCode() - Method in class org.iot.dsa.node.DSBytes
-
 
-
hashCode() - Method in class org.iot.dsa.node.DSDouble
-
 
-
hashCode() - Method in class org.iot.dsa.node.DSFlexEnum
-
 
-
hashCode() - Method in class org.iot.dsa.node.DSFloat
-
 
-
hashCode() - Method in class org.iot.dsa.node.DSGroup
-
 
-
hashCode() - Method in class org.iot.dsa.node.DSInfo
-
 
-
hashCode() - Method in class org.iot.dsa.node.DSInt
-
 
-
hashCode() - Method in class org.iot.dsa.node.DSJavaEnum
-
 
-
hashCode() - Method in class org.iot.dsa.node.DSLong
-
 
-
hashCode() - Method in class org.iot.dsa.node.DSMap.Entry
-
 
-
hashCode() - Method in class org.iot.dsa.node.DSMap
-
 
-
hashCode() - Method in class org.iot.dsa.node.DSStatus
-
 
-
hashCode() - Method in class org.iot.dsa.node.DSString
-
 
-
hashCode() - Method in class org.iot.dsa.security.DSPasswordAes
-
 
-
hashCode() - Method in class org.iot.dsa.security.DSPasswordSha256
-
 
-
hashCode() - Method in class org.iot.dsa.time.DSDateTime
-
 
-
hasNext() - Method in class org.iot.dsa.node.DSInfo
-
-
True if there is another info after this one.
-
-
houseKeeping() - Method in class org.iot.dsa.logging.AsyncLogHandler
-
-
Subclass hook for activities such as rolling files and cleaning up old garbage.
-
-
houseKeeping() - Method in class org.iot.dsa.logging.FileLogHandler
-
 
-
- - - -

I

-
-
InboundInvokeRequest - Interface in org.iot.dsa.dslink.responder
-
-
See ActionInvocation for the real meat.
-
-
InboundListRequest - Interface in org.iot.dsa.dslink.responder
-
-
The details about an incoming list request passed to the responder.
-
-
InboundRequest - Interface in org.iot.dsa.dslink.responder
-
-
Common to all incoming requests.
-
-
InboundSetRequest - Interface in org.iot.dsa.dslink.responder
-
 
-
InboundSubscribeRequest - Interface in org.iot.dsa.dslink.responder
-
-
The details about an incoming subscribe request passed to the responder.
-
-
indexOf(DSElement) - Method in class org.iot.dsa.node.DSGroup
-
-
Scans the collection and returns the first index that equal the arg.
-
-
indexOf(String) - Method in class org.iot.dsa.node.DSMap
-
-
Index of the given key, or -1.
-
-
info() - Method in class org.iot.dsa.logging.DSLogger
-
-
True if the level is loggable.
-
-
info(Object) - Method in class org.iot.dsa.logging.DSLogger
-
-
Log an infrequent major lifecycle event.
-
-
info(Object, Throwable) - Method in class org.iot.dsa.logging.DSLogger
-
-
Log an infrequent major lifecycle event.
-
-
INFO_TOPIC - Static variable in class org.iot.dsa.node.DSNode
-
 
-
init(DSLinkConfig) - Method in class org.iot.dsa.dslink.DSLink
-
-
Configures a link instance including creating the appropriate connection.
-
-
initCause(Throwable) - Method in exception org.iot.dsa.util.DSException
-
 
-
insert(int, DSList...) - Method in interface org.iot.dsa.node.action.ActionInvocation
-
-
Only use with open tables, insert the rows at the given index.
-
-
INSTANCE - Static variable in class org.iot.dsa.node.event.DSInfoTopic
-
-
The only instance of this topic.
-
-
INSTANCE - Static variable in class org.iot.dsa.node.event.DSValueTopic
-
-
The only instance of this topic.
-
-
invoke(String, DSMap, OutboundInvokeHandler) - Method in interface org.iot.dsa.dslink.DSIRequester
-
-
Submits an invoke request.
-
-
invoke(DSInfo, ActionInvocation) - Method in class org.iot.dsa.node.action.DSAction
-
-
Calls onInvoke on the proper node.
-
-
isAction() - Method in interface org.iot.dsa.dslink.responder.ApiObject
-
-
True if the object is an action.
-
-
isAction() - Method in class org.iot.dsa.node.DSInfo
-
 
-
isAdmin() - Method in interface org.iot.dsa.dslink.responder.ApiObject
-
-
Whether or not this object requires configuration permission to read/write.
-
-
isAdmin() - Method in class org.iot.dsa.node.DSInfo
-
 
-
isBad() - Method in class org.iot.dsa.node.DSStatus
-
-
If any of the bad flags are set, or is null.
-
-
isBoolean() - Method in class org.iot.dsa.node.DSBool
-
 
-
isBoolean() - Method in class org.iot.dsa.node.DSElement
-
-
Whether or not the object represents a boolean.
-
-
isBytes() - Method in class org.iot.dsa.node.DSBytes
-
 
-
isBytes(String) - Static method in class org.iot.dsa.node.DSBytes
-
-
True if the string starts with the DSA escape sequence for a base 64 encoded string.
-
-
isBytes() - Method in class org.iot.dsa.node.DSElement
-
-
Whether or not the object represents a byte array.
-
-
isCancelled() - Method in class org.iot.dsa.DSRuntime.Timer
-
 
-
isClosed() - Method in enum org.iot.dsa.node.action.ActionSpec.ResultType
-
-
True if CLOSED_TABLE, VOID, or VALUES.
-
-
isConfig() - Method in enum org.iot.dsa.security.DSPermission
-
 
-
isConfigFault() - Method in class org.iot.dsa.node.DSStatus
-
-
True if the associate bit is set.
-
-
isConnected() - Method in class org.iot.dsa.dslink.DSLinkConnection
-
-
True when a connection is established with the remote endpoint.
-
-
isDefaultInstance() - Method in class org.iot.dsa.node.DSNode
-
-
True if this is the default instance for the type.
-
-
isDefaultOnCopy() - Method in class org.iot.dsa.node.DSInfo
-
-
Whether or not the current value, or the default value is copied.
-
-
isDisabled() - Method in class org.iot.dsa.node.DSStatus
-
-
True if the associate bit is set.
-
-
isDouble() - Method in class org.iot.dsa.node.DSDouble
-
 
-
isDouble() - Method in class org.iot.dsa.node.DSElement
-
-
Whether or not the object represents a double.
-
-
isDouble() - Method in class org.iot.dsa.node.DSFloat
-
 
-
isDouble() - Method in class org.iot.dsa.node.DSInt
-
 
-
isDouble() - Method in interface org.iot.dsa.node.DSINumber
-
-
Whether or not the object represents a double.
-
-
isDown() - Method in class org.iot.dsa.node.DSStatus
-
-
True if the associate bit is set.
-
-
isDynamic() - Method in class org.iot.dsa.node.DSInfo
-
-
Whether or not this info represents a declared default.
-
-
isEmpty() - Method in class org.iot.dsa.node.DSGroup
-
-
Returns true when childCount() == 0.
-
-
isEmpty() - Method in class org.iot.dsa.node.DSMetadata
-
 
-
isEqual(Object) - Method in class org.iot.dsa.node.action.DSAction
-
-
Defaults to the equals method.
-
-
isEqual(Object) - Method in class org.iot.dsa.node.DSElement
-
 
-
isEqual(Object) - Method in class org.iot.dsa.node.DSFlexEnum
-
 
-
isEqual(Object) - Method in class org.iot.dsa.node.DSFloat
-
 
-
isEqual(DSInfo) - Method in class org.iot.dsa.node.DSInfo
-
-
True if the flags and target object are equal (not identical if the target is a node).
-
-
isEqual(Object) - Method in class org.iot.dsa.node.DSInt
-
 
-
isEqual(Object) - Method in interface org.iot.dsa.node.DSIObject
-
-
Equals implementation that doesn't require hashCodes to equal, primarily intended - so for comparing nodes.
-
-
isEqual(Object) - Method in class org.iot.dsa.node.DSJavaEnum
-
 
-
isEqual(Object) - Method in class org.iot.dsa.node.DSNode
-
-
True if the argument is a node with the same children, although their order can be - different.
-
-
isEqual(Object) - Method in class org.iot.dsa.node.DSStatus
-
 
-
isEqual(Object) - Method in class org.iot.dsa.node.event.DSTopic
-
-
Only test instance equality.
-
-
isEqual(Object) - Method in class org.iot.dsa.security.DSPasswordAes
-
 
-
isEqual(Object) - Method in class org.iot.dsa.security.DSPasswordSha256
-
 
-
isEqual(Object) - Method in class org.iot.dsa.time.DSDateTime
-
-
Defaults to the equals method.
-
-
isFault() - Method in class org.iot.dsa.node.DSStatus
-
-
True if the associate bit is set.
-
-
isFinished() - Method in class org.iot.dsa.DSRuntime.Timer
-
-
True if cancelled or was a one time execution and that has finished.
-
-
isFixedList(byte) - Static method in class org.iot.dsa.io.msgpack.MsgpackReader
-
 
-
isFixedMap(byte) - Static method in class org.iot.dsa.io.msgpack.MsgpackReader
-
 
-
isFixInt(byte) - Static method in class org.iot.dsa.io.msgpack.MsgpackReader
-
 
-
isFixStr(byte) - Static method in class org.iot.dsa.io.msgpack.MsgpackReader
-
 
-
isFloat() - Method in class org.iot.dsa.node.DSElement
-
-
Whether or not the object represents a float.
-
-
isFloat() - Method in class org.iot.dsa.node.DSFloat
-
 
-
isFloat() - Method in class org.iot.dsa.node.DSInt
-
 
-
isFloat() - Method in interface org.iot.dsa.node.DSINumber
-
-
Whether or not the object represents a double.
-
-
isGood() - Method in class org.iot.dsa.node.DSStatus
-
-
If true, any associate object / value can be trusted.
-
-
isGroup() - Method in class org.iot.dsa.node.DSElement
-
-
Whether or not the object represents a list or map.
-
-
isGroup() - Method in class org.iot.dsa.node.DSGroup
-
 
-
isHidden() - Method in interface org.iot.dsa.dslink.responder.ApiObject
-
-
True if the object should ignored (not be exposed through the api).
-
-
isHidden() - Method in class org.iot.dsa.node.DSInfo
-
-
Whether or not an object is visible to clients.
-
-
isIdentical(DSInfo) - Method in class org.iot.dsa.node.DSInfo
-
-
True if the flags and target object are identical.
-
-
isIdentical(Object) - Method in class org.iot.dsa.node.DSNode
-
-
True if the argument is a node with the same children in the exact same order.
-
-
isInfinite() - Method in class org.iot.dsa.node.DSDouble
-
 
-
isInt() - Method in class org.iot.dsa.node.DSElement
-
-
Whether or not the object represents an int.
-
-
isInt() - Method in class org.iot.dsa.node.DSFloat
-
 
-
isInt() - Method in class org.iot.dsa.node.DSInt
-
 
-
isInt() - Method in interface org.iot.dsa.node.DSINumber
-
-
Whether or not the object represents an int.
-
-
isList() - Method in class org.iot.dsa.node.DSElement
-
-
Whether or not the object represents a list.
-
-
isList() - Method in class org.iot.dsa.node.DSList
-
-
Returns true.
-
-
isList() - Method in enum org.iot.dsa.security.DSPermission
-
 
-
isLong() - Method in class org.iot.dsa.node.DSElement
-
-
Whether or not the object represents a long.
-
-
isLong() - Method in class org.iot.dsa.node.DSFloat
-
 
-
isLong() - Method in class org.iot.dsa.node.DSInt
-
 
-
isLong() - Method in interface org.iot.dsa.node.DSINumber
-
-
Whether or not the object represents a long.
-
-
isLong() - Method in class org.iot.dsa.node.DSLong
-
 
-
isMap() - Method in class org.iot.dsa.node.DSElement
-
-
Whether or not the object represents a amp.
-
-
isMap() - Method in class org.iot.dsa.node.DSMap
-
-
Returns true.
-
-
isNaN() - Method in class org.iot.dsa.node.DSDouble
-
 
-
isNode() - Method in class org.iot.dsa.node.DSInfo
-
-
Whether or not the object is a DSNode.
-
-
isNode(Object) - Static method in class org.iot.dsa.node.DSNode
-
-
Convenience for instanceof DSNode.
-
-
isNull() - Method in class org.iot.dsa.node.action.DSAction
-
-
False
-
-
isNull() - Method in class org.iot.dsa.node.DSBool
-
 
-
isNull() - Method in class org.iot.dsa.node.DSBytes
-
 
-
isNull() - Method in class org.iot.dsa.node.DSDouble
-
 
-
isNull() - Method in class org.iot.dsa.node.DSElement
-
-
Whether or not the object represents null.
-
-
isNull() - Method in class org.iot.dsa.node.DSFlexEnum
-
 
-
isNull() - Method in class org.iot.dsa.node.DSFloat
-
 
-
isNull(int) - Method in class org.iot.dsa.node.DSGroup
-
-
Whether or not the object at the given index is null.
-
-
isNull() - Method in class org.iot.dsa.node.DSInt
-
 
-
isNull() - Method in interface org.iot.dsa.node.DSIObject
-
 
-
isNull() - Method in interface org.iot.dsa.node.DSIValue
-
-
Values should have an instance representing null.
-
-
isNull() - Method in class org.iot.dsa.node.DSJavaEnum
-
 
-
isNull() - Method in class org.iot.dsa.node.DSList
-
-
Returns false.
-
-
isNull() - Method in class org.iot.dsa.node.DSLong
-
 
-
isNull() - Method in class org.iot.dsa.node.DSMap
-
-
Returns false.
-
-
isNull(String) - Method in class org.iot.dsa.node.DSMap
-
-
Returns true if the key isn't in the map, or it's value is null.
-
-
isNull() - Method in class org.iot.dsa.node.DSNode
-
-
Returns false.
-
-
isNull() - Method in class org.iot.dsa.node.DSNull
-
-
True
-
-
isNull() - Method in class org.iot.dsa.node.DSStatus
-
 
-
isNull() - Method in class org.iot.dsa.node.event.DSTopic
-
-
False
-
-
isNull() - Method in class org.iot.dsa.security.DSPasswordAes
-
 
-
isNull() - Method in class org.iot.dsa.security.DSPasswordSha256
-
 
-
isNull() - Method in class org.iot.dsa.time.DSDateTime
-
 
-
isNumber() - Method in class org.iot.dsa.node.DSDouble
-
 
-
isNumber() - Method in class org.iot.dsa.node.DSElement
-
-
Whether or not the object represents a number.
-
-
isNumber() - Method in class org.iot.dsa.node.DSLong
-
 
-
isOk() - Method in class org.iot.dsa.node.DSStatus
-
 
-
isOpen() - Method in interface org.iot.dsa.dslink.responder.InboundListRequest
-
-
Whether or not the list stream is still open.
-
-
isOpen() - Method in interface org.iot.dsa.node.action.ActionInvocation
-
-
Whether or not response is still open.
-
-
isOpen() - Method in enum org.iot.dsa.node.action.ActionSpec.ResultType
-
-
True if OPEN_TABLE or STREAM_TABLE
-
-
isOverride() - Method in class org.iot.dsa.node.DSStatus
-
-
True if the associate bit is set.
-
-
isRead() - Method in enum org.iot.dsa.security.DSPermission
-
 
-
isReadOnly() - Method in interface org.iot.dsa.dslink.responder.ApiObject
-
-
True if the object is a value and cannot be written.
-
-
isReadOnly() - Method in class org.iot.dsa.node.DSInfo
-
-
Whether or not an object can be written by a client.
-
-
isRemoteConfigFault() - Method in class org.iot.dsa.node.DSStatus
-
 
-
isRemoteDisabled() - Method in class org.iot.dsa.node.DSStatus
-
 
-
isRemoteDown() - Method in class org.iot.dsa.node.DSStatus
-
 
-
isRemoteFault() - Method in class org.iot.dsa.node.DSStatus
-
 
-
isRemoteOverride() - Method in class org.iot.dsa.node.DSStatus
-
 
-
isRemoteStale() - Method in class org.iot.dsa.node.DSStatus
-
 
-
isRemoteUnknown() - Method in class org.iot.dsa.node.DSStatus
-
 
-
isRequester() - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Looks for the isRequester config, false by default.
-
-
isResponder() - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Looks for the isResponder config, true by default.
-
-
isRunning() - Method in class org.iot.dsa.DSRuntime.Timer
-
-
True when the runnable is being actually being executed.
-
-
isRunning() - Method in class org.iot.dsa.node.DSNode
-
-
A convenience for !isStopped().
-
-
isStable() - Method in class org.iot.dsa.node.DSNode
-
-
True after stable is called, children are stable before their parents.
-
-
isStale() - Method in class org.iot.dsa.node.DSStatus
-
 
-
isStarted() - Method in class org.iot.dsa.node.DSNode
-
-
True after start is called, children are started before their parents.
-
-
isStopped() - Method in class org.iot.dsa.node.DSNode
-
-
True after stop is called, children are stopped before their parents.
-
-
isStream() - Method in enum org.iot.dsa.node.action.ActionSpec.ResultType
-
-
True if this is the STREAM_TABLE.
-
-
isStreamOpen() - Method in interface org.iot.dsa.dslink.requester.OutboundStream
-
-
Whether or not the request is open.
-
-
isString() - Method in class org.iot.dsa.node.DSElement
-
-
Whether or not the object represents a string.
-
-
isString() - Method in class org.iot.dsa.node.DSString
-
 
-
isSubscribed() - Method in class org.iot.dsa.node.DSNode
-
-
True if there are any subscribers.
-
-
isSubscribed(DSInfo, DSTopic) - Method in class org.iot.dsa.node.DSNode
-
-
True if there are any subscriptions with the matching child and topic.
-
-
isSubscribed(DSTopic) - Method in class org.iot.dsa.node.DSNode
-
-
True if there any subscriptions for the given topic.
-
-
isTransient() - Method in class org.iot.dsa.node.DSInfo
-
-
Whether or not an object is persistent.
-
-
isUnknown() - Method in class org.iot.dsa.node.DSStatus
-
 
-
isValid(DSElement) - Method in interface org.iot.dsa.security.DSIPassword
-
-
Returns true if the give element is valid according to the backing implementation.
-
-
isValid(DSElement) - Method in class org.iot.dsa.security.DSPasswordAes
-
-
Encrypts the string value of the given element and compares against the value stored in this - object.
-
-
isValid(String) - Method in class org.iot.dsa.security.DSPasswordAes
-
-
Encrypts the given string and compares against the value stored in this object.
-
-
isValid(DSElement) - Method in class org.iot.dsa.security.DSPasswordSha256
-
-
Hashes the string value of the given element and compares against the hash stored in this - object.
-
-
isValid(String) - Method in class org.iot.dsa.security.DSPasswordSha256
-
-
Hashes the given string and compares against the value stored in this object.
-
-
isValue() - Method in interface org.iot.dsa.dslink.responder.ApiObject
-
-
True if getValue() can be called.
-
-
isValue() - Method in class org.iot.dsa.node.DSInfo
-
 
-
isValues() - Method in enum org.iot.dsa.node.action.ActionSpec.ResultType
-
 
-
isVoid() - Method in enum org.iot.dsa.node.action.ActionSpec.ResultType
-
 
-
isWrite() - Method in enum org.iot.dsa.security.DSPermission
-
 
-
isZip() - Method in class org.iot.dsa.io.json.JsonAppender
-
-
Whether or not this is zipping the output.
-
-
iterateNodes() - Method in class org.iot.dsa.node.DSNode
-
-
Returns an info iterator of child DSNodes.
-
-
iterateValues() - Method in class org.iot.dsa.node.DSNode
-
-
Returns an info iterator of child DSIValues.
-
-
iterator() - Method in class org.iot.dsa.node.DSList
-
-
Returns an iterator that does not implement remove.
-
-
iterator() - Method in class org.iot.dsa.node.DSNode
-
-
Returns an info iterator of all children.
-
-
- - - -

J

-
-
JsonAppender - Class in org.iot.dsa.io.json
-
-
Json implementation of DSWriter intended for Appendables such as StringBuilders.
-
-
JsonAppender() - Constructor for class org.iot.dsa.io.json.JsonAppender
-
-
Be sure to call one of the setOutput methods.
-
-
JsonAppender(Appendable) - Constructor for class org.iot.dsa.io.json.JsonAppender
-
-
Will write directly to the given appendable.
-
-
JsonAppender(File) - Constructor for class org.iot.dsa.io.json.JsonAppender
-
-
Creates an underlying FileWriter.
-
-
JsonAppender(File, String) - Constructor for class org.iot.dsa.io.json.JsonAppender
-
-
Will create a zip file using the zipFileName as file name inside the zip.
-
-
JsonAppender(OutputStream) - Constructor for class org.iot.dsa.io.json.JsonAppender
-
-
Creates an underlying OutputStreamWriter.
-
-
JsonAppender(OutputStream, String) - Constructor for class org.iot.dsa.io.json.JsonAppender
-
-
Will write a zip file to the given stream.
-
-
JsonConstants - Interface in org.iot.dsa.io.json
-
-
Useful constants.
-
-
JsonReader - Class in org.iot.dsa.io.json
-
-
Json implementation of DSReader.
-
-
JsonReader() - Constructor for class org.iot.dsa.io.json.JsonReader
-
 
-
JsonReader(CharSequence) - Constructor for class org.iot.dsa.io.json.JsonReader
-
 
-
JsonReader(File) - Constructor for class org.iot.dsa.io.json.JsonReader
-
 
-
JsonReader(InputStream, String) - Constructor for class org.iot.dsa.io.json.JsonReader
-
 
-
JsonReader(Reader) - Constructor for class org.iot.dsa.io.json.JsonReader
-
 
-
JsonWriter - Class in org.iot.dsa.io.json
-
-
Json implementation of DSWriter intended for OutputStreams and Writers.
-
-
JsonWriter() - Constructor for class org.iot.dsa.io.json.JsonWriter
-
-
Be sure to call one of the setOutput methods.
-
-
JsonWriter(File) - Constructor for class org.iot.dsa.io.json.JsonWriter
-
-
Creates an underlying FileWriter.
-
-
JsonWriter(File, String) - Constructor for class org.iot.dsa.io.json.JsonWriter
-
-
Will create a zip file using the zipFileName as file name inside the zip.
-
-
JsonWriter(OutputStream) - Constructor for class org.iot.dsa.io.json.JsonWriter
-
-
Creates an underlying OutputStreamWriter.
-
-
JsonWriter(OutputStream, String) - Constructor for class org.iot.dsa.io.json.JsonWriter
-
-
Will write a zip file to the given stream.
-
-
JsonWriter(Writer) - Constructor for class org.iot.dsa.io.json.JsonWriter
-
 
-
- - - -

K

-
-
key(CharSequence) - Method in class org.iot.dsa.io.AbstractWriter
-
 
-
key(CharSequence) - Method in interface org.iot.dsa.io.DSIWriter
-
-
Write a key in the current map.
-
-
keys - Variable in class org.iot.dsa.node.DSMap
-
-
For preserving order.
-
-
- - +
A B C D E F G H I J K L M N O P R S T U V W  + -

L

-
-
last() - Method in class org.iot.dsa.io.AbstractReader
-
 
-
last() - Method in interface org.iot.dsa.io.DSIReader
-
-
The last value returned from next().
-
-
last() - Method in class org.iot.dsa.node.DSGroup
-
-
Returns the item at the highest index.
-
-
lastIndexOf(DSElement) - Method in class org.iot.dsa.node.DSGroup
-
-
Scans the collection and returns the first index that equal the arg.
-
-
lastRun() - Method in class org.iot.dsa.DSRuntime.Timer
-
-
The lastRun run or -1 if it hasn't run yet.
-
-
length() - Method in class org.iot.dsa.io.AbstractWriter
-
-
Returns 0 by default.
-
-
length() - Method in interface org.iot.dsa.io.DSIWriter
-
-
If the writer is buffering output, this returns the size of that buffer.
-
-
length() - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
-
Returns the number of bytes in the outgoing byte buffer.
-
-
length() - Method in class org.iot.dsa.node.DSBytes
-
-
The number of bytes in the array.
-
-
list(String, OutboundListHandler) - Method in interface org.iot.dsa.dslink.DSIRequester
-
-
Submits a list request.
-
-
list - Variable in class org.iot.dsa.node.DSList
-
 
-
load(DSLinkConfig) - Static method in class org.iot.dsa.dslink.DSLink
-
-
Creates a link by first testing for an existing serialized database.
-
-
- - - -

M

-
-
main(String[]) - Static method in class org.iot.dsa.dslink.DSLink
-
-
This is a convenience for DSLink.load(new DSLinkConfig(args)).run() and can be used as the - the main class for any link.
-
-
make(boolean) - Static method in class org.iot.dsa.node.DSElement
-
-
Creates an DSIObject representation of the primitive.
-
-
make(byte[]) - Static method in class org.iot.dsa.node.DSElement
-
-
Creates an DSIObject representation of the primitive.
-
-
make(double) - Static method in class org.iot.dsa.node.DSElement
-
-
Creates an DSIObject representation of the primitive.
-
-
make(int) - Static method in class org.iot.dsa.node.DSElement
-
-
Creates an DSIObject representation of the primitive.
-
-
make(long) - Static method in class org.iot.dsa.node.DSElement
-
-
Creates an DSIObject representation of the primitive.
-
-
make(String) - Static method in class org.iot.dsa.node.DSElement
-
-
Creates an DSIObject representation of the primitive.
-
-
makeBackup() - Method in class org.iot.dsa.logging.FileLogHandler
-
-
Only public for testing, do not call.
-
-
makeMessage(Throwable) - Static method in exception org.iot.dsa.util.DSException
-
-
Attempts come up with the best description of the argument.
-
-
makeNull() - Static method in class org.iot.dsa.node.DSElement
-
-
Creates an DSIObject representation of null.
-
-
makeRuntime(Throwable) - Static method in exception org.iot.dsa.util.DSException
-
-
If the given exception is already a runtime exception, it is cast and returned, - otherwise it will be returned wrapped by an instance of this class.
-
-
map - Variable in class org.iot.dsa.node.DSMap
-
 
-
MAX_VALUE - Static variable in class org.iot.dsa.node.DSMetadata
-
 
-
millis() - Method in enum org.iot.dsa.time.DSInterval
-
-
The approximate number of ms in the interval.
-
-
MILLIS_DAY - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_FIFTEEN_MINUTES - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_FIFTEEN_SECONDS - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_FIVE_MINUTES - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_FIVE_SECONDS - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_FOUR_HOURS - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_HOUR - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_MINUTE - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_MONTH - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_QUARTER - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_SECOND - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_SIX_HOURS - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_TEN_MINUTES - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_TEN_SECONDS - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_THIRTY_MINUTES - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_THIRTY_SECONDS - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_THREE_HOURS - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_TWELVE_HOURS - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_TWENTY_MINUTES - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_TWO_HOURS - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_WEEK - Static variable in class org.iot.dsa.time.DSTime
-
 
-
MILLIS_YEAR - Static variable in class org.iot.dsa.time.DSTime
-
 
-
millisToNanos(long) - Static method in class org.iot.dsa.time.DSTime
-
 
-
MIN_VALUE - Static variable in class org.iot.dsa.node.DSMetadata
-
 
-
MsgpackReader - Class in org.iot.dsa.io.msgpack
-
-
MsgPack implementation of DSReader.
-
-
MsgpackReader() - Constructor for class org.iot.dsa.io.msgpack.MsgpackReader
-
 
-
MsgpackReader(InputStream) - Constructor for class org.iot.dsa.io.msgpack.MsgpackReader
-
 
-
MsgpackWriter - Class in org.iot.dsa.io.msgpack
-
 
-
MsgpackWriter() - Constructor for class org.iot.dsa.io.msgpack.MsgpackWriter
-
 
-
MsgpackWriter(ByteBuffer) - Constructor for class org.iot.dsa.io.msgpack.MsgpackWriter
-
 
-
- - - -

N

-
-
NAME - Static variable in class org.iot.dsa.node.DSMetadata
-
 
-
NANOS_IN_MS - Static variable in class org.iot.dsa.time.DSTime
-
 
-
NANOS_IN_SEC - Static variable in class org.iot.dsa.time.DSTime
-
 
-
nanosToMillis(long) - Static method in class org.iot.dsa.time.DSTime
-
 
-
newKeyPair() - Static method in class org.iot.dsa.security.DSKeys
-
-
Creates a key pair for the predefined elliptic curve secp256r1.
-
-
newSignature() - Static method in class org.iot.dsa.security.DSKeys
-
-
Returns a SHA256withECDSA signature.
-
-
newSigner() - Method in class org.iot.dsa.security.DSKeys
-
-
Creates a signer for this private key.
-
-
newVerifier() - Method in class org.iot.dsa.security.DSKeys
-
-
Creates a verifier for this public key.
-
-
next() - Method in class org.iot.dsa.io.AbstractReader
-
-
Subclasses must override this, read the next item from the stream, then call one of the - setXxx methods.
-
-
next() - Method in interface org.iot.dsa.io.DSIReader
-
-
Advances the reader to the next item and returns the token representing it's current state.
-
-
next() - Method in class org.iot.dsa.io.json.JsonReader
-
 
-
next() - Method in class org.iot.dsa.io.msgpack.MsgpackReader
-
 
-
next() - Method in class org.iot.dsa.node.DSInfo
-
-
The next info in the parent node.
-
-
next(long) - Method in enum org.iot.dsa.time.DSInterval
-
-
Returns the nextRun interval for the previously aligned timestamp.
-
-
nextAction() - Method in class org.iot.dsa.node.DSInfo
-
-
The next DSInfo in the parent that is an action, or null.
-
-
nextNode() - Method in class org.iot.dsa.node.DSInfo
-
-
The next DSInfo in the parent that is a node, or null.
-
-
nextRun() - Method in class org.iot.dsa.DSRuntime.Timer
-
-
The next scheduled time to run.
-
-
nextValue() - Method in class org.iot.dsa.node.DSInfo
-
-
The next DSInfo in the parent that is a value, or null.
-
-
NodeDecoder - Class in org.iot.dsa.io
-
-
Decodes a node (tree) that was encoded with NodeEncoder.
-
-
NodeEncoder - Class in org.iot.dsa.io
-
-
Encodes a node tree using a compact JSON schema.
-
-
NULL - Static variable in class org.iot.dsa.node.DSBool
-
 
-
NULL - Static variable in class org.iot.dsa.node.DSBytes
-
 
-
NULL - Static variable in class org.iot.dsa.node.DSDouble
-
 
-
NULL - Static variable in class org.iot.dsa.node.DSFlexEnum
-
 
-
NULL - Static variable in class org.iot.dsa.node.DSFloat
-
 
-
NULL - Static variable in class org.iot.dsa.node.DSInt
-
 
-
NULL - Static variable in class org.iot.dsa.node.DSJavaEnum
-
 
-
NULL - Static variable in class org.iot.dsa.node.DSLong
-
 
-
NULL - Static variable in class org.iot.dsa.node.DSNull
-
 
-
NULL - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
NULL - Static variable in class org.iot.dsa.node.DSString
-
 
-
NULL - Static variable in class org.iot.dsa.security.DSPasswordAes
-
 
-
NULL - Static variable in class org.iot.dsa.security.DSPasswordSha256
-
 
-
NULL - Static variable in class org.iot.dsa.time.DSDateTime
-
 
-
- - - -

O

-
-
OK - Static variable in class org.iot.dsa.node.DSStatus
-
-
Good, no other status applies.
-
-
ok - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
OK_OVERRIDE - Static variable in class org.iot.dsa.node.DSStatus
-
-
Good, the value is overridden within DSA.
-
-
OK_OVERRIDE_STR - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
OK_REMOTE_OVERRIDE - Static variable in class org.iot.dsa.node.DSStatus
-
-
Good, the value is overridden outside of DSA.
-
-
OK_REMOTE_OVERRIDE_STR - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
OK_STR - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
okOverride - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
okRemoteOverride - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
onChildAdded(DSInfo) - Method in class org.iot.dsa.node.DSNode
-
-
Called when the given child is added and in the stable state.
-
-
onChildChanged(DSInfo) - Method in class org.iot.dsa.node.DSNode
-
-
Called when the given child is changed and in the stable state.
-
-
onChildChanged(DSInfo) - Method in class org.iot.dsa.node.DSValueNode
-
-
This fires the NODE_CHANGED topic when the value child changes.
-
-
onChildRemoved(DSInfo) - Method in class org.iot.dsa.node.DSNode
-
-
Called when the given child is removed and in the stable state.
-
-
onClose() - Method in interface org.iot.dsa.dslink.requester.OutboundRequestHandler
-
-
Callback for when the request stream is closed, no matter how or by who.
-
-
onClose() - Method in class org.iot.dsa.dslink.requester.SimpleRequestHandler
-
-
Does nothing by default.
-
-
onClose() - Method in interface org.iot.dsa.dslink.responder.OutboundListResponse
-
-
Will be called no matter how the stream is closed.
-
-
onClose(Integer) - Method in interface org.iot.dsa.dslink.responder.SubscriptionCloseHandler
-
-
Will be called no matter how the subscription is terminated.
-
-
onClose() - Method in interface org.iot.dsa.node.action.ActionResult
-
-
Always called, whether or not the result is a stream, and no matter who closes it.
-
-
onColumns(DSList) - Method in interface org.iot.dsa.dslink.requester.OutboundInvokeHandler
-
-
Called whenever columns are received.
-
-
onComplete() - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
-
Callback, for when the top level container is finished.
-
-
onConnect(DSLinkConnection) - Method in interface org.iot.dsa.dslink.DSLinkConnection.Listener
-
-
Called asynchronously after the connection with the endpoint is opened.
-
-
onConnect() - Method in class org.iot.dsa.dslink.DSLinkConnection
-
-
Called after onInitialize and before onRun.
-
-
onDisconnect(DSLinkConnection) - Method in interface org.iot.dsa.dslink.DSLinkConnection.Listener
-
-
Called synchronously after the connection with the endpoint is closed.
-
-
onDisconnect() - Method in class org.iot.dsa.dslink.DSLinkConnection
-
-
Called when this network connection has been closed.
-
-
onError(String, String, String) - Method in interface org.iot.dsa.dslink.requester.OutboundRequestHandler
-
-
Callback for when an error is received.
-
-
onError(String, String, String) - Method in class org.iot.dsa.dslink.requester.SimpleRequestHandler
-
-
Does nothing by default.
-
-
onEvent(DSTopic, DSIEvent, DSNode, DSInfo, Object...) - Method in interface org.iot.dsa.node.event.DSISubscriber
-
-
Subscription callback.
-
-
onInfoChanged(DSInfo) - Method in class org.iot.dsa.node.DSNode
-
-
Called when the given info is modified and in the stable state.
-
-
onInit(String, DSMap, OutboundStream) - Method in class org.iot.dsa.dslink.requester.AbstractInvokeHandler
-
-
Sets the fields so they can be access via the corresponding getters.
-
-
onInit(String, OutboundStream) - Method in class org.iot.dsa.dslink.requester.AbstractListHandler
-
-
Sets the fields so they can be accessed with the corresponding getters.
-
-
onInit(String, int, OutboundStream) - Method in class org.iot.dsa.dslink.requester.AbstractSubscribeHandler
-
-
Sets the fields so they can be accessed via the corresponding getters.
-
-
onInit(String, DSMap, OutboundStream) - Method in interface org.iot.dsa.dslink.requester.OutboundInvokeHandler
-
-
Called by the requester before returning from the invoke method.
-
-
onInit(String, OutboundStream) - Method in interface org.iot.dsa.dslink.requester.OutboundListHandler
-
-
Called by the requester before returning from the list method.
-
-
onInit(String, int, OutboundStream) - Method in interface org.iot.dsa.dslink.requester.OutboundSubscribeHandler
-
-
Called by the requester before returning from the subscribe method.
-
-
onInitialize() - Method in class org.iot.dsa.dslink.DSLinkConnection
-
-
Always called before onConnect.
-
-
onInitialized() - Method in interface org.iot.dsa.dslink.requester.OutboundListHandler
-
-
Called once the initial state of the target has been transmitted.
-
-
onInsert(int, DSList) - Method in interface org.iot.dsa.dslink.requester.OutboundInvokeHandler
-
-
Called when the given rows should be inserted at the given index.
-
-
onInvoke(InboundInvokeRequest) - Method in interface org.iot.dsa.dslink.DSIResponder
-
-
The implementation should quickly create an object for responding to the request, but do no - processing of it on the calling thread.
-
-
onInvoke(DSInfo, ActionInvocation) - Method in class org.iot.dsa.dslink.DSLink
-
-
Handles the save action.
-
-
onInvoke(DSInfo, ActionInvocation) - Method in class org.iot.dsa.node.DSNode
-
-
Override point, called by the default implementation of DSAction.invoke.
-
-
onList(InboundListRequest) - Method in interface org.iot.dsa.dslink.DSIResponder
-
-
The implementation should quickly create an object for responding to the request, but do no - processing of it on the calling thread.
-
-
onMode(OutboundInvokeHandler.Mode) - Method in interface org.iot.dsa.dslink.requester.OutboundInvokeHandler
-
-
Called whenever a mode is received.
-
-
onRemove(String) - Method in interface org.iot.dsa.dslink.requester.OutboundListHandler
-
-
Only called after onOpen(), indicates something about the target of the request has been - removed.
-
-
onReplace(int, int, DSList) - Method in interface org.iot.dsa.dslink.requester.OutboundInvokeHandler
-
-
The rows starting and ending with the given indexes should be removed and the given rows - inserted at the start index.
-
-
onRun() - Method in class org.iot.dsa.dslink.DSLinkConnection
-
-
The long term management of the connection (reading and writing).
-
-
onSet(InboundSetRequest) - Method in interface org.iot.dsa.dslink.DSIResponder
-
-
The implementation should do no processing of it on the calling thread.
-
-
onSet(DSInfo, DSIValue) - Method in class org.iot.dsa.node.DSNode
-
-
Override point, called when a value being set.
-
-
onSet(DSIValue) - Method in class org.iot.dsa.node.DSNode
-
-
Override point, called only when a DSNode subclass implements DSIValue is being set.
-
-
onSet(DSIValue) - Method in class org.iot.dsa.node.DSValueNode
-
 
-
onStable() - Method in class org.iot.dsa.dslink.DSLinkConnection
-
-
Starts the connection.
-
-
onStable() - Method in class org.iot.dsa.node.DSNode
-
-
Called once this node is stable, but before stable is called on children.
-
-
onStarted() - Method in class org.iot.dsa.node.DSNode
-
-
Called once this node and its entire subtree is started.
-
-
onStopped() - Method in class org.iot.dsa.dslink.DSLink
-
 
-
onStopped() - Method in class org.iot.dsa.node.DSNode
-
-
Called once this node and its entire subtree is stopped.
-
-
onSubscribe(InboundSubscribeRequest) - Method in interface org.iot.dsa.dslink.DSIResponder
-
-
The implementation should quickly create an object for responding to the request, but do no - processing of it on the calling thread.
-
-
onSubscribe(DSTopic, DSInfo, DSISubscriber) - Method in class org.iot.dsa.node.DSNode
-
-
Called for every subscription.
-
-
onSubscribed() - Method in class org.iot.dsa.node.DSNode
-
-
Called when this node transitions from having no subscriptions to having a subscription of - any kind.
-
-
onSubscribed(DSTopic, DSInfo) - Method in class org.iot.dsa.node.DSNode
-
-
Called when the child and topic pair transitions from having no subscriptions to have a - subscription.
-
-
onTableMeta(DSMap) - Method in interface org.iot.dsa.dslink.requester.OutboundInvokeHandler
-
-
Called whenever metadata for the entire table is received.
-
-
onUnsubscribe(DSTopic, DSInfo, DSISubscriber) - Method in class org.iot.dsa.node.DSNode
-
-
Called for every unsubscribe.
-
-
onUnsubscribed() - Method in class org.iot.dsa.node.DSNode
-
-
Called when this node transitions to having no subscriptions of any kind.
-
-
onUnsubscribed(DSTopic, DSInfo) - Method in class org.iot.dsa.node.DSNode
-
-
Called when the child and topic pair transitions to having no subscriptions.
-
-
onUnsubscribed(DSTopic, DSNode, DSInfo) - Method in interface org.iot.dsa.node.event.DSISubscriber
-
-
Called no matter how the unsubscribe happens, whether explicitly or if the node - unsubscribes itself.
-
-
onUpdate(DSList) - Method in interface org.iot.dsa.dslink.requester.OutboundInvokeHandler
-
-
Called for every row.
-
-
onUpdate(String, DSElement) - Method in interface org.iot.dsa.dslink.requester.OutboundListHandler
-
-
Called to provide a value for node metadata, attribute or child.
-
-
onUpdate(DSDateTime, DSElement, DSStatus) - Method in interface org.iot.dsa.dslink.requester.OutboundSubscribeHandler
-
-
Subscription update mechanism.
-
-
org.iot.dsa - package org.iot.dsa
-
-
Use the DSRuntime thread pool and timers.
-
-
org.iot.dsa.dslink - package org.iot.dsa.dslink
-
-
DSLink is the main entry point for an application.
-
-
org.iot.dsa.dslink.requester - package org.iot.dsa.dslink.requester
-
-
API for implementing requesters without having to modeling everything in the node tree.
-
-
org.iot.dsa.dslink.responder - package org.iot.dsa.dslink.responder
-
-
API for implementing responders without having modeling everything in the node tree.
-
-
org.iot.dsa.io - package org.iot.dsa.io
-
-
Node serialization and streaming abstraction for JSON and MsgPack.
-
-
org.iot.dsa.io.json - package org.iot.dsa.io.json
-
 
-
org.iot.dsa.io.msgpack - package org.iot.dsa.io.msgpack
-
 
-
org.iot.dsa.logging - package org.iot.dsa.logging
-
-
Async handler for Java Util Logging that also manages log backups.
-
-
org.iot.dsa.node - package org.iot.dsa.node
-
-
Persistent data model used to build the node tree of a link.
-
-
org.iot.dsa.node.action - package org.iot.dsa.node.action
-
 
-
org.iot.dsa.node.event - package org.iot.dsa.node.event
-
 
-
org.iot.dsa.security - package org.iot.dsa.security
-
 
-
org.iot.dsa.time - package org.iot.dsa.time
-
 
-
org.iot.dsa.util - package org.iot.dsa.util
-
 
-
OutboundInvokeHandler - Interface in org.iot.dsa.dslink.requester
-
-
Callback mechanism passed to the invoke method on DSIRequester.
-
-
OutboundInvokeHandler.Mode - Enum in org.iot.dsa.dslink.requester
-
 
-
OutboundListHandler - Interface in org.iot.dsa.dslink.requester
-
-
Callback mechanism passed to the list method on DSIRequester.
-
-
OutboundListResponse - Interface in org.iot.dsa.dslink.responder
-
-
The responder is responsible for returning this upon notification of a list request.
-
-
OutboundRequestHandler - Interface in org.iot.dsa.dslink.requester
-
-
Callbacks common to all outbound requests.
-
-
OutboundStream - Interface in org.iot.dsa.dslink.requester
-
-
Mechanism for the requester to close outbound requests.
-
-
OutboundSubscribeHandler - Interface in org.iot.dsa.dslink.requester
-
-
Callback mechanism passed to the subscribe method in the requester.
-
-
- - - -

P

-
-
parse(String[]) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Parses command line args to set the internal state of this object.
-
-
PLACEHOLDER - Static variable in class org.iot.dsa.node.DSMetadata
-
 
-
prepareParameter(DSInfo, DSMap) - Method in class org.iot.dsa.node.action.DSAction
-
-
Override point, called for each parameter as it is being sent to the requester.
-
-
prettyPrint - Variable in class org.iot.dsa.io.AbstractWriter
-
-
Subclasses can use this if applicable.
-
-
printStackTrace() - Method in exception org.iot.dsa.util.DSException
-
 
-
printStackTrace(PrintStream) - Method in exception org.iot.dsa.util.DSException
-
 
-
printStackTrace(PrintWriter) - Method in exception org.iot.dsa.util.DSException
-
 
-
PrintStreamLogHandler - Class in org.iot.dsa.logging
-
-
Async logging handler for writing to streams such as System.out.
-
-
PrintStreamLogHandler(String, PrintStream) - Constructor for class org.iot.dsa.logging.PrintStreamLogHandler
-
 
-
publish(LogRecord) - Method in class org.iot.dsa.logging.AsyncLogHandler
-
-
Enqueues the record for the write thread.
-
-
put(int, DSElement) - Method in class org.iot.dsa.node.DSList
-
-
Replaces a value and returns this.
-
-
put(int, boolean) - Method in class org.iot.dsa.node.DSList
-
-
Primitive setter, returns this.
-
-
put(int, double) - Method in class org.iot.dsa.node.DSList
-
-
Primitive setter, returns this.
-
-
put(int, int) - Method in class org.iot.dsa.node.DSList
-
-
Primitive setter, returns this.
-
-
put(int, long) - Method in class org.iot.dsa.node.DSList
-
-
Primitive setter, returns this.
-
-
put(int, String) - Method in class org.iot.dsa.node.DSList
-
-
Primitive setter, returns this.
-
-
put(String, DSElement) - Method in class org.iot.dsa.node.DSMap
-
-
Adds or replaces the value for the given key and returns this.
-
-
put(String, boolean) - Method in class org.iot.dsa.node.DSMap
-
-
Primitive setter, returns this.
-
-
put(String, double) - Method in class org.iot.dsa.node.DSMap
-
-
Primitive setter, returns this.
-
-
put(String, int) - Method in class org.iot.dsa.node.DSMap
-
-
Primitive setter, returns this.
-
-
put(String, long) - Method in class org.iot.dsa.node.DSMap
-
-
Primitive setter, returns this.
-
-
put(String, String) - Method in class org.iot.dsa.node.DSMap
-
-
Primitive setter, returns this.
-
-
put(String, Throwable) - Method in class org.iot.dsa.node.DSMap
-
-
Puts a String representing the stack trace into the map.
-
-
put(String, DSIObject) - Method in class org.iot.dsa.node.DSNode
-
-
Adds or replaces the named child.
-
-
put(String, boolean) - Method in class org.iot.dsa.node.DSNode
-
-
A convenience for put(String, DSIObject)
-
-
put(String, double) - Method in class org.iot.dsa.node.DSNode
-
-
A convenience for put(String, DSIObject)
-
-
put(String, float) - Method in class org.iot.dsa.node.DSNode
-
-
A convenience for put(String, DSIObject)
-
-
put(String, int) - Method in class org.iot.dsa.node.DSNode
-
-
A convenience for put(String, DSIObject)
-
-
put(String, long) - Method in class org.iot.dsa.node.DSNode
-
-
A convenience for put(String, DSIObject)
-
-
put(String, String) - Method in class org.iot.dsa.node.DSNode
-
-
A convenience for put(String, DSIObject)
-
-
put(DSInfo, DSIObject) - Method in class org.iot.dsa.node.DSNode
-
-
Replaces the child.
-
-
putAll(DSMap) - Method in class org.iot.dsa.node.DSMap
-
-
Adds / overwrites entries in this map with those from the given.
-
-
putList(String) - Method in class org.iot.dsa.node.DSMap
-
-
Puts a new list for given key and returns it.
-
-
putMap(String) - Method in class org.iot.dsa.node.DSMap
-
-
Puts a new map for given key and returns it.
-
-
putNull(String) - Method in class org.iot.dsa.node.DSMap
-
-
Puts a null value for given key and returns this.
-
-
- - - -

R

-
-
readDouble(byte[], int, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Reads the primitive from a byte array.
-
-
readDouble(InputStream, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Reads the primitive from a stream.
-
-
readFloat(byte[], int, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Reads the primitive from a byte array.
-
-
readFloat(InputStream, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Reads the primitive a stream
-
-
readInt(byte[], int, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Reads the primitive from a byte array.
-
-
readInt(InputStream, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Reads the primitive from a stream.
-
-
readLong(byte[], int, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Reads the primitive from a byte array.
-
-
readLong(InputStream, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Reads the primitive from a stream.
-
-
readShort(byte[], int, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Reads the primitive from a byte array.
-
-
readShort(InputStream, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Reads the primitive from a stream.
-
-
recycle(Calendar) - Static method in class org.iot.dsa.time.DSTime
-
-
Return a calendar instance for reuse.
-
-
registerDecoder(Class, DSIValue) - Static method in class org.iot.dsa.node.DSRegistry
-
-
DSIValues must provide an instance for decoding.
-
-
REMOTE_CONFIG_FAULT - Static variable in class org.iot.dsa.node.DSStatus
-
-
Bad, a configuration error is being reported by the foreign system.
-
-
REMOTE_CONFIG_FAULT_STR - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
REMOTE_DISABLED - Static variable in class org.iot.dsa.node.DSStatus
-
-
Bad, the foreign system is reporting the object is disabled.
-
-
REMOTE_DISABLED_STR - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
REMOTE_DOWN - Static variable in class org.iot.dsa.node.DSStatus
-
-
Bad, down communications are being reported by the foreign system.
-
-
REMOTE_DOWN_STR - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
REMOTE_FAULT - Static variable in class org.iot.dsa.node.DSStatus
-
-
Bad, an operational error is being reported by the foreign system.
-
-
REMOTE_FAULT_STR - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
REMOTE_STALE - Static variable in class org.iot.dsa.node.DSStatus
-
-
Bad, a stale value is being reported by the foreign system.
-
-
REMOTE_STALE_STR - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
REMOTE_UNKNOWN - Static variable in class org.iot.dsa.node.DSStatus
-
-
Bad, the foreign system is reporting the status is unknown.
-
-
REMOTE_UNKNOWN_STR - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
remoteConfigFault - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
remoteDisabled - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
remoteDown - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
remoteFault - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
remoteStale - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
remoteUnknown - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
remove(String, OutboundRequestHandler) - Method in interface org.iot.dsa.dslink.DSIRequester
-
-
Submits request to remove an attribute.
-
-
remove(int) - Method in class org.iot.dsa.node.DSGroup
-
-
Removes the value at the given index and returns it.
-
-
remove(int) - Method in class org.iot.dsa.node.DSList
-
 
-
remove(int) - Method in class org.iot.dsa.node.DSMap
-
 
-
remove(String) - Method in class org.iot.dsa.node.DSMap
-
-
Removes the key-value pair and returns the removed value.
-
-
remove(DSInfo) - Method in class org.iot.dsa.node.DSNode
-
-
Removes the child.
-
-
remove(String) - Method in class org.iot.dsa.node.DSNode
-
-
Remove the named child if it is contained.
-
-
removeFirst() - Method in class org.iot.dsa.node.DSGroup
-
-
Remove and return the item at index 0.
-
-
removeLast() - Method in class org.iot.dsa.node.DSGroup
-
-
Remove and return the item at the highest index.
-
-
removeListener(DSLinkConnection.Listener) - Method in class org.iot.dsa.dslink.DSLinkConnection
-
-
Removes a listener for connection events.
-
-
replace(int, int, DSList...) - Method in interface org.iot.dsa.node.action.ActionInvocation
-
-
Only use with open tables, deletes len rows starting at the given index, then inserts the - given rows in their place.
-
-
reset() - Method in class org.iot.dsa.io.AbstractReader
-
 
-
reset() - Method in class org.iot.dsa.io.AbstractWriter
-
 
-
reset() - Method in interface org.iot.dsa.io.DSIReader
-
-
Sets last() == ROOT.
-
-
reset() - Method in interface org.iot.dsa.io.DSIWriter
-
-
Clears the state of the writer.
-
-
reset() - Method in class org.iot.dsa.io.json.JsonAppender
-
 
-
reset() - Method in class org.iot.dsa.io.json.JsonReader
-
 
-
reset() - Method in class org.iot.dsa.io.json.JsonWriter
-
 
-
reset() - Method in class org.iot.dsa.io.msgpack.MsgpackReader
-
 
-
reset() - Method in class org.iot.dsa.security.DSKeys.Signer
-
-
Call to begin a new signature.
-
-
reset() - Method in class org.iot.dsa.security.DSKeys.Verifier
-
-
Call to begin a new signature.
-
-
restore(DSElement) - Method in class org.iot.dsa.node.DSFlexEnum
-
 
-
restore(DSElement) - Method in interface org.iot.dsa.node.DSIStorable
-
-
Deserialize a value from the configuration database, these will be values returned from the - store() method.
-
-
restore(DSElement) - Method in class org.iot.dsa.node.DSJavaEnum
-
 
-
restore(DSElement) - Method in class org.iot.dsa.node.DSStatus
-
 
-
restore(File) - Static method in class org.iot.dsa.security.DSKeys
-
-
Decodes a key pair that was encoded by the store method.
-
-
restore(InputStream) - Static method in class org.iot.dsa.security.DSKeys
-
-
Decodes a key pair that was encoded by the store method, does not onClose the given stream.
-
-
restore(DSElement) - Method in class org.iot.dsa.security.DSPasswordAes
-
 
-
restore(DSElement) - Method in class org.iot.dsa.security.DSPasswordSha256
-
 
-
run() - Method in class org.iot.dsa.dslink.DSLink
-
-
Calls starts, waits the stableDelay, then calls stable.
-
-
run(Runnable) - Static method in class org.iot.dsa.DSRuntime
-
-
Run as soon as possible on the application's thread pool and run only once.
-
-
run(Runnable, long, long) - Static method in class org.iot.dsa.DSRuntime
-
-
Run periodically starting at the given time and repeat at the given millisecond interval.
-
-
run() - Method in class org.iot.dsa.DSRuntime.Timer
-
-
Do not call.
-
-
runAt(Runnable, long) - Static method in class org.iot.dsa.DSRuntime
-
-
Run once at the given time.
-
-
runCount() - Method in class org.iot.dsa.DSRuntime.Timer
-
-
The number of completed runs.
-
-
runDelayed(Runnable, long) - Static method in class org.iot.dsa.DSRuntime
-
-
Run once after the given delay.
-
-
- - - -

S

-
-
save() - Method in class org.iot.dsa.dslink.DSLink
-
-
Serializes the configuration database.
-
-
send(DSList) - Method in interface org.iot.dsa.node.action.ActionInvocation
-
-
Only use with stream and open tables.
-
-
set(String, DSIValue, OutboundRequestHandler) - Method in interface org.iot.dsa.dslink.DSIRequester
-
-
Submits a set request.
-
-
set(String, DSElement) - Method in class org.iot.dsa.node.DSMetadata
-
-
Set arbitrary keys.
-
-
setAdmin(boolean) - Method in class org.iot.dsa.node.DSInfo
-
 
-
setBackupThreshold(int) - Method in class org.iot.dsa.logging.FileLogHandler
-
-
The file size threshold after which a logging file will be backed up and cleared.
-
-
setBeginList() - Method in class org.iot.dsa.io.AbstractReader
-
 
-
setBeginMap() - Method in class org.iot.dsa.io.AbstractReader
-
 
-
setBit(int, int, boolean) - Static method in class org.iot.dsa.util.DSUtil
-
-
Set or unset a bit at the given index.
-
-
setBooleanRange(DSList) - Method in class org.iot.dsa.node.DSMetadata
-
-
The list must be size 2 and the entries must not be null.
-
-
setBooleanRange(String, String) - Method in class org.iot.dsa.node.DSMetadata
-
-
The parameters can be null, which will result in the default text (false/true).
-
-
setBrokerUri(String) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
 
-
setConfig(String, boolean) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Modifies the in-memory representation of dslink.json, but it will not be saved back to disk.
-
-
setConfig(String, double) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Modifies the in-memory representation of dslink.json, but it will not be saved back to disk.
-
-
setConfig(String, int) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Modifies the in-memory representation of dslink.json, but it will not be saved back to disk.
-
-
setConfig(String, long) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Modifies the in-memory representation of dslink.json, but it will not be saved back to disk.
-
-
setConfig(String, String) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Modifies the in-memory representation of dslink.json, but it will not be saved back to disk.
-
-
setDecimalPlaces(DSLong) - Method in class org.iot.dsa.node.DSMetadata
-
 
-
setDefault(DSIValue) - Method in class org.iot.dsa.node.DSMetadata
-
-
Sets the default value only, does not set type information.
-
-
setDefaultLevel(Level) - Static method in class org.iot.dsa.logging.DSLogging
-
 
-
setDescription(String) - Method in class org.iot.dsa.node.DSMetadata
-
 
-
setDetail(String) - Method in exception org.iot.dsa.dslink.DSRequestException
-
-
Overrides the default detail which is the stack trace of this exception.
-
-
setDetail(Throwable) - Method in exception org.iot.dsa.dslink.DSRequestException
-
-
Overrides the default detail which is the stack trace of this exception.
-
-
setDisplayName(String) - Method in class org.iot.dsa.node.DSMetadata
-
 
-
setDslinkJson(DSMap) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Directly set the map without using file io.
-
-
setDslinkJson(File) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Sets the link map by file path.
-
-
setEditor(String) - Method in class org.iot.dsa.node.DSMetadata
-
-
See the EDITOR_ constants.
-
-
setEndInput() - Method in class org.iot.dsa.io.AbstractReader
-
 
-
setEndList() - Method in class org.iot.dsa.io.AbstractReader
-
 
-
setEndMap() - Method in class org.iot.dsa.io.AbstractReader
-
 
-
setEnumRange(DSList) - Method in class org.iot.dsa.node.DSMetadata
-
-
List of string values for an enum or string.
-
-
setEnumRange(String...) - Method in class org.iot.dsa.node.DSMetadata
-
-
List of string values for an enum or string.
-
-
setHidden(boolean) - Method in class org.iot.dsa.node.DSInfo
-
 
-
setInput(CharSequence) - Method in class org.iot.dsa.io.json.JsonReader
-
-
Sets the input source, resets to ROOT, and returns this.
-
-
setInput(File) - Method in class org.iot.dsa.io.json.JsonReader
-
-
Sets the input source, resets to ROOT, and returns this.
-
-
setInput(InputStream, String) - Method in class org.iot.dsa.io.json.JsonReader
-
-
Sets the input source, resets to ROOT, and returns this.
-
-
setInput(Reader) - Method in class org.iot.dsa.io.json.JsonReader
-
-
Sets the input source, resets to ROOT, and returns this.
-
-
setInput(InputStream) - Method in class org.iot.dsa.io.msgpack.MsgpackReader
-
-
Sets the input source, resets to ROOT, and returns this.
-
-
setKeys(DSKeys) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Directly set the keys without using file io.
-
-
setKeys(File) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Sets the link keys by file path.
-
-
setLinkName(String) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Overrides dslink.json.
-
-
setLogFile(File) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Overrides dslink.json.
-
-
setLogLevel(String) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Should be one of the following (case insensitive): all, finest, finer, fine, config, info, - warning, severe, off.
-
-
setLogLevel(Level) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Overrides dslink.json.
-
-
setMainType(Class) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
The type of the root node.
-
-
setMap(DSMap) - Method in class org.iot.dsa.node.DSMetadata
-
-
Change the underlying map so the metadata instance can be reused.
-
-
setMaxBackups(int) - Method in class org.iot.dsa.logging.FileLogHandler
-
-
The default is 10.
-
-
setMaxQueueSize(int) - Method in class org.iot.dsa.logging.AsyncLogHandler
-
 
-
setMaxValue(DSElement) - Method in class org.iot.dsa.node.DSMetadata
-
-
The arg should be a number.
-
-
setMinValue(DSElement) - Method in class org.iot.dsa.node.DSMetadata
-
-
The arg should be a number.
-
-
setName(String) - Method in class org.iot.dsa.node.DSMetadata
-
 
-
setNextValue(boolean) - Method in class org.iot.dsa.io.AbstractReader
-
 
-
setNextValue(byte[]) - Method in class org.iot.dsa.io.AbstractReader
-
 
-
setNextValue(double) - Method in class org.iot.dsa.io.AbstractReader
-
 
-
setNextValue(long) - Method in class org.iot.dsa.io.AbstractReader
-
 
-
setNextValue(String) - Method in class org.iot.dsa.io.AbstractReader
-
 
-
setNextValueNull() - Method in class org.iot.dsa.io.AbstractReader
-
 
-
setNodes(DSMainNode) - Method in class org.iot.dsa.dslink.DSLink
-
 
-
setNodesFile(File) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Overrides dslink.json.
-
-
setOut(PrintStream) - Method in class org.iot.dsa.logging.AsyncLogHandler
-
-
Sets the sink for formatted messages.
-
-
setOutput(Appendable) - Method in class org.iot.dsa.io.json.JsonAppender
-
-
Sets the sink, resets the state and returns this.
-
-
setOutput(File) - Method in class org.iot.dsa.io.json.JsonAppender
-
-
Sets the sink, resets the state and returns this.
-
-
setOutput(File, String) - Method in class org.iot.dsa.io.json.JsonAppender
-
-
Will create a zip file using the zipFileName as file name inside the zip.
-
-
setOutput(OutputStream) - Method in class org.iot.dsa.io.json.JsonAppender
-
-
Sets the sink, resets the state and returns this.
-
-
setOutput(OutputStream, String) - Method in class org.iot.dsa.io.json.JsonAppender
-
-
Will write a zip file to the given stream.
-
-
setOutput(File) - Method in class org.iot.dsa.io.json.JsonWriter
-
-
Sets the sink, resets the state and returns this.
-
-
setOutput(File, String) - Method in class org.iot.dsa.io.json.JsonWriter
-
-
Will create a zip file using the zipFileName as file name inside the zip.
-
-
setOutput(OutputStream) - Method in class org.iot.dsa.io.json.JsonWriter
-
-
Sets the sink, resets the state and returns this.
-
-
setOutput(OutputStream, String) - Method in class org.iot.dsa.io.json.JsonWriter
-
-
Will write a zip file to the given stream.
-
-
setOutput(Writer) - Method in class org.iot.dsa.io.json.JsonWriter
-
-
Sets the sink, resets the state and returns this.
-
-
setPermission(DSPermission) - Method in class org.iot.dsa.node.action.DSAction
-
-
Returns this, it is not necessary to set the permission to read.
-
-
setPlaceHolder(String) - Method in class org.iot.dsa.node.DSMetadata
-
-
Place holder text for text fields.
-
-
setPrettyPrint(boolean) - Method in class org.iot.dsa.io.json.AbstractJsonWriter
-
 
-
setReadOnly(boolean) - Method in class org.iot.dsa.node.DSInfo
-
 
-
setRequester(boolean) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Overrides dslink.json.
-
-
setResponder(boolean) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Overrides dslink.json.
-
-
setResultType(ActionSpec.ResultType) - Method in class org.iot.dsa.node.action.DSAction
-
-
Returns this, it is not necessary to set the result to void.
-
-
setSaveEnabled(boolean) - Method in class org.iot.dsa.dslink.DSLink
-
-
This is a transient option intended for unit tests.
-
-
setSkipMissedIntervals(boolean) - Method in class org.iot.dsa.DSRuntime.Timer
-
-
The default is true, set this to false if all intervals should be run, even if they run - later than scheduled.
-
-
setToken(String) - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Overrides dslink.json.
-
-
setTransient(boolean) - Method in class org.iot.dsa.node.DSInfo
-
 
-
setType(DSIValue) - Method in class org.iot.dsa.node.DSMetadata
-
-
Sets the type and if the given is an enum, sets the enum range as well.
-
-
setType(DSValueType) - Method in class org.iot.dsa.node.DSMetadata
-
-
The type for action parameters, can be used to override types in the responder api.
-
-
setUnit(String) - Method in class org.iot.dsa.node.DSMetadata
-
-
The unit identifier.
-
-
severe() - Method in class org.iot.dsa.logging.DSLogger
-
-
True if the level is loggable.
-
-
severe(Object) - Method in class org.iot.dsa.logging.DSLogger
-
 
-
severe(Object, Throwable) - Method in class org.iot.dsa.logging.DSLogger
-
 
-
shouldEncode(int) - Static method in class org.iot.dsa.node.DSPath
-
-
Returns true for characters that should be encoded.
-
-
shutdown() - Method in class org.iot.dsa.dslink.DSLink
-
-
Properly shuts down the link when a thread is executing the run method.
-
-
sign(byte[], int, int) - Method in class org.iot.dsa.security.DSKeys
-
-
A convenience that creates a signer and signs the given bytes.
-
-
Signer(PrivateKey) - Constructor for class org.iot.dsa.security.DSKeys.Signer
-
 
-
SimpleRequestHandler - Class in org.iot.dsa.dslink.requester
-
-
Empty callback implementations.
-
-
SimpleRequestHandler() - Constructor for class org.iot.dsa.dslink.requester.SimpleRequestHandler
-
 
-
size() - Method in class org.iot.dsa.node.DSGroup
-
-
The number of items is the group.
-
-
size() - Method in class org.iot.dsa.node.DSList
-
 
-
size() - Method in class org.iot.dsa.node.DSMap
-
 
-
splitPath(String) - Static method in class org.iot.dsa.node.DSPath
-
-
Splits the path, but does not decode any names.
-
-
stable() - Method in class org.iot.dsa.node.DSNode
-
-
Called after the entire subtree is started.
-
-
STALE - Static variable in class org.iot.dsa.node.DSStatus
-
-
Bad, the value hasn't updated in a reasonable amount of time (user configurable on a per - point basis) within DSA.
-
-
stale - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
STALE_STR - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
start() - Method in class org.iot.dsa.logging.AsyncLogHandler
-
-
This must be called for the handler to actually do anything.
-
-
start() - Method in class org.iot.dsa.node.DSNode
-
-
Sets the state to starting.
-
-
stop() - Method in class org.iot.dsa.node.DSNode
-
-
Sets the state to stopped.
-
-
store() - Method in class org.iot.dsa.node.DSFlexEnum
-
 
-
store() - Method in interface org.iot.dsa.node.DSIStorable
-
-
Serialize the value for the configuration database.
-
-
store() - Method in class org.iot.dsa.node.DSJavaEnum
-
 
-
store() - Method in class org.iot.dsa.node.DSStatus
-
 
-
store(File) - Method in class org.iot.dsa.security.DSKeys
-
-
Write the bytes from the string encoding to the given file.
-
-
store(OutputStream) - Method in class org.iot.dsa.security.DSKeys
-
-
Writes the bytes from the string encoding to the given stream, does not onClose the stream.
-
-
store() - Method in class org.iot.dsa.security.DSPasswordAes
-
 
-
store() - Method in class org.iot.dsa.security.DSPasswordSha256
-
 
-
subscribe(String, int, OutboundSubscribeHandler) - Method in interface org.iot.dsa.dslink.DSIRequester
-
-
Submits a subscribe request.
-
-
subscribe(DSTopic, DSInfo, DSISubscriber) - Method in class org.iot.dsa.node.DSNode
-
-
Subscribes the child and topic.
-
-
SubscriptionCloseHandler - Interface in org.iot.dsa.dslink.responder
-
-
The responder returns this from the subscription request notification method so the link can - notify the responder whenever a subscription is terminated.
-
-
- - - -

T

-
-
throwRuntime(Throwable) - Static method in exception org.iot.dsa.util.DSException
-
-
If the given exception is already a runtime exception, it is rethrown, otherwise - it will be thrown wrapped by an instance of this class.
-
-
timeInMillis() - Method in class org.iot.dsa.time.DSDateTime
-
-
The Java time represented by this object.
-
-
toBoolean() - Method in class org.iot.dsa.node.DSBool
-
 
-
toBoolean() - Method in class org.iot.dsa.node.DSDouble
-
 
-
toBoolean() - Method in class org.iot.dsa.node.DSElement
-
-
Attempts to return a boolean value.
-
-
toBoolean() - Method in interface org.iot.dsa.node.DSIBoolean
-
 
-
toBoolean() - Method in class org.iot.dsa.node.DSLong
-
 
-
toBoolean() - Method in class org.iot.dsa.node.DSString
-
 
-
toBytes() - Method in class org.iot.dsa.node.DSBytes
-
 
-
toBytes() - Method in class org.iot.dsa.node.DSElement
-
-
Returns the raw byte array for DSBytes only, which should not be modified.
-
-
toDouble() - Method in class org.iot.dsa.node.DSBool
-
-
0 or 1.
-
-
toDouble() - Method in class org.iot.dsa.node.DSDouble
-
 
-
toDouble() - Method in class org.iot.dsa.node.DSElement
-
-
Attempts to return a double value.
-
-
toDouble() - Method in class org.iot.dsa.node.DSFloat
-
 
-
toDouble() - Method in class org.iot.dsa.node.DSInt
-
 
-
toDouble() - Method in interface org.iot.dsa.node.DSINumber
-
-
If not a double, will cast the underlying value.
-
-
toDouble() - Method in class org.iot.dsa.node.DSLong
-
 
-
toElement() - Method in class org.iot.dsa.node.DSElement
-
-
Returns this.
-
-
toElement() - Method in class org.iot.dsa.node.DSFlexEnum
-
 
-
toElement() - Method in class org.iot.dsa.node.DSFloat
-
 
-
toElement() - Method in class org.iot.dsa.node.DSInt
-
 
-
toElement() - Method in interface org.iot.dsa.node.DSIValue
-
-
The current value should convert itself to an element for DSA interop such as subscription - updates, and setting requests.
-
-
toElement() - Method in class org.iot.dsa.node.DSJavaEnum
-
 
-
toElement() - Method in class org.iot.dsa.node.DSList
-
 
-
toElement() - Method in class org.iot.dsa.node.DSMap
-
 
-
toElement() - Method in class org.iot.dsa.node.DSNull
-
-
Returns this.
-
-
toElement() - Method in class org.iot.dsa.node.DSStatus
-
 
-
toElement() - Method in class org.iot.dsa.node.DSValueNode
-
 
-
toElement() - Method in class org.iot.dsa.security.DSPasswordAes
-
-
Returns a string representing the url safe base64 encoding of the hash.
-
-
toElement() - Method in class org.iot.dsa.security.DSPasswordSha256
-
-
Returns a string representing the url safe base64 encoding of the hash.
-
-
toElement() - Method in class org.iot.dsa.time.DSDateTime
-
 
-
toEnum() - Method in class org.iot.dsa.node.DSJavaEnum
-
-
The Java enum.
-
-
toFloat() - Method in class org.iot.dsa.node.DSBool
-
-
0 or 1.
-
-
toFloat() - Method in class org.iot.dsa.node.DSDouble
-
 
-
toFloat() - Method in class org.iot.dsa.node.DSElement
-
-
Attempts to return a float value.
-
-
toFloat() - Method in class org.iot.dsa.node.DSFloat
-
 
-
toFloat() - Method in class org.iot.dsa.node.DSInt
-
 
-
toFloat() - Method in interface org.iot.dsa.node.DSINumber
-
-
If not a float, will cast the underlying value.
-
-
toFloat() - Method in class org.iot.dsa.node.DSLong
-
 
-
toGroup() - Method in class org.iot.dsa.node.DSElement
-
-
Lists and maps return themselves, everything else results in an exception.
-
-
toGroup() - Method in class org.iot.dsa.node.DSGroup
-
 
-
toInt() - Method in class org.iot.dsa.node.DSBool
-
-
0 or 1.
-
-
toInt() - Method in class org.iot.dsa.node.DSDouble
-
 
-
toInt() - Method in class org.iot.dsa.node.DSElement
-
-
Attempts to return an int value.
-
-
toInt() - Method in class org.iot.dsa.node.DSFloat
-
 
-
toInt() - Method in class org.iot.dsa.node.DSInt
-
 
-
toInt() - Method in interface org.iot.dsa.node.DSINumber
-
-
If not an int, will cast the underlying value.
-
-
toInt() - Method in class org.iot.dsa.node.DSLong
-
 
-
toList() - Method in class org.iot.dsa.node.DSElement
-
-
Lists return themselves, everything else results in an exception.
-
-
toList() - Method in class org.iot.dsa.node.DSList
-
 
-
toLong() - Method in class org.iot.dsa.node.DSBool
-
-
0 or 1.
-
-
toLong() - Method in class org.iot.dsa.node.DSDouble
-
 
-
toLong() - Method in class org.iot.dsa.node.DSElement
-
-
Attempts to return a long value.
-
-
toLong() - Method in class org.iot.dsa.node.DSFloat
-
 
-
toLong() - Method in class org.iot.dsa.node.DSInt
-
 
-
toLong() - Method in interface org.iot.dsa.node.DSINumber
-
-
If not a long, will cast the underlying value.
-
-
toLong() - Method in class org.iot.dsa.node.DSLong
-
 
-
toMap() - Method in class org.iot.dsa.node.DSElement
-
-
Maps return themselves, everything else results in an exception.
-
-
toMap() - Method in class org.iot.dsa.node.DSMap
-
 
-
toNode(Object) - Static method in class org.iot.dsa.node.DSNode
-
-
A convenience that casts the argument to a node.
-
-
toNumber() - Method in class org.iot.dsa.node.DSDouble
-
 
-
toNumber() - Method in class org.iot.dsa.node.DSFloat
-
 
-
toNumber() - Method in class org.iot.dsa.node.DSInt
-
 
-
toNumber() - Method in interface org.iot.dsa.node.DSINumber
-
-
Returns the Java primitive wrapper.
-
-
toNumber() - Method in class org.iot.dsa.node.DSLong
-
 
-
toStatus() - Method in interface org.iot.dsa.node.DSIStatus
-
 
-
toStatus() - Method in class org.iot.dsa.node.DSStatus
-
 
-
toString() - Method in class org.iot.dsa.DSRuntime.Timer
-
 
-
toString() - Method in enum org.iot.dsa.node.action.ActionSpec.ResultType
-
 
-
toString() - Method in class org.iot.dsa.node.DSBool
-
 
-
toString() - Method in class org.iot.dsa.node.DSBytes
-
 
-
toString() - Method in class org.iot.dsa.node.DSDouble
-
 
-
toString() - Method in enum org.iot.dsa.node.DSElementType
-
 
-
toString() - Method in class org.iot.dsa.node.DSFlexEnum
-
 
-
toString() - Method in class org.iot.dsa.node.DSFloat
-
 
-
toString() - Method in class org.iot.dsa.node.DSGroup
-
-
Json encodes the graph, be careful.
-
-
toString() - Method in interface org.iot.dsa.node.DSIEnum
-
-
The string representation of the the enum value.
-
-
toString() - Method in class org.iot.dsa.node.DSInt
-
 
-
toString() - Method in class org.iot.dsa.node.DSJavaEnum
-
 
-
toString() - Method in class org.iot.dsa.node.DSLong
-
 
-
toString() - Method in class org.iot.dsa.node.DSNull
-
 
-
toString() - Method in class org.iot.dsa.node.DSStatus
-
 
-
toString() - Method in class org.iot.dsa.node.DSString
-
 
-
toString() - Method in class org.iot.dsa.node.DSValue
-
-
If isNull(), returns "null", otherwise returns toElement().toString()
-
-
toString() - Method in enum org.iot.dsa.node.DSValueType
-
 
-
toString() - Method in class org.iot.dsa.security.DSPasswordAes
-
 
-
toString() - Method in class org.iot.dsa.security.DSPasswordSha256
-
 
-
toString() - Method in enum org.iot.dsa.security.DSPermission
-
 
-
toString() - Method in class org.iot.dsa.time.DSDateTime
-
-
ISO 8601 standard format of "yyyy-mm-ddThh:mm:ss.mmm[+/-]hh:mm".
-
-
toString() - Method in exception org.iot.dsa.util.DSException
-
 
-
trimBackups() - Method in class org.iot.dsa.logging.FileLogHandler
-
-
Only public for testing, do not call.
-
-
TRUE - Static variable in class org.iot.dsa.node.DSBool
-
 
-
TYPE - Static variable in class org.iot.dsa.node.DSMetadata
-
 
-
- - - -

U

-
-
UNIT - Static variable in class org.iot.dsa.node.DSMetadata
-
 
-
UNKNOWN - Static variable in class org.iot.dsa.node.DSStatus
-
-
Bad, the status is unknown within DSA, typically the initial state at boot.
-
-
unknown - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
UNKNOWN_STR - Static variable in class org.iot.dsa.node.DSStatus
-
 
-
unsubscribe(DSTopic, DSInfo, DSISubscriber) - Method in class org.iot.dsa.node.DSNode
-
-
Unsubscribes the tuple.
-
-
update(long, DSIValue, DSStatus) - Method in interface org.iot.dsa.dslink.responder.InboundSubscribeRequest
-
-
The responder should call this when first received and then whenever the value or status - changes.
-
-
update(byte[]) - Method in class org.iot.dsa.security.DSKeys.Signer
-
-
Update the signature with the given bytes.
-
-
update(byte[], int, int) - Method in class org.iot.dsa.security.DSKeys.Signer
-
-
Update the signature with the given bytes.
-
-
update(byte[]) - Method in class org.iot.dsa.security.DSKeys.Verifier
-
-
Update the signature with the given bytes.
-
-
update(byte[], int, int) - Method in class org.iot.dsa.security.DSKeys.Verifier
-
-
Update the signature with the given bytes.
-
-
UTF8 - Static variable in class org.iot.dsa.node.DSString
-
-
The standard UTF8 charset, can be used with string.getBytes(Charset).
-
-
- - - -

V

-
-
valBoolean - Variable in class org.iot.dsa.io.AbstractReader
-
 
-
valBytes - Variable in class org.iot.dsa.io.AbstractReader
-
 
-
validate(byte[]) - Method in class org.iot.dsa.security.DSKeys.Verifier
-
-
Returns true if the given signature is valid for the bytes passed to update.
-
-
validate(String) - Method in class org.iot.dsa.security.DSKeys.Verifier
-
-
Returns true if the given base 64 encoded signature is valid for the bytes passed to - update.
-
-
validateChild(DSIObject) - Method in class org.iot.dsa.node.DSNode
-
-
Override point, throw a meaningful IllegalArgumentException if the child is not allowed
-
-
validateParent(DSNode) - Method in class org.iot.dsa.dslink.DSMainNode
-
-
The parent must be a DSLink instance.
-
-
validateParent(DSNode) - Method in class org.iot.dsa.node.DSNode
-
-
Override point, throw a meaningful IllegalArgumentException if the parent is not allowed
-
-
valLong - Variable in class org.iot.dsa.io.AbstractReader
-
 
-
valReal - Variable in class org.iot.dsa.io.AbstractReader
-
 
-
valString - Variable in class org.iot.dsa.io.AbstractReader
-
 
-
value(DSElement) - Method in class org.iot.dsa.io.AbstractWriter
-
 
-
value(boolean) - Method in class org.iot.dsa.io.AbstractWriter
-
 
-
value(byte[]) - Method in class org.iot.dsa.io.AbstractWriter
-
 
-
value(double) - Method in class org.iot.dsa.io.AbstractWriter
-
 
-
value(int) - Method in class org.iot.dsa.io.AbstractWriter
-
 
-
value(long) - Method in class org.iot.dsa.io.AbstractWriter
-
 
-
value(String) - Method in class org.iot.dsa.io.AbstractWriter
-
 
-
value(DSElement) - Method in interface org.iot.dsa.io.DSIWriter
-
-
Write a value to the map or list.
-
-
value(boolean) - Method in interface org.iot.dsa.io.DSIWriter
-
-
Write a value to the map or list.
-
-
value(byte[]) - Method in interface org.iot.dsa.io.DSIWriter
-
-
Write a value to the map or list.
-
-
value(double) - Method in interface org.iot.dsa.io.DSIWriter
-
-
Write a value to the map or list.
-
-
value(int) - Method in interface org.iot.dsa.io.DSIWriter
-
-
Write a value to the map or list.
-
-
value(long) - Method in interface org.iot.dsa.io.DSIWriter
-
-
Write a value to the map or list.
-
-
value(String) - Method in interface org.iot.dsa.io.DSIWriter
-
-
Write a value to the map or list.
-
-
value(DSElement) - Method in class org.iot.dsa.io.json.AbstractJsonWriter
-
 
-
VALUE_TOPIC - Static variable in class org.iot.dsa.node.DSNode
-
 
-
valueOf(String) - Static method in enum org.iot.dsa.dslink.requester.OutboundInvokeHandler.Mode
-
-
Returns the enum constant of this type with the specified name.
-
-
valueOf(String) - Static method in enum org.iot.dsa.io.DSIReader.Token
-
-
Returns the enum constant of this type with the specified name.
-
-
valueOf(String) - Static method in enum org.iot.dsa.node.action.ActionSpec.ResultType
-
-
Returns the enum constant of this type with the specified name.
-
-
valueOf(boolean) - Static method in class org.iot.dsa.node.DSBool
-
-
Will return either TRUE or FALSE.
-
-
valueOf(DSElement) - Method in class org.iot.dsa.node.DSBool
-
 
-
valueOf(String) - Static method in class org.iot.dsa.node.DSBool
-
-
Will return NULL, TRUE or FALSE.
-
-
valueOf(byte[]) - Static method in class org.iot.dsa.node.DSBytes
-
 
-
valueOf(DSElement) - Method in class org.iot.dsa.node.DSBytes
-
 
-
valueOf(String) - Static method in class org.iot.dsa.node.DSBytes
-
-
Decodes a base64 encoded byte array.
-
-
valueOf(double) - Static method in class org.iot.dsa.node.DSDouble
-
-
Attempts to reuse some common values before creating a new instance.
-
-
valueOf(DSElement) - Method in class org.iot.dsa.node.DSDouble
-
 
-
valueOf(String) - Static method in class org.iot.dsa.node.DSDouble
-
-
Checks for null, then uses Double.parseDouble()
-
-
valueOf(DSElement) - Method in class org.iot.dsa.node.DSElement
-
-
Returns the argument.
-
-
valueOf(String) - Static method in enum org.iot.dsa.node.DSElementType
-
-
Returns the enum constant of this type with the specified name.
-
-
valueOf(DSElement) - Method in class org.iot.dsa.node.DSFlexEnum
-
 
-
valueOf(String, DSList) - Static method in class org.iot.dsa.node.DSFlexEnum
-
-
Creates a enum representing the given value and range.
-
-
valueOf(String) - Method in class org.iot.dsa.node.DSFlexEnum
-
-
Creates a new enum for the given value using the range from this instance.
-
-
valueOf(DSElement) - Method in class org.iot.dsa.node.DSFloat
-
 
-
valueOf(float) - Static method in class org.iot.dsa.node.DSFloat
-
-
Attempts to reuse some common values before creating a new instance.
-
-
valueOf(String) - Static method in class org.iot.dsa.node.DSFloat
-
-
Checks for null, then uses Float.parseFloat()
-
-
valueOf(DSElement) - Method in class org.iot.dsa.node.DSInt
-
 
-
valueOf(int) - Static method in class org.iot.dsa.node.DSInt
-
-
Attempts to reuse some common values before creating a new instance.
-
-
valueOf(String) - Static method in class org.iot.dsa.node.DSInt
-
-
Checks for null, then uses Float.parseFloat()
-
-
valueOf(DSElement) - Method in interface org.iot.dsa.node.DSIValue
-
-
This should convert an element transmitted over DSA, such as subscription updates or set - requests.
-
-
valueOf(DSElement) - Method in class org.iot.dsa.node.DSJavaEnum
-
 
-
valueOf(Enum) - Static method in class org.iot.dsa.node.DSJavaEnum
-
-
Creates an enum for the given value (and it's range).
-
-
valueOf(String) - Method in class org.iot.dsa.node.DSJavaEnum
-
 
-
valueOf(DSElement) - Method in class org.iot.dsa.node.DSList
-
 
-
valueOf(DSElement...) - Static method in class org.iot.dsa.node.DSList
-
 
-
valueOf(Double...) - Static method in class org.iot.dsa.node.DSList
-
 
-
valueOf(Long...) - Static method in class org.iot.dsa.node.DSList
-
 
-
valueOf(String...) - Static method in class org.iot.dsa.node.DSList
-
 
-
valueOf(DSElement) - Method in class org.iot.dsa.node.DSLong
-
-
Returns this.
-
-
valueOf(long) - Static method in class org.iot.dsa.node.DSLong
-
-
Attempts to reuse some common values before creating a new instance.
-
-
valueOf(String) - Static method in class org.iot.dsa.node.DSLong
-
-
Checks for null, then uses Float.parseFloat()
-
-
valueOf(DSElement) - Method in class org.iot.dsa.node.DSMap
-
 
-
valueOf(DSElement) - Method in class org.iot.dsa.node.DSNull
-
-
Returns this.
-
-
valueOf(DSElement) - Method in class org.iot.dsa.node.DSStatus
-
 
-
valueOf(String) - Static method in class org.iot.dsa.node.DSStatus
-
 
-
valueOf(DSElement) - Method in class org.iot.dsa.node.DSString
-
 
-
valueOf(Object) - Static method in class org.iot.dsa.node.DSString
-
 
-
valueOf(DSElement) - Method in class org.iot.dsa.node.DSValueNode
-
 
-
valueOf(String) - Static method in enum org.iot.dsa.node.DSValueType
-
-
Returns the enum constant of this type with the specified name.
-
-
valueOf(String) - Static method in enum org.iot.dsa.node.event.DSInfoTopic.Event
-
-
Returns the enum constant of this type with the specified name.
-
-
valueOf(String) - Static method in enum org.iot.dsa.node.event.DSValueTopic.Event
-
-
Returns the enum constant of this type with the specified name.
-
-
valueOf(DSElement) - Method in class org.iot.dsa.security.DSPasswordAes
-
-
Creates a encrypted password for the given clear text.
-
-
valueOf(String) - Static method in class org.iot.dsa.security.DSPasswordAes
-
-
Creates a encrypted password for the given clear text.
-
-
valueOf(DSElement) - Method in class org.iot.dsa.security.DSPasswordSha256
-
-
Creates a digest password for the given clear text.
-
-
valueOf(String) - Static method in class org.iot.dsa.security.DSPasswordSha256
-
-
Creates a digest password for the given clear text.
-
-
valueOf(String) - Static method in enum org.iot.dsa.security.DSPermission
-
-
Returns the enum constant of this type with the specified name.
-
-
valueOf(DSElement) - Method in class org.iot.dsa.time.DSDateTime
-
 
-
valueOf(long) - Static method in class org.iot.dsa.time.DSDateTime
-
 
-
valueOf(String) - Static method in class org.iot.dsa.time.DSDateTime
-
-
Decodes an ISO 8601 standard format of "yyyy-mm-ddThh:mm:ss.mmm[+/-]hh:mm".
-
-
valueOf(String) - Static method in enum org.iot.dsa.time.DSInterval
-
-
Returns the enum constant of this type with the specified name.
-
-
values() - Static method in enum org.iot.dsa.dslink.requester.OutboundInvokeHandler.Mode
-
-
Returns an array containing the constants of this enum type, in -the order they are declared.
-
-
values() - Static method in enum org.iot.dsa.io.DSIReader.Token
-
-
Returns an array containing the constants of this enum type, in -the order they are declared.
-
-
values() - Static method in enum org.iot.dsa.node.action.ActionSpec.ResultType
-
-
Returns an array containing the constants of this enum type, in -the order they are declared.
-
-
values() - Static method in enum org.iot.dsa.node.DSElementType
-
-
Returns an array containing the constants of this enum type, in -the order they are declared.
-
-
values() - Static method in enum org.iot.dsa.node.DSValueType
-
-
Returns an array containing the constants of this enum type, in -the order they are declared.
-
-
values() - Static method in enum org.iot.dsa.node.event.DSInfoTopic.Event
-
-
Returns an array containing the constants of this enum type, in -the order they are declared.
-
-
values() - Static method in enum org.iot.dsa.node.event.DSValueTopic.Event
-
-
Returns an array containing the constants of this enum type, in -the order they are declared.
-
-
values() - Static method in enum org.iot.dsa.security.DSPermission
-
-
Returns an array containing the constants of this enum type, in -the order they are declared.
-
-
values() - Static method in enum org.iot.dsa.time.DSInterval
-
-
Returns an array containing the constants of this enum type, in -the order they are declared.
-
-
Verifier(PublicKey) - Constructor for class org.iot.dsa.security.DSKeys.Verifier
-
 
-
verify(byte[], int, int, String) - Method in class org.iot.dsa.security.DSKeys
-
-
A convenience that creates a verifier and validates the signature for the given bytes.
-
-
- - - -

W

-
-
warn() - Method in class org.iot.dsa.logging.DSLogger
-
-
True if the level is loggable.
-
-
warn(Object) - Method in class org.iot.dsa.logging.DSLogger
-
-
Log an unusual but not critical event.
-
-
warn(Object, Throwable) - Method in class org.iot.dsa.logging.DSLogger
-
-
Log an unusual but not critical event.
-
-
wasHelpRequested() - Method in class org.iot.dsa.dslink.DSLinkConfig
-
-
Whether or not -h or --help was provided.
-
-
write(boolean) - Method in class org.iot.dsa.io.AbstractWriter
-
-
Write the value.
-
-
write(byte[]) - Method in class org.iot.dsa.io.AbstractWriter
-
-
Write the value.
-
-
write(double) - Method in class org.iot.dsa.io.AbstractWriter
-
-
Write the value.
-
-
write(long) - Method in class org.iot.dsa.io.AbstractWriter
-
-
Write the value.
-
-
write(boolean) - Method in class org.iot.dsa.io.json.AbstractJsonWriter
-
 
-
write(byte[]) - Method in class org.iot.dsa.io.json.AbstractJsonWriter
-
 
-
write(double) - Method in class org.iot.dsa.io.json.AbstractJsonWriter
-
 
-
write(long) - Method in class org.iot.dsa.io.json.AbstractJsonWriter
-
 
-
write(boolean) - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
 
-
write(byte[]) - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
 
-
write(double) - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
 
-
write(long) - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
 
-
write(LogRecord) - Method in class org.iot.dsa.logging.AsyncLogHandler
-
-
Formats and writes the logging record the underlying stream.
-
-
writeDouble(double, byte[], int, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Encodes the primitive into a byte array.
-
-
writeDouble(double, OutputStream, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Encodes the primitive into a stream.
-
-
writeFloat(float, byte[], int, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Encodes the primitive into a byte array.
-
-
writeFloat(float, OutputStream, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Encodes the primitive into a stream
-
-
writeInt(int, byte[], int, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Encodes the primitive into a byte array.
-
-
writeInt(int, OutputStream, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Encodes the primitive into a stream.
-
-
writeKey(CharSequence) - Method in class org.iot.dsa.io.AbstractWriter
-
-
Write string key of a map entry.
-
-
writeKey(CharSequence) - Method in class org.iot.dsa.io.json.AbstractJsonWriter
-
 
-
writeKey(CharSequence) - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
 
-
writeKeyValueSeparator() - Method in class org.iot.dsa.io.AbstractWriter
-
-
Separate the key from the value in a map.
-
-
writeKeyValueSeparator() - Method in class org.iot.dsa.io.json.AbstractJsonWriter
-
 
-
writeKeyValueSeparator() - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
 
-
writeListEnd() - Method in class org.iot.dsa.io.AbstractWriter
-
-
End the current list.
-
-
writeListEnd() - Method in class org.iot.dsa.io.json.AbstractJsonWriter
-
 
-
writeListEnd() - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
 
-
writeListStart(int) - Method in class org.iot.dsa.io.AbstractWriter
-
-
Start a new list.
-
-
writeListStart(int) - Method in class org.iot.dsa.io.json.AbstractJsonWriter
-
 
-
writeListStart(int) - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
-
A negative size implies dynamic and will be written when the list is closed.
-
-
writeLong(long, byte[], int, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Encodes the primitive into a byte array.
-
-
writeLong(long, OutputStream, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Encodes the primitive into a stream.
-
-
writeMapEnd() - Method in class org.iot.dsa.io.AbstractWriter
-
-
End the current map.
-
-
writeMapEnd() - Method in class org.iot.dsa.io.json.AbstractJsonWriter
-
 
-
writeMapEnd() - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
 
-
writeMapStart(int) - Method in class org.iot.dsa.io.AbstractWriter
-
-
Start a new map.
-
-
writeMapStart(int) - Method in class org.iot.dsa.io.json.AbstractJsonWriter
-
 
-
writeMapStart(int) - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
-
A negative size implies dynamic and will be written when the map is closed.
-
-
writeNewLineIndent() - Method in class org.iot.dsa.io.AbstractWriter
-
-
Override point for subclasses which perform use pretty printing, such as json.
-
-
writeNewLineIndent() - Method in class org.iot.dsa.io.json.AbstractJsonWriter
-
-
Two spaces per level.
-
-
writeNewLineIndent() - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
 
-
writeNull() - Method in class org.iot.dsa.io.AbstractWriter
-
-
Write a null value.
-
-
writeNull() - Method in class org.iot.dsa.io.json.AbstractJsonWriter
-
 
-
writeNull() - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
 
-
writeSeparator() - Method in class org.iot.dsa.io.AbstractWriter
-
-
Write a value separator, such as the comma in json.
-
-
writeSeparator() - Method in class org.iot.dsa.io.json.AbstractJsonWriter
-
 
-
writeSeparator() - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
 
-
writeShort(short, byte[], int, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Encodes the primitive into a byte array.
-
-
writeShort(short, OutputStream, boolean) - Static method in class org.iot.dsa.node.DSBytes
-
-
Encodes the primitive into a stream.
-
-
writeTo(ByteBuffer) - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
-
Writes the internal buffer to the parameter.
-
-
writeTo(OutputStream) - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
-
Writes the internal buffer to the parameter.
-
-
writeValue(CharSequence) - Method in class org.iot.dsa.io.AbstractWriter
-
-
Write the value, which will never be null.
-
-
writeValue(CharSequence) - Method in class org.iot.dsa.io.json.AbstractJsonWriter
-
 
-
writeValue(CharSequence) - Method in class org.iot.dsa.io.msgpack.MsgpackWriter
-
 
-
-A B C D E F G H I J K L M N O P R S T U V W 
+

A

+
+
AbstractInvokeHandler + - Class in org.iot.dsa.dslink.requester +
+
+
Convenience implementation of the callback passed to the invoke method in + the requester. +
+
+
AbstractInvokeHandler() + - Constructor for class org.iot.dsa.dslink.requester.AbstractInvokeHandler
+
 
+
AbstractJsonWriter + - Class in org.iot.dsa.io.json
+
 
+
AbstractJsonWriter() + - Constructor for class org.iot.dsa.io.json.AbstractJsonWriter +
+
 
+
AbstractListHandler + - Class in org.iot.dsa.dslink.requester +
+
+
Convenience implementation of the handler passed to the invoke method in + the requester. +
+
+
AbstractListHandler() + - Constructor for class org.iot.dsa.dslink.requester.AbstractListHandler
+
 
+
AbstractReader - Class in org.iot.dsa.io
+
+
Basic implementation of DSReader.
+
+
AbstractReader() + - Constructor for class org.iot.dsa.io.AbstractReader +
+
 
+
AbstractSubscribeHandler + - Class in org.iot.dsa.dslink.requester +
+
+
Convenience implementation of the handler passed to the subscribe method in + the requester. +
+
+
AbstractSubscribeHandler() + - Constructor for class org.iot.dsa.dslink.requester.AbstractSubscribeHandler
+
 
+
AbstractWriter - Class in org.iot.dsa.io
+
+
Basic implementation of DSWriter.
+
+
AbstractWriter() + - Constructor for class org.iot.dsa.io.AbstractWriter +
+
 
+
ActionInvocation - Interface in org.iot.dsa.node.action
+
+
Encapsulates the details of an action invocation and provides the mechanism + for updating and open + stream. +
+
+
ActionResult - Interface in org.iot.dsa.node.action
+
+
Super interface for possible results of an action.
+
+
ActionSpec + - Interface in org.iot.dsa.node.action
+
+
Defines an invokable node in the DSA model.
+
+
ActionSpec.ResultType - Enum in org.iot.dsa.node.action
+
+
Defines what the action returns.
+
+
ActionTable - Interface in org.iot.dsa.node.action
+
+
Provides access to the columns and rows of a table.
+
+
ActionValues - Interface in org.iot.dsa.node.action
+
+
Simple set of return values from an action.
+
+
add(DSElement) + - Method in class org.iot.dsa.node.DSList
+
+
Adds the value and returns this.
+
+
add(boolean) + - Method in class org.iot.dsa.node.DSList
+
+
Appends the primitive and returns this.
+
+
add(double) - Method in class + org.iot.dsa.node.DSList +
+
+
Appends the primitive and returns this.
+
+
add(long) + - Method in class org.iot.dsa.node.DSList
+
+
Appends the primitive and returns this.
+
+
add(String) + - Method in class org.iot.dsa.node.DSList
+
+
Appends the primitive and returns this.
+
+
add(int) - Method in class + org.iot.dsa.node.DSList +
+
+
Appends the primitive and returns this.
+
+
add(String, DSIObject) + - Method in class org.iot.dsa.node.DSNode
+
+
Adds the named child only if the name is not already in use.
+
+
addAll(DSList) + - Method in class org.iot.dsa.node.DSList
+
+
Add all elements of the argument to this list and returns this.
+
+
addDays(int, Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Adds or subtracts the corresponding time field, does not perform any + alignment. +
+
+
addDays(int, long) + - Static method in class org.iot.dsa.time.DSTime
+
+
Adds or subtracts the corresponding time field, does not perform any + alignment. +
+
+
addDefaultParameter(String, DSIValue, String) + - Method in class org.iot.dsa.node.action.DSAction +
+
+
A convenience which calls addParameter with the same arguments, and also + sets the metadata + for default value. +
+
+
addHours(int, Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Adds or subtracts the corresponding time field, does not perform any + alignment. +
+
+
addHours(int, long) + - Static method in class org.iot.dsa.time.DSTime
+
+
Adds or subtracts the corresponding time field, does not perform any + alignment. +
+
+
addList() + - Method in class org.iot.dsa.node.DSList
+
+
Appends a new list and returns it.
+
+
addListener(DSLinkConnection.Listener) + - Method in class org.iot.dsa.dslink.DSLinkConnection +
+
+
Adds a listener for connection events.
+
+
addMap() - Method in class + org.iot.dsa.node.DSList +
+
+
Appends a new map and returns it.
+
+
addMinutes(int, Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Adds or subtracts the corresponding time field, does not perform any + alignment. +
+
+
addMinutes(int, long) + - Static method in class org.iot.dsa.time.DSTime
+
+
Adds or subtracts the corresponding time field, does not perform any + alignment. +
+
+
addMonths(int, Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Adds or subtracts the corresponding time field, does not perform any + alignment. +
+
+
addMonths(int, long) + - Static method in class org.iot.dsa.time.DSTime
+
+
Adds or subtracts the corresponding time field, does not perform any + alignment. +
+
+
addNull() + - Method in class org.iot.dsa.node.DSList
+
+
Appends null and returns this.
+
+
addParameter(DSMap) + - Method in class org.iot.dsa.node.action.DSAction +
+
+
Fully describes a parameter for method invocation.
+
+
addParameter(String, DSIValue, String) + - Method in class org.iot.dsa.node.action.DSAction +
+
+
Creates a DSMetadata, calls setName and setType on it, adds the internal + map to the parameter + list and returns the metadata instance for further configuration. +
+
+
addParameter(String, DSValueType, String) + - Method in class org.iot.dsa.node.action.DSAction +
+
+
Creates a DSMetadata, calls setName and setType on it, adds the internal + map to the parameter + list and returns the metadata instance for further configuration. +
+
+
addSeconds(int, Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Adds or subtracts the corresponding time field, does not perform any + alignment. +
+
+
addSeconds(int, long) + - Static method in class org.iot.dsa.time.DSTime
+
+
Adds or subtracts the corresponding time field, does not perform any + alignment. +
+
+
addValueResult(DSMap) + - Method in class org.iot.dsa.node.action.DSAction +
+
+
Fully describes a return value when the result type is VALUES.
+
+
addValueResult(String, DSIValue) + - Method in class org.iot.dsa.node.action.DSAction +
+
+
Creates a DSMetadata, calls setName and setType on it, adds the internal + map to the results + list and returns the metadata instance for further configuration. +
+
+
addValueResult(String, DSValueType) + - Method in class org.iot.dsa.node.action.DSAction +
+
+
Creates a DSMetadata, calls setName and setType on it, adds the internal + map to the results + list and returns the metadata instance for further configuration. +
+
+
addWeeks(int, Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Adds or subtracts the corresponding time field, does not perform any + alignment. +
+
+
addWeeks(int, long) + - Static method in class org.iot.dsa.time.DSTime
+
+
Adds or subtracts the corresponding time field, does not perform any + alignment. +
+
+
addYears(int, Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Adds or subtracts the corresponding time field, does not perform any + alignment. +
+
+
addYears(int, long) + - Static method in class org.iot.dsa.time.DSTime
+
+
Adds or subtracts the corresponding time field, does not perform any + alignment. +
+
+
alignDay(Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Aligns the time fields to the start of the day.
+
+
alignDays(int, Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Aligns the time fields to the start of given interval.
+
+
alignHour(Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Aligns the time fields to the start of the hour.
+
+
alignHours(int, Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Aligns the time fields to the start of given interval.
+
+
alignMinute(Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Aligns the time fields to the start of the minute.
+
+
alignMinutes(int, Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Aligns the time fields to the start of given interval.
+
+
alignMonth(Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Aligns the time fields to the start of the month.
+
+
alignSecond(Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Aligns the time fields to the start of the second.
+
+
alignSeconds(int, Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Aligns the time fields to the start of given interval.
+
+
alignWeek(Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Aligns the time fields to the start of the week.
+
+
alignYear(Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Aligns the time fields to the start of the year.
+
+
ApiObject - Interface in org.iot.dsa.dslink.responder +
+
+
Can be a node, value or an action.
+
+
append(char[], int, int) + - Method in class org.iot.dsa.io.json.AbstractJsonWriter +
+
+
Append the characters and return this.
+
+
append(char) + - Method in class org.iot.dsa.io.json.JsonAppender +
+
+
Append the char and return this.
+
+
append(char[], int, int) + - Method in class org.iot.dsa.io.json.JsonAppender +
+
+
Append the chars and return this.
+
+
append(CharSequence) + - Method in class org.iot.dsa.io.json.JsonAppender +
+
+
Append the chars and return this.
+
+
append(CharSequence, int, int) + - Method in class org.iot.dsa.io.json.JsonAppender +
+
+
Append the chars and return this.
+
+
append(CharSequence) + - Method in class org.iot.dsa.io.json.JsonWriter +
+
 
+
append(char) + - Method in class org.iot.dsa.io.json.JsonWriter +
+
 
+
append(CharSequence, int, int) + - Method in class org.iot.dsa.io.json.JsonWriter +
+
+
Append the chars and return this.
+
+
append(char[], int, int) + - Method in class org.iot.dsa.io.json.JsonWriter +
+
+
Append the chars and return this.
+
+
AsyncLogHandler - Class in org.iot.dsa.logging
+
+
Enqueues logging records which are then processed by separate thread.
+
+
AsyncLogHandler() + - Constructor for class org.iot.dsa.logging.AsyncLogHandler +
+
 
+
+ + + +

B

+
+
beginList() + - Method in class org.iot.dsa.io.AbstractWriter
+
 
+
beginList(int) + - Method in class org.iot.dsa.io.AbstractWriter
+
 
+
beginList() - Method in + interface org.iot.dsa.io.DSIWriter
+
+
Start a new list and return this.
+
+
beginList(int) + - Method in interface org.iot.dsa.io.DSIWriter
+
+
Start a new list of the given size and return this.
+
+
beginMap() + - Method in class org.iot.dsa.io.AbstractWriter
+
 
+
beginMap(int) + - Method in class org.iot.dsa.io.AbstractWriter
+
 
+
beginMap() - Method in interface + org.iot.dsa.io.DSIWriter +
+
+
Start a new map and return this.
+
+
beginMap(int) + - Method in interface org.iot.dsa.io.DSIWriter
+
+
Start a new map of the given size and return this.
+
+
BOOLEAN_RANGE + - Static variable in class org.iot.dsa.node.DSMetadata +
+
 
+
byteBuffer + - Variable in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
 
+
+ + + +

C

+
+
cancel() - Method in class + org.iot.dsa.DSRuntime.Timer +
+
+
Cancel execution, will not impact current running tasks and will have no + effect if + already cancelled. +
+
+
CFG_AUTH_TOKEN + - Static variable in class org.iot.dsa.dslink.DSLinkConfig +
+
 
+
CFG_BROKER_URL + - Static variable in class org.iot.dsa.dslink.DSLinkConfig +
+
 
+
CFG_CONNECTION_TYPE + - Static variable in class org.iot.dsa.dslink.DSLinkConfig +
+
 
+
CFG_IS_REQUESTER - + Static variable in class org.iot.dsa.dslink.DSLinkConfig +
+
 
+
CFG_IS_RESPONDER - + Static variable in class org.iot.dsa.dslink.DSLinkConfig +
+
 
+
CFG_KEY_FILE + - Static variable in class org.iot.dsa.dslink.DSLinkConfig +
+
 
+
CFG_LOG_FILE + - Static variable in class org.iot.dsa.dslink.DSLinkConfig +
+
 
+
CFG_LOG_LEVEL + - Static variable in class org.iot.dsa.dslink.DSLinkConfig +
+
 
+
CFG_MAIN_TYPE + - Static variable in class org.iot.dsa.dslink.DSLinkConfig +
+
 
+
CFG_NODE_FILE + - Static variable in class org.iot.dsa.dslink.DSLinkConfig +
+
 
+
CFG_PROTOCOL_VERSION + - Static variable in class org.iot.dsa.dslink.DSLinkConfig +
+
 
+
CFG_READ_TIMEOUT - + Static variable in class org.iot.dsa.dslink.DSLinkConfig +
+
 
+
CFG_SAVE_INTERVAL - + Static variable in class org.iot.dsa.dslink.DSLinkConfig +
+
 
+
CFG_STABLE_DELAY - + Static variable in class org.iot.dsa.dslink.DSLinkConfig +
+
 
+
CFG_WS_TRANSPORT_FACTORY + - Static variable in class org.iot.dsa.dslink.DSLinkConfig +
+
 
+
childAdded(ApiObject) + - Method in interface org.iot.dsa.dslink.responder.InboundListRequest
+
+
The responder should call this whenever a child is added.
+
+
childCount() + - Method in class org.iot.dsa.node.DSNode
+
+
The number of children.
+
+
childRemoved(ApiObject) + - Method in interface org.iot.dsa.dslink.responder.InboundListRequest
+
+
The responder should call this whenever a child is removed.
+
+
clear() - Method in class + org.iot.dsa.node.DSGroup +
+
+
Removes all items.
+
+
clear() - Method in class + org.iot.dsa.node.DSList +
+
 
+
clear() - Method in class + org.iot.dsa.node.DSMap
+
 
+
clear() + - Method in class org.iot.dsa.node.DSMetadata
+
 
+
clear(String) - + Method in class org.iot.dsa.node.DSMetadata
+
 
+
clear() - Method in class + org.iot.dsa.node.DSNode +
+
+
Removes non-permanent children.
+
+
clearAllRows() + - Method in interface org.iot.dsa.node.action.ActionInvocation
+
+
Only use with stream and open tables, instructs the requester to clear all + existing rows. +
+
+
close() - + Method in interface org.iot.dsa.dslink.responder.InboundListRequest
+
+
Allows the responder to forcefully close the list stream.
+
+
close(Exception) + - Method in interface org.iot.dsa.dslink.responder.InboundListRequest
+
+
Allows the responder to forcefully close the list stream.
+
+
close() + - Method in interface org.iot.dsa.dslink.responder.InboundSubscribeRequest
+
+
Allows the responder to forcefully terminate the subscription.
+
+
close() - Method in interface + org.iot.dsa.io.DSIReader +
+
+
Close the input.
+
+
close() - Method in interface + org.iot.dsa.io.DSIWriter +
+
+
Close the stream.
+
+
close() - Method in class + org.iot.dsa.io.json.JsonAppender
+
 
+
close() - Method in class + org.iot.dsa.io.json.JsonReader
+
 
+
close() - Method in class + org.iot.dsa.io.json.JsonWriter
+
 
+
close() + - Method in class org.iot.dsa.io.msgpack.MsgpackReader +
+
 
+
close() + - Method in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
+
Does nothing.
+
+
close() + - Method in class org.iot.dsa.logging.AsyncLogHandler +
+
+
Closes the PrintStream, terminates the write thread and performs + houseKeeping. +
+
+
close() - Static method in + class org.iot.dsa.logging.DSLogging
+
+
Closes all async log handlers.
+
+
close() - Method in + interface org.iot.dsa.node.action.ActionInvocation +
+
+
For use with streams and open tables, will have no effect if the stream is + already closed. +
+
+
close(Exception) + - Method in interface org.iot.dsa.node.action.ActionInvocation
+
+
Close and send and error.
+
+
closeStream() + - Method in interface org.iot.dsa.dslink.requester.OutboundStream
+
+
Allows the requester to close the stream.
+
+
config() - Method in class + org.iot.dsa.logging.DSLogger
+
+
True if the level is loggable.
+
+
config(Object) + - Method in class org.iot.dsa.logging.DSLogger +
+
 
+
CONFIG_FAULT + - Static variable in class org.iot.dsa.node.DSStatus +
+
+
Bad, a configuration error has been indentified within DSA.
+
+
CONFIG_FAULT_STR + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
configFault + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
contains(DSElement) + - Method in class org.iot.dsa.node.DSList
+
 
+
contains(String) - + Method in class org.iot.dsa.node.DSMap
+
 
+
contains(String) - + Method in class org.iot.dsa.node.DSNode
+
+
Whether or not this node has a child with the given name.
+
+
copy() - Method in class + org.iot.dsa.node.action.DSAction
+
 
+
copy() - Method in class + org.iot.dsa.node.DSElement +
+
+
If an object is mutable (list or map) then this should clone it, immutable + objects can simply + return themselves. +
+
+
copy() - Method in class + org.iot.dsa.node.DSFlexEnum +
+
 
+
copy() + - Method in class org.iot.dsa.node.DSInfo
+
 
+
copy() - Method in interface + org.iot.dsa.node.DSIObject
+
+
Return a copy if it makes sense, but return this otherwise.
+
+
copy() + - Method in class org.iot.dsa.node.DSList
+
 
+
copy() + - Method in class org.iot.dsa.node.DSMap
+
 
+
copy() + - Method in class org.iot.dsa.node.DSNode
+
+
Returns a clone of this node and its subtree.
+
+
copy() + - Method in class org.iot.dsa.node.DSNull
+
+
Returns this.
+
+
copy() - Method in class + org.iot.dsa.node.DSValue +
+
+
Returns this.
+
+
copy() + - Method in class org.iot.dsa.node.event.DSTopic +
+
+
Returns this.
+
+
count(long, long) + - Method in enum org.iot.dsa.time.DSInterval
+
+
Returns the number of intervals for the given time range, or -1 if + indeterminate. +
+
+
currentTime() + - Static method in class org.iot.dsa.time.DSDateTime +
+
+
The current time.
+
+
+ + + +

D

+
+
DBL_NAN + - Static variable in interface org.iot.dsa.io.json.JsonConstants +
+
+
How Double.NaN is encoded: "\\u001BNaN"
+
+
DBL_NEG_INF + - Static variable in interface org.iot.dsa.io.json.JsonConstants +
+
+
How Double.NEGATIVE_INFINITY is encoded: "\\u001B-Infinity"
+
+
DBL_POS_INF + - Static variable in interface org.iot.dsa.io.json.JsonConstants +
+
+
How Double.POSITIVE_INFINITY is encoded: "\\u001BInfinity"
+
+
DECIMAL_PLACES + - Static variable in class org.iot.dsa.node.DSMetadata +
+
 
+
declareDefault(String, DSIObject) + - Method in class org.iot.dsa.node.DSNode
+
+
Use this in the declareDefaults method to create a non-removable child. +
+
+
declareDefaults() + - Method in class org.iot.dsa.dslink.DSLink
+
+
Adds the save action, overrides should call super if they want this + action. +
+
+
declareDefaults() + - Method in class org.iot.dsa.node.DSNode
+
+
The is only called once for each class.
+
+
decode(String) - + Static method in class org.iot.dsa.io.DSBase64
+
+
Decodes a base 64 encoded string.
+
+
decode(DSIReader) + - Static method in class org.iot.dsa.io.NodeDecoder +
+
+
Reads a node tree from the given input.
+
+
decode(String) - + Static method in class org.iot.dsa.node.DSBytes
+
 
+
decode() + - Method in class org.iot.dsa.security.DSPasswordAes +
+
+
Returns the decrypted password.
+
+
decode(String) - + Static method in class org.iot.dsa.time.DSTime
+
+
This is a convenience that uses reuses and recycles a calendar instance to + get the time in + millis. +
+
+
decode(String, Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Converts a DSA encoded timestamp into a Java Calendar.
+
+
decodeKeys(String) + - Static method in class org.iot.dsa.security.DSKeys +
+
+
Decodes an instance that was encoded with encodeKeys().
+
+
decodePath(String) + - Static method in class org.iot.dsa.node.DSPath
+
+
Splits the path and decodes each individual name.
+
+
decodePathName(String) + - Static method in class org.iot.dsa.node.DSPath
+
+
Un-escapes a name.
+
+
decodePrivate(byte[]) + - Static method in class org.iot.dsa.security.DSKeys +
+
+
Decodes the X9.63 encoding of a public key.
+
+
decodePublic(byte[]) + - Static method in class org.iot.dsa.security.DSKeys +
+
+
Decodes the X9.63 encoding of a public key.
+
+
decodeState(DSElement) + - Method in class org.iot.dsa.node.DSInfo
+
 
+
DEFAULT - + Static variable in class org.iot.dsa.dslink.requester.SimpleRequestHandler
+
+
An instance that can be used for those requests where the callbacks don't + really matter. +
+
+
DEFAULT - Static variable in + class org.iot.dsa.node.action.DSAction
+
+
Use this when you have no-arg, no-return actions.
+
+
DEFAULT + - Static variable in class org.iot.dsa.node.DSMetadata +
+
 
+
DEFAULT_BACKUP_THRESHOLD + - Static variable in class org.iot.dsa.logging.DSLogging +
+
+
This is the threshold, not a hard limit: 10 megs by default.
+
+
DEFAULT_MAX_BACKUPS + - Static variable in class org.iot.dsa.logging.DSLogging +
+
+
The default number of backups to retain: 10 by default.
+
+
DEFAULT_MAX_QUEUE + - Static variable in class org.iot.dsa.logging.DSLogging +
+
+
Max async queue size: 2500 by default.
+
+
DESCRIPTION + - Static variable in class org.iot.dsa.node.DSMetadata +
+
 
+
DISABLED + - Static variable in class org.iot.dsa.node.DSStatus +
+
+
Bad, the object has been disabled within DSA.
+
+
disabled + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
DISABLED_STR + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
disconnect() - + Method in class org.iot.dsa.dslink.DSLinkConnection +
+
+
Forcefully closes an open connection.
+
+
DISPLAY_NAME + - Static variable in class org.iot.dsa.node.DSMetadata +
+
 
+
DOWN - + Static variable in class org.iot.dsa.node.DSStatus +
+
+
Bad, communications are down within DSA.
+
+
down - + Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
DOWN_STR + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
DSAction - + Class in org.iot.dsa.node.action +
+
+
Fully describes an action and routes invocations to DSNode.onInvoke.
+
+
DSAction() + - Constructor for class org.iot.dsa.node.action.DSAction +
+
 
+
DSBase64 - Class in org.iot.dsa.io
+
+
Thread-safe Base64 encoder and decoder.
+
+
DSBase64() - Constructor for class + org.iot.dsa.io.DSBase64
+
 
+
DSBool - Class in org.iot.dsa.node
+
+
Represents a boolean value.
+
+
DSBytes - Class in org.iot.dsa.node
+
+
Byte array that gets encoded as a base64 string.
+
+
DSDateTime - Class in org.iot.dsa.time
+
+
Wrapper for Java time.
+
+
DSDouble - Class in org.iot.dsa.node
+
+
A 64 bit floating point (Java double).
+
+
DSElement - Class in org.iot.dsa.node
+
+
The primitives of the node model.
+
+
DSElement() + - Constructor for class org.iot.dsa.node.DSElement +
+
 
+
DSElementType - Enum in org.iot.dsa.node
+
+
The core set of elements that translate directly to a JSON type.
+
+
DSException - Exception in org.iot.dsa.util
+
+
An runtime exception that forwards most calls to the inner exception.
+
+
DSException(Throwable) + - Constructor for exception org.iot.dsa.util.DSException +
+
 
+
DSFlexEnum - Class in org.iot.dsa.node
+
+
An enum where the value and range can be created at runtime, primarily + intended for defining + action parameters. +
+
+
DSFloat - Class in org.iot.dsa.node
+
+
A Java float.
+
+
DSGroup - Class in org.iot.dsa.node
+
+
An index accessible collection of primitives.
+
+
DSGroup() + - Constructor for class org.iot.dsa.node.DSGroup
+
 
+
DSIBoolean - Interface in org.iot.dsa.node
+
+
Indicates something that is/has a boolean value.
+
+
DSIEnum - Interface in org.iot.dsa.node
+
+
DSA Enum mapping.
+
+
DSIEvent - Interface in org.iot.dsa.node.event
+
+
This is an empty interface, DSTopics are allowed to define events however + they wish. +
+
+
DSIMetadata - Interface in org.iot.dsa.node
+
+
Nodes and values can implement this to provide meta-data about + themselves. +
+
+
DSInfo - Class in org.iot.dsa.node
+
+
All node children have corresponding DSInfo instances.
+
+
DSInfoTopic + - Class in org.iot.dsa.node.event +
+
+
This topic is for info related events on DSNodes.
+
+
DSInfoTopic.Event - Enum in org.iot.dsa.node.event
+
+
The possible events for this topic.
+
+
DSInt - Class in org.iot.dsa.node
+
+
A Java int.
+
+
DSInterval - Enum in org.iot.dsa.time
+
+
Enum representing periods of time.
+
+
DSINumber - Interface in org.iot.dsa.node
+
+
Indicates something that is/has a numeric value.
+
+
DSInvalidPathException - Exception in org.iot.dsa.dslink
+
+
Indicates a request path was invalid.
+
+
DSInvalidPathException(String) + - Constructor for exception org.iot.dsa.dslink.DSInvalidPathException +
+
 
+
DSIObject - Interface in org.iot.dsa.node
+
+
Super class of anything found in the node tree.
+
+
DSIPassword - Interface in org.iot.dsa.security
+
+
Defines the api for verifying passwords.
+
+
DSIReader - Interface in org.iot.dsa.io
+
+
A decoder that can be used to get an entire graph in pieces, or one large + group, or somewhere in + between. +
+
+
DSIReader.Token - Enum in org.iot.dsa.io
+
+
Represents the state of the reader, and determines which getter should be + called next. +
+
+
DSIRequester - Interface in org.iot.dsa.dslink
+
+
Interface for submitting outbound requests.
+
+
DSIResponder - Interface in org.iot.dsa.dslink
+
+
Interface for nodes in the node tree to manually handle requests.
+
+
DSIStatus - Interface in org.iot.dsa.node
+
+
Indicates something that is/has a quality.
+
+
DSIStorable - Interface in org.iot.dsa.node
+
+
Enables custom serialization for non-node values in the configuration + database. +
+
+
DSISubscriber - Interface in org.iot.dsa.node.event
+
+
DSISubscribers subscribe to DSTopics on DSNodes.
+
+
DSIValue - Interface in org.iot.dsa.node
+
+
How data values are represented in the node tree.
+
+
DSIWriter - Interface in org.iot.dsa.io
+
+
An encoder that can be used to encode large graphs with or without object + instances. +
+
+
DSJavaEnum - Class in org.iot.dsa.node
+
+
Wrapper for Java enums.
+
+
DSKeys - Class in org.iot.dsa.security
+
+
DSA public private key pair.
+
+
DSKeys(File) - + Constructor for class org.iot.dsa.security.DSKeys +
+
+
Creates a DSKeys object by decoding existing keys from the given file. +
+
+
DSKeys(KeyPair) + - Constructor for class org.iot.dsa.security.DSKeys +
+
+
Creates a DSKeys object for an existing key pair.
+
+
DSKeys.Signer + - Class in org.iot.dsa.security
+
+
Signs bytes.
+
+
DSKeys.Verifier - Class in org.iot.dsa.security
+
+
Verifies signatures.
+
+
DSLink - Class in org.iot.dsa.dslink
+
+
Represents an upstream connection, a node tree, and manages the lifecycle + of both. +
+
+
DSLink() + - Constructor for class org.iot.dsa.dslink.DSLink +
+
+
Use the load method to create links.
+
+
DSLinkConfig - Class in org.iot.dsa.dslink
+
+
Configuration options for starting a link.
+
+
DSLinkConfig() + - Constructor for class org.iot.dsa.dslink.DSLinkConfig +
+
+
This will create an empty unvalidated getConfig.
+
+
DSLinkConfig(File) + - Constructor for class org.iot.dsa.dslink.DSLinkConfig +
+
+
Can be use to change the working dir from the default process working + dir. +
+
+
DSLinkConfig(String) + - Constructor for class org.iot.dsa.dslink.DSLinkConfig +
+
+
Constructor for simulating a command line invocation, the argument will be + split on the space + character. +
+
+
DSLinkConfig(String[]) + - Constructor for class org.iot.dsa.dslink.DSLinkConfig +
+
+
Constructor for the arguments pass to a main method.
+
+
DSLinkConnection - Class in org.iot.dsa.dslink
+
+
Represents an upstream connection with a broker.
+
+
DSLinkConnection() + - Constructor for class org.iot.dsa.dslink.DSLinkConnection +
+
 
+
DSLinkConnection.Listener + - Interface in org.iot.dsa.dslink
+
+
Intended for requester functionality so that requesters can know when to + start and stop making requests. +
+
+
DSList - Class in org.iot.dsa.node
+
+
Indexed collection of elements.
+
+
DSList() - Constructor for class + org.iot.dsa.node.DSList +
+
 
+
DSLogger - Class in org.iot.dsa.logging
+
+
Adds a convenience layer to Java Util Logging.
+
+
DSLogger() + - Constructor for class org.iot.dsa.logging.DSLogger +
+
 
+
DSLogging - Class in org.iot.dsa.logging
+
+
Static utilities for configuring the logging subsystem.
+
+
DSLong - Class in org.iot.dsa.node
+
+
A 64 bit integer (a Java long).
+
+
DSMainNode - Class in org.iot.dsa.dslink
+
+
The root DSNode that triggers a link's custom functionality .
+
+
DSMainNode() + - Constructor for class org.iot.dsa.dslink.DSMainNode +
+
 
+
DSMap - Class in org.iot.dsa.node
+
+
String keyed collection of elements that preserves the order of addition. +
+
+
DSMap() - Constructor for class + org.iot.dsa.node.DSMap
+
 
+
DSMap.Entry - Class in org.iot.dsa.node
+
+
Allows values to be accessed quickly by index in the list, rather than + having to do a key + lookup in the map. +
+
+
DSMetadata - Class in org.iot.dsa.node
+
+
Utility fon constructing metadata maps.
+
+
DSMetadata() + - Constructor for class org.iot.dsa.node.DSMetadata +
+
 
+
DSMetadata(DSMap) + - Constructor for class org.iot.dsa.node.DSMetadata +
+
 
+
DSNode - Class in org.iot.dsa.node
+
+
The organizational unit of the node tree.
+
+
DSNode() - Constructor for class + org.iot.dsa.node.DSNode +
+
 
+
DSNull - Class in org.iot.dsa.node
+
+
Try not to use, it is for decoding raw json.
+
+
DSPasswordAes + - Class in org.iot.dsa.security
+
+
Stores an encrypted password which can be decrypted.
+
+
DSPasswordSha256 + - Class in org.iot.dsa.security
+
+
Stores and verifies passwords using a SHA-256 hash of the text.
+
+
DSPath - Class in org.iot.dsa.node
+
+
Represents a path in the node tree.
+
+
DSPath(String) - + Constructor for class org.iot.dsa.node.DSPath
+
 
+
DSPermission - Enum in org.iot.dsa.security
+
+
Used to define the required permissions for various objects.
+
+
DSPermissionException - Exception in org.iot.dsa.dslink
+
+
Indicates a request has insufficient permissions.
+
+
DSPermissionException(String) + - Constructor for exception org.iot.dsa.dslink.DSPermissionException +
+
 
+
DSRegistry - Class in org.iot.dsa.node
+
+
Static type related meta-data.
+
+
DSRegistry() + - Constructor for class org.iot.dsa.node.DSRegistry +
+
 
+
DSRequestException + - Exception in org.iot.dsa.dslink
+
+
Indicates something was wrong with a request.
+
+
DSRequestException() + - Constructor for exception org.iot.dsa.dslink.DSRequestException +
+
 
+
DSRequestException(String) + - Constructor for exception org.iot.dsa.dslink.DSRequestException +
+
 
+
DSRuntime - Class in org.iot.dsa
+
+
DSA thread pool and timers.
+
+
DSRuntime.Timer - Class in org.iot.dsa
+
+
Can be used to inspect and cancel tasks passed to the run methods in + DSRuntime. +
+
+
DSStatus - Class in org.iot.dsa.node
+
+
Represent the health, quality or condition of an object.
+
+
DSString - Class in org.iot.dsa.node
+
+
String wrapper.
+
+
DSTime - Class in org.iot.dsa.time
+
+
Misc time utility functions.
+
+
DSTopic - Class in org.iot.dsa.node.event
+
+
DSISubscribers subscribe to DSTopics on DSNodes.
+
+
DSTopic() + - Constructor for class org.iot.dsa.node.event.DSTopic +
+
 
+
DSUtil - Class in org.iot.dsa.util
+
+
Common utilities.
+
+
DSValue - Class in org.iot.dsa.node
+
+
A convenience that provides some common default behavior.
+
+
DSValue() + - Constructor for class org.iot.dsa.node.DSValue
+
 
+
DSValueNode - Class in org.iot.dsa.node
+
+
A convenience implementation of a node that is also a value.
+
+
DSValueNode() + - Constructor for class org.iot.dsa.node.DSValueNode +
+
 
+
DSValueTopic - Class in org.iot.dsa.node.event
+
+
This topic is for change of value events on DSNodes.
+
+
DSValueTopic.Event - Enum in org.iot.dsa.node.event
+
+
The possible events from this topic.
+
+
DSValueType - Enum in org.iot.dsa.node
+
+
These are the primitive types in the DSA protocol.
+
+
+ + + +

E

+
+
EDITOR - Static variable in class + org.iot.dsa.node.DSMetadata +
+
 
+
EMPTY + - Static variable in class org.iot.dsa.node.DSString +
+
+
The string of length 0.
+
+
encode(byte[]) + - Static method in class org.iot.dsa.io.DSBase64
+
+
Encodes the bytes into a single line string with no padding.
+
+
encode(byte[], int) + - Static method in class org.iot.dsa.io.DSBase64
+
+
Encodes the buffer into a String with the given line length.
+
+
encode(DSIWriter, DSNode) + - Static method in class org.iot.dsa.io.NodeEncoder +
+
+
Writes the node tree to the given writer.
+
+
encode(byte[]) + - Static method in class org.iot.dsa.node.DSBytes +
+
 
+
encode(byte[]) - + Static method in class org.iot.dsa.security.DSPasswordAes +
+
+
Encrypts the given bytes.
+
+
encode(String) + - Static method in class org.iot.dsa.security.DSPasswordAes +
+
+
Encrypts the given text.
+
+
encode(byte[]) - + Static method in class org.iot.dsa.security.DSPasswordSha256 +
+
+
SHA-256 hash of the bytes encoded as url safe base 64..
+
+
encode(String) + - Static method in class org.iot.dsa.security.DSPasswordSha256 +
+
+
SHA-256 hash of the UTF-8 bytes, encoded as url safe base 64..
+
+
encode(long, boolean) + - Static method in class org.iot.dsa.time.DSTime
+
+
Converts a Java Calendar into a DSA encoded timestamp.
+
+
encode(long, boolean, StringBuilder) + - Static method in class org.iot.dsa.time.DSTime
+
+
Converts a Java Calendar into a DSA encoded timestamp.
+
+
encode(Calendar, boolean, StringBuilder) + - Static method in class org.iot.dsa.time.DSTime
+
+
Converts a Java Calendar into a DSA encoded timestamp.
+
+
encodeForFiles(Calendar, StringBuilder) + - Static method in class org.iot.dsa.time.DSTime
+
+
Converts a Java Calendar into a number safe for file names: YYMMDDHHMMSS. +
+
+
encodeForLogs(Calendar, StringBuilder) + - Static method in class org.iot.dsa.time.DSTime
+
+
Converts a Java Calendar into a shorter human readable timestamp for use in + logging files. +
+
+
encodeKeys() + - Method in class org.iot.dsa.security.DSKeys +
+
+
Encodes the key pair which can be then decoded with decodeKeys().
+
+
encodeName(String) + - Static method in class org.iot.dsa.node.DSPath
+
+
Encodes a name for being in a path.
+
+
encodeName(String, StringBuilder) + - Static method in class org.iot.dsa.node.DSPath
+
+
Encodes a name for being in a path.
+
+
encodePath(DSNode) + - Static method in class org.iot.dsa.node.DSPath
+
+
Ascends the tree and encodes all the node names into a path.
+
+
encodePublic() + - Method in class org.iot.dsa.security.DSKeys +
+
+
X9.63 encoding of the public key.
+
+
encodePublicHashDsId() + - Method in class org.iot.dsa.security.DSKeys +
+
+
Base64 encoding (no padding and url safe) of the SHA256 hash of the public + key. +
+
+
encodeState() + - Method in class org.iot.dsa.node.DSInfo
+
 
+
encodeUrl(byte[]) + - Static method in class org.iot.dsa.io.DSBase64
+
+
Encodes to a URL safe base64 string.
+
+
endList() + - Method in class org.iot.dsa.io.AbstractWriter
+
 
+
endList() + - Method in interface org.iot.dsa.io.DSIWriter
+
+
End the current list.
+
+
endMap() - Method in class + org.iot.dsa.io.AbstractWriter +
+
 
+
endMap() - Method in interface + org.iot.dsa.io.DSIWriter +
+
+
End the current map.
+
+
ENUM_RANGE + - Static variable in class org.iot.dsa.node.DSMetadata +
+
 
+
equal(Object, Object) + - Static method in class org.iot.dsa.util.DSUtil
+
+
Comparison that takes null into account; null == null.
+
+
equals(Object) - + Method in class org.iot.dsa.node.DSBool
+
 
+
equals(Object) - + Method in class org.iot.dsa.node.DSBytes
+
+
True if the argument is a DSINumber and the values are equal or they are + both isNull. +
+
+
equals(Object) - + Method in class org.iot.dsa.node.DSDouble
+
+
True if the argument is a DSINumber and the values are equal or they are + both isNull. +
+
+
equals(Object) - + Method in class org.iot.dsa.node.DSFlexEnum
+
+
True if the argument is a DSFlexEnum and the values are equal or they are + both isNull. +
+
+
equals(Object) - + Method in class org.iot.dsa.node.DSFloat
+
+
True if the argument is a DSINumber and the values are equal or they are + both isNull. +
+
+
equals(Object) - + Method in class org.iot.dsa.node.DSGroup
+
 
+
equals(Object) - + Method in class org.iot.dsa.node.DSInfo
+
 
+
equals(Object) + - Method in class org.iot.dsa.node.DSInt
+
+
True if the argument is a DSINumber and the values are equal or they are + both isNull. +
+
+
equals(Object) - + Method in class org.iot.dsa.node.DSJavaEnum
+
+
True if the argument is a DSDynamicEnum and the values are equal or they + are both isNull. +
+
+
equals(Object) - + Method in class org.iot.dsa.node.DSLong
+
+
True if the argument is a DSINumber and the values are equal or they are + both isNull. +
+
+
equals(Object) + - Method in class org.iot.dsa.node.DSMap.Entry
+
 
+
equals(Object) + - Method in class org.iot.dsa.node.DSMap
+
 
+
equals(Object) - + Method in class org.iot.dsa.node.DSNull
+
+
True of the arg == this.
+
+
equals(Object) - + Method in class org.iot.dsa.node.DSStatus
+
 
+
equals(Object) - + Method in class org.iot.dsa.node.DSString
+
 
+
equals(Object) + - Method in class org.iot.dsa.security.DSPasswordAes +
+
 
+
equals(Object) + - Method in class org.iot.dsa.security.DSPasswordSha256 +
+
 
+
equals(Object) - + Method in class org.iot.dsa.time.DSDateTime
+
 
+
equalsDefault() + - Method in class org.iot.dsa.node.DSInfo
+
+
True if this proxies a default and the state and value match the default. +
+
+
equalsDefaultState() + - Method in class org.iot.dsa.node.DSInfo
+
+
True if the state matches the default state.
+
+
equalsDefaultType() + - Method in class org.iot.dsa.node.DSInfo
+
+
True if this proxies a default and the value type matches the default. +
+
+
equalsDefaultValue() + - Method in class org.iot.dsa.node.DSInfo
+
+
True if this proxies a default and the value matches the default.
+
+
+ + + +

F

+
+
FALSE - + Static variable in class org.iot.dsa.node.DSBool
+
 
+
FAULT + - Static variable in class org.iot.dsa.node.DSStatus +
+
+
Bad, an operational error (exception) has occurred within DSA.
+
+
fault + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
FAULT_STR - Static variable in + class org.iot.dsa.node.DSStatus
+
 
+
FileLogHandler - Class in org.iot.dsa.logging
+
+
Logs records to a file.
+
+
fine() - Method in class + org.iot.dsa.logging.DSLogger
+
+
True if the level is loggable.
+
+
fine(Object) - + Method in class org.iot.dsa.logging.DSLogger
+
+
Log a frequent event.
+
+
fine(Object, Throwable) + - Method in class org.iot.dsa.logging.DSLogger +
+
+
Log a frequent event.
+
+
finer() + - Method in class org.iot.dsa.logging.DSLogger +
+
+
True if the level is loggable.
+
+
finer(Object) - + Method in class org.iot.dsa.logging.DSLogger
+
+
Log a debug event.
+
+
finer(Object, Throwable) + - Method in class org.iot.dsa.logging.DSLogger +
+
+
Log a debug event.
+
+
finest() - Method in class + org.iot.dsa.logging.DSLogger
+
+
True if the level is loggable.
+
+
finest(Object) + - Method in class org.iot.dsa.logging.DSLogger +
+
+
Log a trace or verbose event.
+
+
finest(Object, Throwable) + - Method in class org.iot.dsa.logging.DSLogger +
+
+
Log a trace or verbose event.
+
+
fire(DSTopic, DSIEvent, DSInfo) + - Method in class org.iot.dsa.node.DSNode
+
+
Notifies subscribers of the event.
+
+
fire(DSTopic, DSIEvent, DSInfo, Object...) + - Method in class org.iot.dsa.node.DSNode
+
+
Notifies subscribers of the event.
+
+
first() - Method in class + org.iot.dsa.node.DSGroup +
+
+
Returns the item at index 0.
+
+
flush() - Method in interface + org.iot.dsa.io.DSIWriter +
+
+
Flush the stream.
+
+
flush() - Method in class + org.iot.dsa.io.json.JsonAppender
+
 
+
flush() - Method in class + org.iot.dsa.io.json.JsonWriter
+
 
+
flush() + - Method in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
+
Does nothing.
+
+
flush() + - Method in class org.iot.dsa.logging.AsyncLogHandler +
+
 
+
forString(String) + - Static method in enum org.iot.dsa.security.DSPermission +
+
 
+
+ + + +

G

+
+
generateHmacSHA256Signature(byte[], byte[]) + - Static method in class org.iot.dsa.security.DSKeys +
+
 
+
generateSharedSecret(byte[]) + - Method in class org.iot.dsa.security.DSKeys +
+
+
Uses the given public key to generate an ECDH shared secret.
+
+
generateSharedSecret(String) + - Method in class org.iot.dsa.security.DSKeys +
+
+
Uses the given public key to generate an ECDH shared secret.
+
+
get(int) - Method in class + org.iot.dsa.node.DSGroup +
+
+
Returns the value at the given index.
+
+
get(int, boolean) + - Method in class org.iot.dsa.node.DSGroup
+
+
Optional getter.
+
+
get(int, double) + - Method in class org.iot.dsa.node.DSGroup
+
+
Optional getter.
+
+
get(int, int) + - Method in class org.iot.dsa.node.DSGroup
+
+
Optional getter.
+
+
get(int, long) + - Method in class org.iot.dsa.node.DSGroup
+
+
Optional getter.
+
+
get(int, String) - + Method in class org.iot.dsa.node.DSGroup
+
+
Optional getter.
+
+
get(int) - Method in class + org.iot.dsa.node.DSList +
+
 
+
get(int) - Method in class + org.iot.dsa.node.DSMap
+
 
+
get(String) + - Method in class org.iot.dsa.node.DSMap
+
+
Returns the value for the given key.
+
+
get(String, boolean) + - Method in class org.iot.dsa.node.DSMap
+
+
Optional getter, returns the provided default if the value mapped to the + key is null or not + convertible. +
+
+
get(String, double) + - Method in class org.iot.dsa.node.DSMap
+
+
Optional getter, returns the provided default if the value mapped to the + key is null. +
+
+
get(String, int) - + Method in class org.iot.dsa.node.DSMap
+
+
Optional getter, returns the provided default if the value mapped to the + key is null or not + convertible. +
+
+
get(String, long) - + Method in class org.iot.dsa.node.DSMap
+
+
Optional getter, returns the provided default if the value mapped to the + key is null or not + convertible. +
+
+
get(String, String) + - Method in class org.iot.dsa.node.DSMap
+
+
Optional getter, returns the provided default if the value mapped to the + key is null. +
+
+
get(String) + - Method in class org.iot.dsa.node.DSNode
+
+
Returns the child value with the given name, or null.
+
+
getAction() - + Method in interface org.iot.dsa.dslink.responder.ApiObject
+
+
The action, should only be called if isAction() returns true.
+
+
getAction() - Method + in interface org.iot.dsa.node.action.ActionResult +
+
+
The action that was invoked.
+
+
getAction() - Method in class + org.iot.dsa.node.DSInfo +
+
 
+
getBackups() + - Method in class org.iot.dsa.logging.FileLogHandler +
+
+
Backup files for this logging, found in the same directory as the active + logging. +
+
+
getBit(int, int) + - Static method in class org.iot.dsa.util.DSUtil
+
+
Returns true if the bit at the given index is set.
+
+
getBoolean() + - Method in class org.iot.dsa.io.AbstractReader
+
 
+
getBoolean() + - Method in interface org.iot.dsa.io.DSIReader
+
+
Returns the value when last() == BOOLEAN.
+
+
getBoolean(int) + - Method in class org.iot.dsa.node.DSGroup
+
+
Primitive getter.
+
+
getBoolean(String) + - Method in class org.iot.dsa.node.DSMap
+
+
Primitive getter.
+
+
getBooleanRange() + - Method in class org.iot.dsa.node.DSMetadata
+
+
The boolean range, or null.
+
+
getBrokerUri() + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
If not set, will look for the getConfig in dslink.json.
+
+
getBytes() + - Method in class org.iot.dsa.io.AbstractReader
+
 
+
getBytes() - Method in interface + org.iot.dsa.io.DSIReader +
+
+
Returns the value when last() == BYTES.
+
+
getBytes() - Method in class + org.iot.dsa.node.DSBytes +
+
+
The raw bytes, do not modify.
+
+
getCalendar() + - Static method in class org.iot.dsa.time.DSTime
+
+
Attempts to reuse a calendar instance, the timezone will be set to + TimeZone.getDefault(). +
+
+
getCalendar(long) + - Static method in class org.iot.dsa.time.DSTime
+
+
Attempts to reuse a calendar instance and sets the time in millis to the + argument and the + timezone to TimeZone.getDefault(). +
+
+
getCause() + - Method in exception org.iot.dsa.util.DSException +
+
 
+
getChildren() - + Method in interface org.iot.dsa.dslink.responder.ApiObject
+
+
Iterator of child objects, should only be called if hasChildren() returns + true. +
+
+
getChildren() + - Method in class org.iot.dsa.node.DSInfo
+
 
+
getColumns() - + Method in interface org.iot.dsa.node.action.ActionTable +
+
+
Column definitions, optional but highly recommended.
+
+
getConfig() + - Method in class org.iot.dsa.dslink.DSLink
+
 
+
getConfig(String, boolean) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Looks for the value in dslink.json and if not found, returns the + fallback. +
+
+
getConfig(String, double) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Looks for the value in dslink.json and if not found, returns the + fallback. +
+
+
getConfig(String, int) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Looks for the value in dslink.json and if not found, returns the + fallback. +
+
+
getConfig(String, long) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Looks for the value in dslink.json and if not found, returns the + fallback. +
+
+
getConfig(String, String) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Looks for the value in dslink.json and if not found, returns the + fallback. +
+
+
getConnection() + - Method in class org.iot.dsa.dslink.DSLink
+
 
+
getConnectionId() + - Method in class org.iot.dsa.dslink.DSLinkConnection +
+
+
A unique descriptive tag such as a combination of the link name and the + broker host. +
+
+
getDecimalPlaces() + - Method in class org.iot.dsa.node.DSMetadata
+
+
The decimal precision or null.
+
+
getDecoder(Class) + - Static method in class org.iot.dsa.node.DSRegistry +
+
+
The instance to use for decoding.
+
+
getDefault() + - Method in class org.iot.dsa.node.DSMetadata
+
+
The default value for an action parameter, or null.
+
+
getDefaultLogger() - + Static method in class org.iot.dsa.logging.DSLogging +
+
+
The default logger.
+
+
getDefaultObject() + - Method in class org.iot.dsa.node.DSInfo
+
+
If this represents a dynamic child, this just returns the current value. +
+
+
getDepth() + - Method in class org.iot.dsa.io.AbstractWriter
+
+
Current depth in the tree, will be needed by writeNewLineIndent.
+
+
getDescription() + - Method in class org.iot.dsa.node.DSMetadata
+
+
The description, or null.
+
+
getDetail() - + Method in exception org.iot.dsa.dslink.DSRequestException +
+
+
Additional information to supply to the remote endpoint.
+
+
getDisplayName() + - Method in class org.iot.dsa.node.DSMetadata
+
+
The alternate display name, or null.
+
+
getDouble() + - Method in class org.iot.dsa.io.AbstractReader
+
 
+
getDouble() - Method in + interface org.iot.dsa.io.DSIReader
+
+
Returns the value when last() == DOUBLE.
+
+
getDouble(int) + - Method in class org.iot.dsa.node.DSGroup
+
+
Primitive getter.
+
+
getDouble(String) + - Method in class org.iot.dsa.node.DSMap
+
+
Primitive getter.
+
+
getDsId() - Method in class + org.iot.dsa.dslink.DSLink
+
+
Returns the unique id of the connection.
+
+
getDslinkJson() + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
If not set, this will attempt to open dslink.json in the working the + process directory. +
+
+
getEditor() + - Method in class org.iot.dsa.node.DSMetadata
+
+
The editor, or null.
+
+
getElement() + - Method in class org.iot.dsa.io.AbstractReader
+
 
+
getElement() + - Method in interface org.iot.dsa.io.DSIReader
+
+
Returns the DSElement when last() == raw type or ROOT.
+
+
getElement() + - Method in class org.iot.dsa.node.DSInfo
+
+
A convenience that casts getObject().
+
+
getElement(String) + - Method in class org.iot.dsa.node.DSNode
+
+
A convenience for (DSElement) get(name).
+
+
getElementType() + - Method in class org.iot.dsa.node.DSBool
+
 
+
getElementType() + - Method in class org.iot.dsa.node.DSBytes
+
 
+
getElementType() + - Method in class org.iot.dsa.node.DSDouble
+
 
+
getElementType() + - Method in class org.iot.dsa.node.DSElement
+
+
For switch statements.
+
+
getElementType() + - Method in class org.iot.dsa.node.DSList
+
 
+
getElementType() + - Method in class org.iot.dsa.node.DSLong
+
 
+
getElementType() + - Method in class org.iot.dsa.node.DSMap
+
 
+
getElementType() + - Method in class org.iot.dsa.node.DSNull
+
 
+
getElementType() + - Method in class org.iot.dsa.node.DSString
+
 
+
getEntry(int) + - Method in class org.iot.dsa.node.DSMap
+
 
+
getEntry(String) - + Method in class org.iot.dsa.node.DSMap
+
 
+
getEnumRange() + - Method in class org.iot.dsa.node.DSMetadata
+
+
The editor, or null.
+
+
getEnums(DSList) + - Method in class org.iot.dsa.node.DSFlexEnum
+
 
+
getEnums(DSList) + - Method in interface org.iot.dsa.node.DSIEnum +
+
+
Adds the range of possible values to the given bucket.
+
+
getEnums(DSList) + - Method in class org.iot.dsa.node.DSJavaEnum
+
 
+
getFirst() - Method in class + org.iot.dsa.node.DSNode +
+
+
The first child, or null.
+
+
getFirstInfo() + - Method in class org.iot.dsa.node.DSNode
+
+
The first child info, or null.
+
+
getFirstNodeInfo() + - Method in class org.iot.dsa.node.DSNode
+
+
The info for the first child node, or null.
+
+
getFloat(int) + - Method in class org.iot.dsa.node.DSGroup
+
+
Primitive getter.
+
+
getHandler(File) + - Static method in class org.iot.dsa.logging.FileLogHandler +
+
+
Will return an existing handler for the given file, or create a new one. +
+
+
getHelpText() + - Static method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Help text for command line options.
+
+
getHouseKeepingIntervalMillis() + - Method in class org.iot.dsa.logging.AsyncLogHandler +
+
+
Ten seconds by default, this is a guideline more than anything else.
+
+
getInfo() + - Method in class org.iot.dsa.node.DSNode
+
+
DSInfo for this node in its parent, or null if un-parented.
+
+
getInfo(String) - + Method in class org.iot.dsa.node.DSNode
+
+
Returns the info for the child with the given name, or null.
+
+
getInt(int) - Method in class + org.iot.dsa.node.DSGroup +
+
+
Primitive getter.
+
+
getInt(String) + - Method in class org.iot.dsa.node.DSMap
+
+
Primitive getter.
+
+
getInterval() + - Method in class org.iot.dsa.DSRuntime.Timer
+
+
The interval between runs, zero or less for no interval.
+
+
getKey() - Method in class + org.iot.dsa.node.DSMap.Entry
+
 
+
getKey(int) - Method in class + org.iot.dsa.node.DSMap
+
+
Returns the key at the given index.
+
+
getKeys() - Method in class + org.iot.dsa.dslink.DSLink
+
+
Public / private keys of the link, used to prove identity with brokers. +
+
+
getKeys() + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
If not set, will attempt to use the getConfig in dslink.json and fall back + to '.key' in the + process directory if necessary. +
+
+
getKeys() - Method in class + org.iot.dsa.security.DSKeys
+
+
The public and private keys.
+
+
getLast() + - Method in class org.iot.dsa.node.DSNode
+
+
The last child, or null.
+
+
getLastInfo() + - Method in class org.iot.dsa.node.DSNode
+
+
The last child info, or null.
+
+
getLastPathElement() + - Method in class org.iot.dsa.node.DSPath
+
 
+
getLevel() + - Method in enum org.iot.dsa.security.DSPermission +
+
 
+
getLink() + - Method in class org.iot.dsa.dslink.DSLinkConnection +
+
+
The link using this connection.
+
+
getLink() + - Method in class org.iot.dsa.dslink.DSMainNode +
+
+
The parent link or null.
+
+
getLinkName() + - Method in class org.iot.dsa.dslink.DSLink
+
+
As defined in dslink.json.
+
+
getLinkName() + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
 
+
getList() + - Method in class org.iot.dsa.io.AbstractReader
+
 
+
getList() + - Method in interface org.iot.dsa.io.DSIReader
+
+
This should only be called when last() == BEGIN_LIST and it will decodeKeys + the entire + list. +
+
+
getList(int) + - Method in class org.iot.dsa.node.DSGroup
+
+
Primitive getter.
+
+
getList(String) - + Method in class org.iot.dsa.node.DSMap
+
+
Return the list, or null.
+
+
getLocalizedMessage() + - Method in exception org.iot.dsa.util.DSException +
+
 
+
getLogFile() + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
 
+
getLogger() + - Method in class org.iot.dsa.dslink.DSLink
+
+
The logger as defined in dslink.json.
+
+
getLogger() + - Method in class org.iot.dsa.dslink.DSLinkConnection +
+
 
+
getLogger(String) + - Method in class org.iot.dsa.dslink.DSMainNode +
+
+
Creates a child logger of the link.
+
+
getLogger() + - Method in class org.iot.dsa.logging.DSLogger +
+
+
Override point, returns the console logger by default.
+
+
getLogger(String, File) + - Static method in class org.iot.dsa.logging.DSLogging +
+
+
Adds a FileLogHandler to the named logger, if there isn't one already. +
+
+
getLogger() - Method in class + org.iot.dsa.node.DSNode +
+
+
Ascends the tree until a logger is found.
+
+
getLogLevel() + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
If not set, will attempt to use the getConfig in dslink.json but fall back + to 'info' if + necessary. +
+
+
getLong() + - Method in class org.iot.dsa.io.AbstractReader
+
 
+
getLong() + - Method in interface org.iot.dsa.io.DSIReader
+
+
Returns the value when last() == LONG.
+
+
getLong(int) + - Method in class org.iot.dsa.node.DSGroup
+
+
Primitive getter.
+
+
getLong(String) - + Method in class org.iot.dsa.node.DSMap
+
+
Primitive getter.
+
+
getMain() - Method in class + org.iot.dsa.dslink.DSLink
+
+
Returns the root of the node tree.
+
+
getMainType() + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
The type of the root node.
+
+
getMap() - Method in class + org.iot.dsa.io.AbstractReader +
+
 
+
getMap() - Method in interface + org.iot.dsa.io.DSIReader +
+
+
This should only be called when last() == BEGIN_MAP and it will decodeKeys + the entire map. +
+
+
getMap(int) - Method in class + org.iot.dsa.node.DSGroup +
+
+
Primitive getter.
+
+
getMap(String) + - Method in class org.iot.dsa.node.DSMap
+
+
Returns the map value for the given key, or null.
+
+
getMap() - Method in class + org.iot.dsa.node.DSMetadata +
+
 
+
getMaxBackups() - + Method in class org.iot.dsa.logging.FileLogHandler +
+
+
The number of backup files to retain.
+
+
getMaxValue() + - Method in class org.iot.dsa.node.DSMetadata
+
+
The max value, or null.
+
+
getMessage() + - Method in exception org.iot.dsa.util.DSException +
+
 
+
getMetadata(DSMap) + - Method in interface org.iot.dsa.dslink.responder.ApiObject
+
 
+
getMetadata(DSMap) + - Method in class org.iot.dsa.node.DSFlexEnum
+
 
+
getMetadata(DSMap) + - Method in interface org.iot.dsa.node.DSIMetadata +
+
+
The entity should add any metadata about itself to the given map.
+
+
getMetadata(DSMap) + - Method in class org.iot.dsa.node.DSInfo
+
 
+
getMetadata(DSMap) + - Method in class org.iot.dsa.node.DSJavaEnum
+
 
+
getMetadata(DSInfo, DSMap) + - Static method in class org.iot.dsa.node.DSMetadata +
+
+
Fully acquires metadata about the info.
+
+
getMetadata(DSInfo, DSMap) + - Method in class org.iot.dsa.node.DSNode
+
+
Override point, add any meta data for the given info to the provided + bucket. +
+
+
getMinValue() + - Method in class org.iot.dsa.node.DSMetadata
+
+
The min value, or null.
+
+
getName() - Method + in interface org.iot.dsa.dslink.responder.ApiObject
+
+
The display name.
+
+
getName() + - Method in class org.iot.dsa.node.DSInfo
+
 
+
getName() - Method in class + org.iot.dsa.node.DSMetadata +
+
+
The name, or null.
+
+
getName() + - Method in class org.iot.dsa.node.DSNode
+
+
Returns the name of this node in its parent, or null if un-parented.
+
+
getNode() + - Method in class org.iot.dsa.node.DSInfo
+
+
A convenience that casts getObject().
+
+
getNode(String) - + Method in class org.iot.dsa.node.DSNode
+
+
A convenience for (DSNode) get(name).
+
+
getNodesFile() + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
If not set, will attempt to use the getConfig in dslink.json but fall back + to 'nodes.zip' in + the process directory if necessary. +
+
+
getObject() - Method in class + org.iot.dsa.node.DSInfo +
+
 
+
getOut() + - Method in class org.iot.dsa.logging.AsyncLogHandler +
+
+
The sink for formatted messages.
+
+
getParameters() + - Method in interface org.iot.dsa.node.action.ActionInvocation
+
+
The parameters supplied by the requester, or null.
+
+
getParameters() - + Method in interface org.iot.dsa.node.action.ActionSpec +
+
+
Returns an iterator for each parameter.
+
+
getParameters() - + Method in class org.iot.dsa.node.action.DSAction +
+
 
+
getParameters() + - Static method in class org.iot.dsa.security.DSKeys +
+
+
The AlgorithmParameterSpec for the predefined elliptic curve secp256r1. +
+
+
getParams() + - Method in class org.iot.dsa.dslink.requester.AbstractInvokeHandler
+
+
Returns the value passed to onInit.
+
+
getParent() - Method in class + org.iot.dsa.node.DSInfo +
+
 
+
getParent() - Method in class + org.iot.dsa.node.DSNode +
+
+
Returns the parent node, or null.
+
+
getPath() + - Method in class org.iot.dsa.dslink.requester.AbstractInvokeHandler
+
+
Returns the value passed to onInit.
+
+
getPath() + - Method in class org.iot.dsa.dslink.requester.AbstractListHandler
+
+
Returns the value passed to onInit.
+
+
getPath() + - Method in class org.iot.dsa.dslink.requester.AbstractSubscribeHandler
+
+
Returns the value passed to onInit.
+
+
getPath() - + Method in interface org.iot.dsa.dslink.responder.InboundRequest
+
+
The target of the request.
+
+
getPath() + - Method in class org.iot.dsa.node.DSNode
+
+
The DSA path, properly encoded.
+
+
getPath() + - Method in class org.iot.dsa.node.DSPath
+
+
The raw fully encoded path.
+
+
getPathElements() + - Method in class org.iot.dsa.node.DSPath
+
+
The individual, decoded path elements.
+
+
getPermission() + - Method in interface org.iot.dsa.dslink.responder.InboundSetRequest
+
+
The permission to set with.
+
+
getPermission() + - Method in interface org.iot.dsa.node.action.ActionInvocation
+
+
The permission level of the invoker, should be verified against the + permission level required + by the action. +
+
+
getPermission() - + Method in interface org.iot.dsa.node.action.ActionSpec +
+
+
Minimum permission level required to invoke.
+
+
getPermission() - + Method in class org.iot.dsa.node.action.DSAction +
+
 
+
getPlaceHolder() + - Method in class org.iot.dsa.node.DSMetadata
+
+
Placeholder text for text fields, or null.
+
+
getPrivateKey() + - Method in class org.iot.dsa.security.DSKeys +
+
+
A convenience that casts the private key.
+
+
getPublicKey() + - Method in class org.iot.dsa.security.DSKeys +
+
+
A convenience that casts the public key.
+
+
getQos() + - Method in class org.iot.dsa.dslink.requester.AbstractSubscribeHandler
+
+
Returns the value passed to onInit.
+
+
getRequester() - + Method in class org.iot.dsa.dslink.DSLinkConnection +
+
 
+
getRequestId() + - Method in interface org.iot.dsa.dslink.responder.InboundRequest
+
+
Unique ID of the request, or 0 for subscriptions.
+
+
getResultType() - + Method in interface org.iot.dsa.node.action.ActionSpec +
+
+
What the action returns.
+
+
getResultType() - + Method in class org.iot.dsa.node.action.DSAction +
+
 
+
getRows() + - Method in interface org.iot.dsa.node.action.ActionTable
+
+
This should return an iterator for the initial set of rows, or null if + there aren't any. +
+
+
getRunnable() + - Method in class org.iot.dsa.DSRuntime.Timer
+
+
The runnable being managed by this timer.
+
+
getSignature() - + Method in class org.iot.dsa.security.DSKeys.Signer +
+
+
The signature for all bytes passed to the update method.
+
+
getSignatureBase64() + - Method in class org.iot.dsa.security.DSKeys.Signer +
+
+
The base 64 encoding of the signature for all bytes passed to the update + method. +
+
+
getStackTrace() + - Method in exception org.iot.dsa.util.DSException +
+
 
+
getStream() + - Method in class org.iot.dsa.dslink.requester.AbstractInvokeHandler
+
+
Returns the value passed to onInit.
+
+
getStream() + - Method in class org.iot.dsa.dslink.requester.AbstractListHandler
+
+
Returns the value passed to onInit.
+
+
getStream() + - Method in class org.iot.dsa.dslink.requester.AbstractSubscribeHandler
+
+
Returns the value passed to onInit.
+
+
getString() + - Method in class org.iot.dsa.io.AbstractReader
+
 
+
getString() - Method in + interface org.iot.dsa.io.DSIReader
+
+
Returns the value when last() == STRING.
+
+
getString(int) + - Method in class org.iot.dsa.node.DSGroup
+
+
Primitive getter.
+
+
getString(String) + - Method in class org.iot.dsa.node.DSMap
+
+
Returns the String value for the given key, or null.
+
+
getSubscriptionId() + - Method in interface org.iot.dsa.dslink.responder.InboundSubscribeRequest
+
+
Unique subscription id for this path.
+
+
getTarget() + - Method in interface org.iot.dsa.dslink.responder.OutboundListResponse
+
+
The object that represents the path of the request.
+
+
getThreadName() - + Method in class org.iot.dsa.logging.AsyncLogHandler +
+
+
Used to name the thread that processes logging records.
+
+
getThreadName() - + Method in class org.iot.dsa.logging.FileLogHandler +
+
 
+
getThreadName() + - Method in class org.iot.dsa.logging.PrintStreamLogHandler +
+
 
+
getToken() + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Authentication token for the broker, this can return null.
+
+
getTransport() - + Method in class org.iot.dsa.dslink.DSLinkConnection +
+
 
+
getType() - Method in class + org.iot.dsa.node.DSMetadata +
+
+
The type for action parameters, can be used to override types in the + responder api. +
+
+
getUnit() - Method in class + org.iot.dsa.node.DSMetadata +
+
+
Value if defined, otherwise null.
+
+
getValue() - Method + in interface org.iot.dsa.dslink.responder.ApiObject
+
+
Value of the object, should only be called if isValue() returns true.
+
+
getValue() + - Method in interface org.iot.dsa.dslink.responder.InboundSetRequest
+
+
The value to set.
+
+
getValue() - Method in class + org.iot.dsa.node.DSInfo +
+
+
A convenience that casts getObject().
+
+
getValue() + - Method in class org.iot.dsa.node.DSMap.Entry
+
 
+
getValue(String) - + Method in class org.iot.dsa.node.DSNode
+
+
A convenience for (DSIValue) get(name).
+
+
getValueChild() + - Method in class org.iot.dsa.node.DSValueNode
+
+
Subclasses must store the node value in a child value and provide the info + for that child + here. +
+
+
getValueResults() + - Method in interface org.iot.dsa.node.action.ActionSpec
+
+
This is only called for the VALUES result type.
+
+
getValueResults() + - Method in class org.iot.dsa.node.action.DSAction +
+
 
+
getValues() - Method + in interface org.iot.dsa.node.action.ActionValues +
+
 
+
getValueType() + - Method in class org.iot.dsa.node.DSBool
+
 
+
getValueType() + - Method in class org.iot.dsa.node.DSBytes
+
 
+
getValueType() + - Method in class org.iot.dsa.node.DSDouble
+
 
+
getValueType() + - Method in class org.iot.dsa.node.DSElement
+
+
The DSA value type mapping.
+
+
getValueType() + - Method in class org.iot.dsa.node.DSFlexEnum
+
 
+
getValueType() + - Method in class org.iot.dsa.node.DSFloat
+
 
+
getValueType() + - Method in class org.iot.dsa.node.DSInt
+
 
+
getValueType() + - Method in interface org.iot.dsa.node.DSIValue +
+
+
The DSA type mapping.
+
+
getValueType() + - Method in class org.iot.dsa.node.DSJavaEnum
+
 
+
getValueType() + - Method in class org.iot.dsa.node.DSList
+
 
+
getValueType() + - Method in class org.iot.dsa.node.DSLong
+
 
+
getValueType() + - Method in class org.iot.dsa.node.DSMap
+
 
+
getValueType() + - Method in class org.iot.dsa.node.DSNull
+
 
+
getValueType() + - Method in class org.iot.dsa.node.DSStatus
+
+
String.
+
+
getValueType() + - Method in class org.iot.dsa.node.DSString
+
 
+
getValueType() + - Method in class org.iot.dsa.node.DSValueNode
+
 
+
getValueType() - + Method in class org.iot.dsa.security.DSPasswordAes +
+
 
+
getValueType() - + Method in class org.iot.dsa.security.DSPasswordSha256 +
+
 
+
getValueType() + - Method in class org.iot.dsa.time.DSDateTime
+
+
String.
+
+
+ + + +

H

+
+
hasChildren() - + Method in interface org.iot.dsa.dslink.responder.ApiObject
+
+
True if getChildren() can be called.
+
+
hasChildren() + - Method in class org.iot.dsa.node.DSInfo
+
 
+
hashCode() - Method in class + org.iot.dsa.node.DSBool +
+
 
+
hashCode() - Method in class + org.iot.dsa.node.DSBytes +
+
 
+
hashCode() - Method in class + org.iot.dsa.node.DSDouble +
+
 
+
hashCode() + - Method in class org.iot.dsa.node.DSFlexEnum
+
 
+
hashCode() - Method in class + org.iot.dsa.node.DSFloat +
+
 
+
hashCode() - Method in class + org.iot.dsa.node.DSGroup +
+
 
+
hashCode() - Method in class + org.iot.dsa.node.DSInfo +
+
 
+
hashCode() + - Method in class org.iot.dsa.node.DSInt
+
 
+
hashCode() + - Method in class org.iot.dsa.node.DSJavaEnum
+
 
+
hashCode() - Method in class + org.iot.dsa.node.DSLong +
+
 
+
hashCode() + - Method in class org.iot.dsa.node.DSMap.Entry
+
 
+
hashCode() + - Method in class org.iot.dsa.node.DSMap
+
 
+
hashCode() - Method in class + org.iot.dsa.node.DSStatus +
+
 
+
hashCode() - Method in class + org.iot.dsa.node.DSString +
+
 
+
hashCode() + - Method in class org.iot.dsa.security.DSPasswordAes +
+
 
+
hashCode() - Method + in class org.iot.dsa.security.DSPasswordSha256 +
+
 
+
hashCode() + - Method in class org.iot.dsa.time.DSDateTime
+
 
+
hasNext() + - Method in class org.iot.dsa.node.DSInfo
+
+
True if there is another info after this one.
+
+
houseKeeping() - + Method in class org.iot.dsa.logging.AsyncLogHandler +
+
+
Subclass hook for activities such as rolling files and cleaning up old + garbage. +
+
+
houseKeeping() - + Method in class org.iot.dsa.logging.FileLogHandler +
+
 
+
+ + + +

I

+
+
InboundInvokeRequest + - Interface in org.iot.dsa.dslink.responder +
+
+
See ActionInvocation for the real meat.
+
+
InboundListRequest + - Interface in org.iot.dsa.dslink.responder +
+
+
The details about an incoming list request passed to the responder.
+
+
InboundRequest + - Interface in org.iot.dsa.dslink.responder +
+
+
Common to all incoming requests.
+
+
InboundSetRequest + - Interface in org.iot.dsa.dslink.responder +
+
 
+
InboundSubscribeRequest + - Interface in org.iot.dsa.dslink.responder +
+
+
The details about an incoming subscribe request passed to the responder. +
+
+
indexOf(DSElement) + - Method in class org.iot.dsa.node.DSGroup
+
+
Scans the collection and returns the first index that equal the arg.
+
+
indexOf(String) - + Method in class org.iot.dsa.node.DSMap
+
+
Index of the given key, or -1.
+
+
info() - Method in class + org.iot.dsa.logging.DSLogger
+
+
True if the level is loggable.
+
+
info(Object) - + Method in class org.iot.dsa.logging.DSLogger
+
+
Log an infrequent major lifecycle event.
+
+
info(Object, Throwable) + - Method in class org.iot.dsa.logging.DSLogger +
+
+
Log an infrequent major lifecycle event.
+
+
INFO_TOPIC - Static variable in + class org.iot.dsa.node.DSNode
+
 
+
init(DSLinkConfig) + - Method in class org.iot.dsa.dslink.DSLink
+
+
Configures a link instance including creating the appropriate connection. +
+
+
initCause(Throwable) + - Method in exception org.iot.dsa.util.DSException +
+
 
+
insert(int, DSList...) + - Method in interface org.iot.dsa.node.action.ActionInvocation
+
+
Only use with open tables, insert the rows at the given index.
+
+
INSTANCE + - Static variable in class org.iot.dsa.node.event.DSInfoTopic +
+
+
The only instance of this topic.
+
+
INSTANCE + - Static variable in class org.iot.dsa.node.event.DSValueTopic +
+
+
The only instance of this topic.
+
+
invoke(String, DSMap, OutboundInvokeHandler) + - Method in interface org.iot.dsa.dslink.DSIRequester +
+
+
Submits an invoke request.
+
+
invoke(DSInfo, ActionInvocation) + - Method in class org.iot.dsa.node.action.DSAction +
+
+
Calls onInvoke on the proper node.
+
+
isAction() - Method + in interface org.iot.dsa.dslink.responder.ApiObject
+
+
True if the object is an action.
+
+
isAction() - Method in class + org.iot.dsa.node.DSInfo +
+
 
+
isAdmin() - Method + in interface org.iot.dsa.dslink.responder.ApiObject
+
+
Whether or not this object requires configuration permission to + read/write. +
+
+
isAdmin() + - Method in class org.iot.dsa.node.DSInfo
+
 
+
isBad() - Method in class + org.iot.dsa.node.DSStatus +
+
+
If any of the bad flags are set, or is null.
+
+
isBoolean() - Method in class + org.iot.dsa.node.DSBool +
+
 
+
isBoolean() + - Method in class org.iot.dsa.node.DSElement
+
+
Whether or not the object represents a boolean.
+
+
isBytes() + - Method in class org.iot.dsa.node.DSBytes
+
 
+
isBytes(String) - + Static method in class org.iot.dsa.node.DSBytes
+
+
True if the string starts with the DSA escape sequence for a base 64 + encoded string. +
+
+
isBytes() - Method in class + org.iot.dsa.node.DSElement +
+
+
Whether or not the object represents a byte array.
+
+
isCancelled() + - Method in class org.iot.dsa.DSRuntime.Timer
+
 
+
isClosed() - + Method in enum org.iot.dsa.node.action.ActionSpec.ResultType
+
+
True if CLOSED_TABLE, VOID, or VALUES.
+
+
isConfig() + - Method in enum org.iot.dsa.security.DSPermission +
+
 
+
isConfigFault() + - Method in class org.iot.dsa.node.DSStatus
+
+
True if the associate bit is set.
+
+
isConnected() - + Method in class org.iot.dsa.dslink.DSLinkConnection +
+
+
True when a connection is established with the remote endpoint.
+
+
isDefaultInstance() + - Method in class org.iot.dsa.node.DSNode
+
+
True if this is the default instance for the type.
+
+
isDefaultOnCopy() + - Method in class org.iot.dsa.node.DSInfo
+
+
Whether or not the current value, or the default value is copied.
+
+
isDisabled() + - Method in class org.iot.dsa.node.DSStatus
+
+
True if the associate bit is set.
+
+
isDouble() - Method in class + org.iot.dsa.node.DSDouble +
+
 
+
isDouble() - Method in class + org.iot.dsa.node.DSElement +
+
+
Whether or not the object represents a double.
+
+
isDouble() - Method in class + org.iot.dsa.node.DSFloat +
+
 
+
isDouble() + - Method in class org.iot.dsa.node.DSInt
+
 
+
isDouble() - Method in + interface org.iot.dsa.node.DSINumber
+
+
Whether or not the object represents a double.
+
+
isDown() + - Method in class org.iot.dsa.node.DSStatus
+
+
True if the associate bit is set.
+
+
isDynamic() - Method in class + org.iot.dsa.node.DSInfo +
+
+
Whether or not this info represents a declared default.
+
+
isEmpty() + - Method in class org.iot.dsa.node.DSGroup
+
+
Returns true when childCount() == 0.
+
+
isEmpty() - Method in class + org.iot.dsa.node.DSMetadata +
+
 
+
isEqual(Object) + - Method in class org.iot.dsa.node.action.DSAction +
+
+
Defaults to the equals method.
+
+
isEqual(Object) + - Method in class org.iot.dsa.node.DSElement
+
 
+
isEqual(Object) + - Method in class org.iot.dsa.node.DSFlexEnum
+
 
+
isEqual(Object) - + Method in class org.iot.dsa.node.DSFloat
+
 
+
isEqual(DSInfo) + - Method in class org.iot.dsa.node.DSInfo
+
+
True if the flags and target object are equal (not identical if the target + is a node). +
+
+
isEqual(Object) - + Method in class org.iot.dsa.node.DSInt
+
 
+
isEqual(Object) + - Method in interface org.iot.dsa.node.DSIObject +
+
+
Equals implementation that doesn't require hashCodes to equal, primarily + intended + so for comparing nodes. +
+
+
isEqual(Object) + - Method in class org.iot.dsa.node.DSJavaEnum
+
 
+
isEqual(Object) - + Method in class org.iot.dsa.node.DSNode
+
+
True if the argument is a node with the same children, although their order + can be + different. +
+
+
isEqual(Object) - + Method in class org.iot.dsa.node.DSStatus
+
 
+
isEqual(Object) + - Method in class org.iot.dsa.node.event.DSTopic +
+
+
Only test instance equality.
+
+
isEqual(Object) + - Method in class org.iot.dsa.security.DSPasswordAes +
+
 
+
isEqual(Object) + - Method in class org.iot.dsa.security.DSPasswordSha256 +
+
 
+
isEqual(Object) + - Method in class org.iot.dsa.time.DSDateTime
+
+
Defaults to the equals method.
+
+
isFault() - Method in class + org.iot.dsa.node.DSStatus +
+
+
True if the associate bit is set.
+
+
isFinished() + - Method in class org.iot.dsa.DSRuntime.Timer
+
+
True if cancelled or was a one time execution and that has finished.
+
+
isFixedList(byte) + - Static method in class org.iot.dsa.io.msgpack.MsgpackReader +
+
 
+
isFixedMap(byte) + - Static method in class org.iot.dsa.io.msgpack.MsgpackReader +
+
 
+
isFixInt(byte) - + Static method in class org.iot.dsa.io.msgpack.MsgpackReader +
+
 
+
isFixStr(byte) - + Static method in class org.iot.dsa.io.msgpack.MsgpackReader +
+
 
+
isFloat() - Method in class + org.iot.dsa.node.DSElement +
+
+
Whether or not the object represents a float.
+
+
isFloat() + - Method in class org.iot.dsa.node.DSFloat
+
 
+
isFloat() - Method in class + org.iot.dsa.node.DSInt
+
 
+
isFloat() - Method in interface + org.iot.dsa.node.DSINumber
+
+
Whether or not the object represents a double.
+
+
isGood() + - Method in class org.iot.dsa.node.DSStatus
+
+
If true, any associate object / value can be trusted.
+
+
isGroup() - Method in class + org.iot.dsa.node.DSElement +
+
+
Whether or not the object represents a list or map.
+
+
isGroup() + - Method in class org.iot.dsa.node.DSGroup
+
 
+
isHidden() - Method + in interface org.iot.dsa.dslink.responder.ApiObject
+
+
True if the object should ignored (not be exposed through the api).
+
+
isHidden() - Method in class + org.iot.dsa.node.DSInfo +
+
+
Whether or not an object is visible to clients.
+
+
isIdentical(DSInfo) + - Method in class org.iot.dsa.node.DSInfo
+
+
True if the flags and target object are identical.
+
+
isIdentical(Object) + - Method in class org.iot.dsa.node.DSNode
+
+
True if the argument is a node with the same children in the exact same + order. +
+
+
isInfinite() + - Method in class org.iot.dsa.node.DSDouble
+
 
+
isInt() - Method in class + org.iot.dsa.node.DSElement +
+
+
Whether or not the object represents an int.
+
+
isInt() - Method in class + org.iot.dsa.node.DSFloat +
+
 
+
isInt() - Method in class + org.iot.dsa.node.DSInt
+
 
+
isInt() - Method in interface + org.iot.dsa.node.DSINumber
+
+
Whether or not the object represents an int.
+
+
isList() + - Method in class org.iot.dsa.node.DSElement
+
+
Whether or not the object represents a list.
+
+
isList() - Method in class + org.iot.dsa.node.DSList +
+
+
Returns true.
+
+
isList() + - Method in enum org.iot.dsa.security.DSPermission +
+
 
+
isLong() + - Method in class org.iot.dsa.node.DSElement
+
+
Whether or not the object represents a long.
+
+
isLong() - Method in class + org.iot.dsa.node.DSFloat +
+
 
+
isLong() - Method in class + org.iot.dsa.node.DSInt
+
 
+
isLong() + - Method in interface org.iot.dsa.node.DSINumber +
+
+
Whether or not the object represents a long.
+
+
isLong() - Method in class + org.iot.dsa.node.DSLong +
+
 
+
isMap() - Method in class + org.iot.dsa.node.DSElement +
+
+
Whether or not the object represents a amp.
+
+
isMap() - Method in class + org.iot.dsa.node.DSMap
+
+
Returns true.
+
+
isNaN() - Method in class + org.iot.dsa.node.DSDouble +
+
 
+
isNode() - Method in class + org.iot.dsa.node.DSInfo +
+
+
Whether or not the object is a DSNode.
+
+
isNode(Object) - + Static method in class org.iot.dsa.node.DSNode
+
+
Convenience for instanceof DSNode.
+
+
isNull() + - Method in class org.iot.dsa.node.action.DSAction +
+
+
False
+
+
isNull() - Method in class + org.iot.dsa.node.DSBool +
+
 
+
isNull() - Method in class + org.iot.dsa.node.DSBytes +
+
 
+
isNull() + - Method in class org.iot.dsa.node.DSDouble
+
 
+
isNull() + - Method in class org.iot.dsa.node.DSElement
+
+
Whether or not the object represents null.
+
+
isNull() - Method in class + org.iot.dsa.node.DSFlexEnum +
+
 
+
isNull() - Method in class + org.iot.dsa.node.DSFloat +
+
 
+
isNull(int) - Method in class + org.iot.dsa.node.DSGroup +
+
+
Whether or not the object at the given index is null.
+
+
isNull() - Method in class + org.iot.dsa.node.DSInt
+
 
+
isNull() + - Method in interface org.iot.dsa.node.DSIObject +
+
 
+
isNull() + - Method in interface org.iot.dsa.node.DSIValue +
+
+
Values should have an instance representing null.
+
+
isNull() - Method in class + org.iot.dsa.node.DSJavaEnum +
+
 
+
isNull() - Method in class + org.iot.dsa.node.DSList +
+
+
Returns false.
+
+
isNull() - Method in class + org.iot.dsa.node.DSLong +
+
 
+
isNull() - Method in class + org.iot.dsa.node.DSMap
+
+
Returns false.
+
+
isNull(String) + - Method in class org.iot.dsa.node.DSMap
+
+
Returns true if the key isn't in the map, or it's value is null.
+
+
isNull() - Method in class + org.iot.dsa.node.DSNode +
+
+
Returns false.
+
+
isNull() - Method in class + org.iot.dsa.node.DSNull +
+
+
True
+
+
isNull() + - Method in class org.iot.dsa.node.DSStatus
+
 
+
isNull() - Method in class + org.iot.dsa.node.event.DSTopic
+
+
False
+
+
isNull() + - Method in class org.iot.dsa.security.DSPasswordAes +
+
 
+
isNull() + - Method in class org.iot.dsa.security.DSPasswordSha256 +
+
 
+
isNull() - Method in class + org.iot.dsa.time.DSDateTime +
+
 
+
isNumber() - Method in class + org.iot.dsa.node.DSDouble +
+
 
+
isNumber() - Method in class + org.iot.dsa.node.DSElement +
+
+
Whether or not the object represents a number.
+
+
isNumber() - Method in class + org.iot.dsa.node.DSLong +
+
 
+
isOk() - Method in class + org.iot.dsa.node.DSStatus +
+
 
+
isOpen() - + Method in interface org.iot.dsa.dslink.responder.InboundListRequest
+
+
Whether or not the list stream is still open.
+
+
isOpen() - Method + in interface org.iot.dsa.node.action.ActionInvocation +
+
+
Whether or not response is still open.
+
+
isOpen() - + Method in enum org.iot.dsa.node.action.ActionSpec.ResultType
+
+
True if OPEN_TABLE or STREAM_TABLE
+
+
isOverride() + - Method in class org.iot.dsa.node.DSStatus
+
+
True if the associate bit is set.
+
+
isRead() + - Method in enum org.iot.dsa.security.DSPermission +
+
 
+
isReadOnly() - + Method in interface org.iot.dsa.dslink.responder.ApiObject
+
+
True if the object is a value and cannot be written.
+
+
isReadOnly() + - Method in class org.iot.dsa.node.DSInfo
+
+
Whether or not an object can be written by a client.
+
+
isRemoteConfigFault() + - Method in class org.iot.dsa.node.DSStatus
+
 
+
isRemoteDisabled() + - Method in class org.iot.dsa.node.DSStatus
+
 
+
isRemoteDown() + - Method in class org.iot.dsa.node.DSStatus
+
 
+
isRemoteFault() + - Method in class org.iot.dsa.node.DSStatus
+
 
+
isRemoteOverride() + - Method in class org.iot.dsa.node.DSStatus
+
 
+
isRemoteStale() + - Method in class org.iot.dsa.node.DSStatus
+
 
+
isRemoteUnknown() + - Method in class org.iot.dsa.node.DSStatus
+
 
+
isRequester() + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Looks for the isRequester config, false by default.
+
+
isResponder() + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Looks for the isResponder config, true by default.
+
+
isRunning() + - Method in class org.iot.dsa.DSRuntime.Timer
+
+
True when the runnable is being actually being executed.
+
+
isRunning() - Method in class + org.iot.dsa.node.DSNode +
+
+
A convenience for !isStopped().
+
+
isStable() - Method in class + org.iot.dsa.node.DSNode +
+
+
True after stable is called, children are stable before their parents. +
+
+
isStale() - Method in class + org.iot.dsa.node.DSStatus +
+
 
+
isStarted() - Method in class + org.iot.dsa.node.DSNode +
+
+
True after start is called, children are started before their parents. +
+
+
isStopped() - Method in class + org.iot.dsa.node.DSNode +
+
+
True after stop is called, children are stopped before their parents.
+
+
isStream() - + Method in enum org.iot.dsa.node.action.ActionSpec.ResultType
+
+
True if this is the STREAM_TABLE.
+
+
isStreamOpen() + - Method in interface org.iot.dsa.dslink.requester.OutboundStream
+
+
Whether or not the request is open.
+
+
isString() - Method in class + org.iot.dsa.node.DSElement +
+
+
Whether or not the object represents a string.
+
+
isString() - Method in class + org.iot.dsa.node.DSString +
+
 
+
isSubscribed() + - Method in class org.iot.dsa.node.DSNode
+
+
True if there are any subscribers.
+
+
isSubscribed(DSInfo, DSTopic) + - Method in class org.iot.dsa.node.DSNode
+
+
True if there are any subscriptions with the matching child and topic. +
+
+
isSubscribed(DSTopic) + - Method in class org.iot.dsa.node.DSNode
+
+
True if there any subscriptions for the given topic.
+
+
isTransient() + - Method in class org.iot.dsa.node.DSInfo
+
+
Whether or not an object is persistent.
+
+
isUnknown() + - Method in class org.iot.dsa.node.DSStatus
+
 
+
isValid(DSElement) + - Method in interface org.iot.dsa.security.DSIPassword +
+
+
Returns true if the give element is valid according to the backing + implementation. +
+
+
isValid(DSElement) + - Method in class org.iot.dsa.security.DSPasswordAes +
+
+
Encrypts the string value of the given element and compares against the + value stored in this + object. +
+
+
isValid(String) + - Method in class org.iot.dsa.security.DSPasswordAes +
+
+
Encrypts the given string and compares against the value stored in this + object. +
+
+
isValid(DSElement) + - Method in class org.iot.dsa.security.DSPasswordSha256 +
+
+
Hashes the string value of the given element and compares against the hash + stored in this + object. +
+
+
isValid(String) + - Method in class org.iot.dsa.security.DSPasswordSha256 +
+
+
Hashes the given string and compares against the value stored in this + object. +
+
+
isValue() - Method + in interface org.iot.dsa.dslink.responder.ApiObject
+
+
True if getValue() can be called.
+
+
isValue() + - Method in class org.iot.dsa.node.DSInfo
+
 
+
isValues() - + Method in enum org.iot.dsa.node.action.ActionSpec.ResultType
+
 
+
isVoid() - + Method in enum org.iot.dsa.node.action.ActionSpec.ResultType
+
 
+
isWrite() + - Method in enum org.iot.dsa.security.DSPermission +
+
 
+
isZip() - Method in class + org.iot.dsa.io.json.JsonAppender
+
+
Whether or not this is zipping the output.
+
+
iterateNodes() + - Method in class org.iot.dsa.node.DSNode
+
+
Returns an info iterator of child DSNodes.
+
+
iterateValues() + - Method in class org.iot.dsa.node.DSNode
+
+
Returns an info iterator of child DSIValues.
+
+
iterator() - Method in class + org.iot.dsa.node.DSList +
+
+
Returns an iterator that does not implement remove.
+
+
iterator() - Method in class + org.iot.dsa.node.DSNode +
+
+
Returns an info iterator of all children.
+
+
+ + + +

J

+
+
JsonAppender - Class in org.iot.dsa.io.json
+
+
Json implementation of DSWriter intended for Appendables such as + StringBuilders. +
+
+
JsonAppender() + - Constructor for class org.iot.dsa.io.json.JsonAppender +
+
+
Be sure to call one of the setOutput methods.
+
+
JsonAppender(Appendable) + - Constructor for class org.iot.dsa.io.json.JsonAppender +
+
+
Will write directly to the given appendable.
+
+
JsonAppender(File) + - Constructor for class org.iot.dsa.io.json.JsonAppender +
+
+
Creates an underlying FileWriter.
+
+
JsonAppender(File, String) + - Constructor for class org.iot.dsa.io.json.JsonAppender +
+
+
Will create a zip file using the zipFileName as file name inside the zip. +
+
+
JsonAppender(OutputStream) + - Constructor for class org.iot.dsa.io.json.JsonAppender +
+
+
Creates an underlying OutputStreamWriter.
+
+
JsonAppender(OutputStream, String) + - Constructor for class org.iot.dsa.io.json.JsonAppender +
+
+
Will write a zip file to the given stream.
+
+
JsonConstants + - Interface in org.iot.dsa.io.json
+
+
Useful constants.
+
+
JsonReader - Class in org.iot.dsa.io.json
+
+
Json implementation of DSReader.
+
+
JsonReader() + - Constructor for class org.iot.dsa.io.json.JsonReader +
+
 
+
JsonReader(CharSequence) + - Constructor for class org.iot.dsa.io.json.JsonReader +
+
 
+
JsonReader(File) + - Constructor for class org.iot.dsa.io.json.JsonReader +
+
 
+
JsonReader(InputStream, String) + - Constructor for class org.iot.dsa.io.json.JsonReader +
+
 
+
JsonReader(Reader) + - Constructor for class org.iot.dsa.io.json.JsonReader +
+
 
+
JsonWriter - Class in org.iot.dsa.io.json
+
+
Json implementation of DSWriter intended for OutputStreams and Writers. +
+
+
JsonWriter() + - Constructor for class org.iot.dsa.io.json.JsonWriter +
+
+
Be sure to call one of the setOutput methods.
+
+
JsonWriter(File) + - Constructor for class org.iot.dsa.io.json.JsonWriter +
+
+
Creates an underlying FileWriter.
+
+
JsonWriter(File, String) + - Constructor for class org.iot.dsa.io.json.JsonWriter +
+
+
Will create a zip file using the zipFileName as file name inside the zip. +
+
+
JsonWriter(OutputStream) + - Constructor for class org.iot.dsa.io.json.JsonWriter +
+
+
Creates an underlying OutputStreamWriter.
+
+
JsonWriter(OutputStream, String) + - Constructor for class org.iot.dsa.io.json.JsonWriter +
+
+
Will write a zip file to the given stream.
+
+
JsonWriter(Writer) + - Constructor for class org.iot.dsa.io.json.JsonWriter +
+
 
+
+ + + +

K

+
+
key(CharSequence) + - Method in class org.iot.dsa.io.AbstractWriter
+
 
+
key(CharSequence) + - Method in interface org.iot.dsa.io.DSIWriter
+
+
Write a key in the current map.
+
+
keys - + Variable in class org.iot.dsa.node.DSMap
+
+
For preserving order.
+
+
+ + + +

L

+
+
last() + - Method in class org.iot.dsa.io.AbstractReader
+
 
+
last() - Method in interface + org.iot.dsa.io.DSIReader +
+
+
The last value returned from next().
+
+
last() - Method in class + org.iot.dsa.node.DSGroup +
+
+
Returns the item at the highest index.
+
+
lastIndexOf(DSElement) + - Method in class org.iot.dsa.node.DSGroup
+
+
Scans the collection and returns the first index that equal the arg.
+
+
lastRun() - Method in class + org.iot.dsa.DSRuntime.Timer +
+
+
The lastRun run or -1 if it hasn't run yet.
+
+
length() - Method in class + org.iot.dsa.io.AbstractWriter +
+
+
Returns 0 by default.
+
+
length() - Method in interface + org.iot.dsa.io.DSIWriter +
+
+
If the writer is buffering output, this returns the size of that buffer. +
+
+
length() + - Method in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
+
Returns the number of bytes in the outgoing byte buffer.
+
+
length() - Method in class + org.iot.dsa.node.DSBytes +
+
+
The number of bytes in the array.
+
+
list(String, OutboundListHandler) + - Method in interface org.iot.dsa.dslink.DSIRequester +
+
+
Submits a list request.
+
+
list - + Variable in class org.iot.dsa.node.DSList
+
 
+
load(DSLinkConfig) + - Static method in class org.iot.dsa.dslink.DSLink +
+
+
Creates a link by first testing for an existing serialized database.
+
+
+ + + +

M

+
+
main(String[]) - + Static method in class org.iot.dsa.dslink.DSLink +
+
+
This is a convenience for DSLink.load(new DSLinkConfig(args)).run() and can + be used as the + the main class for any link. +
+
+
make(boolean) + - Static method in class org.iot.dsa.node.DSElement +
+
+
Creates an DSIObject representation of the primitive.
+
+
make(byte[]) + - Static method in class org.iot.dsa.node.DSElement +
+
+
Creates an DSIObject representation of the primitive.
+
+
make(double) + - Static method in class org.iot.dsa.node.DSElement +
+
+
Creates an DSIObject representation of the primitive.
+
+
make(int) - Static method in + class org.iot.dsa.node.DSElement
+
+
Creates an DSIObject representation of the primitive.
+
+
make(long) - Static method in + class org.iot.dsa.node.DSElement
+
+
Creates an DSIObject representation of the primitive.
+
+
make(String) - + Static method in class org.iot.dsa.node.DSElement +
+
+
Creates an DSIObject representation of the primitive.
+
+
makeBackup() + - Method in class org.iot.dsa.logging.FileLogHandler +
+
+
Only public for testing, do not call.
+
+
makeMessage(Throwable) + - Static method in exception org.iot.dsa.util.DSException +
+
+
Attempts come up with the best description of the argument.
+
+
makeNull() - Static method in + class org.iot.dsa.node.DSElement
+
+
Creates an DSIObject representation of null.
+
+
makeRuntime(Throwable) + - Static method in exception org.iot.dsa.util.DSException +
+
+
If the given exception is already a runtime exception, it is cast and + returned, + otherwise it will be returned wrapped by an instance of this class. +
+
+
map - + Variable in class org.iot.dsa.node.DSMap
+
 
+
MAX_VALUE - Static variable in + class org.iot.dsa.node.DSMetadata
+
 
+
millis() - Method in enum + org.iot.dsa.time.DSInterval +
+
+
The approximate number of ms in the interval.
+
+
MILLIS_DAY - Static variable in + class org.iot.dsa.time.DSTime
+
 
+
MILLIS_FIFTEEN_MINUTES + - Static variable in class org.iot.dsa.time.DSTime +
+
 
+
MILLIS_FIFTEEN_SECONDS + - Static variable in class org.iot.dsa.time.DSTime +
+
 
+
MILLIS_FIVE_MINUTES + - Static variable in class org.iot.dsa.time.DSTime +
+
 
+
MILLIS_FIVE_SECONDS + - Static variable in class org.iot.dsa.time.DSTime +
+
 
+
MILLIS_FOUR_HOURS + - Static variable in class org.iot.dsa.time.DSTime +
+
 
+
MILLIS_HOUR - Static variable in + class org.iot.dsa.time.DSTime
+
 
+
MILLIS_MINUTE + - Static variable in class org.iot.dsa.time.DSTime +
+
 
+
MILLIS_MONTH + - Static variable in class org.iot.dsa.time.DSTime +
+
 
+
MILLIS_QUARTER + - Static variable in class org.iot.dsa.time.DSTime +
+
 
+
MILLIS_SECOND + - Static variable in class org.iot.dsa.time.DSTime +
+
 
+
MILLIS_SIX_HOURS + - Static variable in class org.iot.dsa.time.DSTime +
+
 
+
MILLIS_TEN_MINUTES + - Static variable in class org.iot.dsa.time.DSTime +
+
 
+
MILLIS_TEN_SECONDS + - Static variable in class org.iot.dsa.time.DSTime +
+
 
+
MILLIS_THIRTY_MINUTES + - Static variable in class org.iot.dsa.time.DSTime +
+
 
+
MILLIS_THIRTY_SECONDS + - Static variable in class org.iot.dsa.time.DSTime +
+
 
+
MILLIS_THREE_HOURS + - Static variable in class org.iot.dsa.time.DSTime +
+
 
+
MILLIS_TWELVE_HOURS + - Static variable in class org.iot.dsa.time.DSTime +
+
 
+
MILLIS_TWENTY_MINUTES + - Static variable in class org.iot.dsa.time.DSTime +
+
 
+
MILLIS_TWO_HOURS + - Static variable in class org.iot.dsa.time.DSTime +
+
 
+
MILLIS_WEEK - Static variable in + class org.iot.dsa.time.DSTime
+
 
+
MILLIS_YEAR - Static variable in + class org.iot.dsa.time.DSTime
+
 
+
millisToNanos(long) + - Static method in class org.iot.dsa.time.DSTime
+
 
+
MIN_VALUE - Static variable in + class org.iot.dsa.node.DSMetadata
+
 
+
MsgpackReader - Class in org.iot.dsa.io.msgpack
+
+
MsgPack implementation of DSReader.
+
+
MsgpackReader() + - Constructor for class org.iot.dsa.io.msgpack.MsgpackReader +
+
 
+
MsgpackReader(InputStream) + - Constructor for class org.iot.dsa.io.msgpack.MsgpackReader +
+
 
+
MsgpackWriter - Class in org.iot.dsa.io.msgpack
+
 
+
MsgpackWriter() + - Constructor for class org.iot.dsa.io.msgpack.MsgpackWriter +
+
 
+
MsgpackWriter(ByteBuffer) + - Constructor for class org.iot.dsa.io.msgpack.MsgpackWriter +
+
 
+
+ + + +

N

+
+
NAME + - Static variable in class org.iot.dsa.node.DSMetadata +
+
 
+
NANOS_IN_MS - Static variable in + class org.iot.dsa.time.DSTime
+
 
+
NANOS_IN_SEC + - Static variable in class org.iot.dsa.time.DSTime +
+
 
+
nanosToMillis(long) + - Static method in class org.iot.dsa.time.DSTime
+
 
+
newKeyPair() + - Static method in class org.iot.dsa.security.DSKeys +
+
+
Creates a key pair for the predefined elliptic curve secp256r1.
+
+
newSignature() + - Static method in class org.iot.dsa.security.DSKeys +
+
+
Returns a SHA256withECDSA signature.
+
+
newSigner() + - Method in class org.iot.dsa.security.DSKeys +
+
+
Creates a signer for this private key.
+
+
newVerifier() + - Method in class org.iot.dsa.security.DSKeys +
+
+
Creates a verifier for this public key.
+
+
next() + - Method in class org.iot.dsa.io.AbstractReader
+
+
Subclasses must override this, read the next item from the stream, then + call one of the + setXxx methods. +
+
+
next() - Method in interface + org.iot.dsa.io.DSIReader +
+
+
Advances the reader to the next item and returns the token representing + it's current state. +
+
+
next() + - Method in class org.iot.dsa.io.json.JsonReader +
+
 
+
next() + - Method in class org.iot.dsa.io.msgpack.MsgpackReader +
+
 
+
next() + - Method in class org.iot.dsa.node.DSInfo
+
+
The next info in the parent node.
+
+
next(long) + - Method in enum org.iot.dsa.time.DSInterval
+
+
Returns the nextRun interval for the previously aligned timestamp.
+
+
nextAction() + - Method in class org.iot.dsa.node.DSInfo
+
+
The next DSInfo in the parent that is an action, or null.
+
+
nextNode() - Method in class + org.iot.dsa.node.DSInfo +
+
+
The next DSInfo in the parent that is a node, or null.
+
+
nextRun() - Method in class + org.iot.dsa.DSRuntime.Timer +
+
+
The next scheduled time to run.
+
+
nextValue() - Method in class + org.iot.dsa.node.DSInfo +
+
+
The next DSInfo in the parent that is a value, or null.
+
+
NodeDecoder - Class in org.iot.dsa.io
+
+
Decodes a node (tree) that was encoded with NodeEncoder.
+
+
NodeEncoder - Class in org.iot.dsa.io
+
+
Encodes a node tree using a compact JSON schema.
+
+
NULL - + Static variable in class org.iot.dsa.node.DSBool
+
 
+
NULL - + Static variable in class org.iot.dsa.node.DSBytes +
+
 
+
NULL - + Static variable in class org.iot.dsa.node.DSDouble +
+
 
+
NULL + - Static variable in class org.iot.dsa.node.DSFlexEnum +
+
 
+
NULL - + Static variable in class org.iot.dsa.node.DSFloat +
+
 
+
NULL - + Static variable in class org.iot.dsa.node.DSInt
+
 
+
NULL + - Static variable in class org.iot.dsa.node.DSJavaEnum +
+
 
+
NULL - + Static variable in class org.iot.dsa.node.DSLong
+
 
+
NULL - + Static variable in class org.iot.dsa.node.DSNull
+
 
+
NULL - + Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
NULL - + Static variable in class org.iot.dsa.node.DSString +
+
 
+
NULL + - Static variable in class org.iot.dsa.security.DSPasswordAes +
+
 
+
NULL - Static variable in + class org.iot.dsa.security.DSPasswordSha256
+
 
+
NULL + - Static variable in class org.iot.dsa.time.DSDateTime +
+
 
+
+ + + +

O

+
+
OK - + Static variable in class org.iot.dsa.node.DSStatus +
+
+
Good, no other status applies.
+
+
ok - + Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
OK_OVERRIDE + - Static variable in class org.iot.dsa.node.DSStatus +
+
+
Good, the value is overridden within DSA.
+
+
OK_OVERRIDE_STR + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
OK_REMOTE_OVERRIDE + - Static variable in class org.iot.dsa.node.DSStatus +
+
+
Good, the value is overridden outside of DSA.
+
+
OK_REMOTE_OVERRIDE_STR + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
OK_STR - Static variable in class + org.iot.dsa.node.DSStatus +
+
 
+
okOverride - Static variable in + class org.iot.dsa.node.DSStatus
+
 
+
okRemoteOverride + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
onChildAdded(DSInfo) + - Method in class org.iot.dsa.node.DSNode
+
+
Called when the given child is added and in the stable state.
+
+
onChildChanged(DSInfo) + - Method in class org.iot.dsa.node.DSNode
+
+
Called when the given child is changed and in the stable state.
+
+
onChildChanged(DSInfo) + - Method in class org.iot.dsa.node.DSValueNode
+
+
This fires the NODE_CHANGED topic when the value child changes.
+
+
onChildRemoved(DSInfo) + - Method in class org.iot.dsa.node.DSNode
+
+
Called when the given child is removed and in the stable state.
+
+
onClose() + - Method in interface org.iot.dsa.dslink.requester.OutboundRequestHandler
+
+
Callback for when the request stream is closed, no matter how or by who. +
+
+
onClose() + - Method in class org.iot.dsa.dslink.requester.SimpleRequestHandler
+
+
Does nothing by default.
+
+
onClose() + - Method in interface org.iot.dsa.dslink.responder.OutboundListResponse
+
+
Will be called no matter how the stream is closed.
+
+
onClose(Integer) + - Method in interface org.iot.dsa.dslink.responder.SubscriptionCloseHandler
+
+
Will be called no matter how the subscription is terminated.
+
+
onClose() + - Method in interface org.iot.dsa.node.action.ActionResult
+
+
Always called, whether or not the result is a stream, and no matter who + closes it. +
+
+
onColumns(DSList) + - Method in interface org.iot.dsa.dslink.requester.OutboundInvokeHandler
+
+
Called whenever columns are received.
+
+
onComplete() - + Method in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
+
Callback, for when the top level container is finished.
+
+
onConnect(DSLinkConnection) + - Method in interface org.iot.dsa.dslink.DSLinkConnection.Listener
+
+
Called asynchronously after the connection with the endpoint is opened. +
+
+
onConnect() + - Method in class org.iot.dsa.dslink.DSLinkConnection +
+
+
Called after onInitialize and before onRun.
+
+
onDisconnect(DSLinkConnection) + - Method in interface org.iot.dsa.dslink.DSLinkConnection.Listener
+
+
Called synchronously after the connection with the endpoint is closed. +
+
+
onDisconnect() - + Method in class org.iot.dsa.dslink.DSLinkConnection +
+
+
Called when this network connection has been closed.
+
+
onError(String, String, String) + - Method in interface org.iot.dsa.dslink.requester.OutboundRequestHandler
+
+
Callback for when an error is received.
+
+
onError(String, String, String) + - Method in class org.iot.dsa.dslink.requester.SimpleRequestHandler
+
+
Does nothing by default.
+
+
onEvent(DSTopic, DSIEvent, DSNode, DSInfo, Object...) + - Method in interface org.iot.dsa.node.event.DSISubscriber
+
+
Subscription callback.
+
+
onInfoChanged(DSInfo) + - Method in class org.iot.dsa.node.DSNode
+
+
Called when the given info is modified and in the stable state.
+
+
onInit(String, DSMap, OutboundStream) + - Method in class org.iot.dsa.dslink.requester.AbstractInvokeHandler
+
+
Sets the fields so they can be access via the corresponding getters.
+
+
onInit(String, OutboundStream) + - Method in class org.iot.dsa.dslink.requester.AbstractListHandler
+
+
Sets the fields so they can be accessed with the corresponding getters. +
+
+
onInit(String, int, OutboundStream) + - Method in class org.iot.dsa.dslink.requester.AbstractSubscribeHandler
+
+
Sets the fields so they can be accessed via the corresponding getters. +
+
+
onInit(String, DSMap, OutboundStream) + - Method in interface org.iot.dsa.dslink.requester.OutboundInvokeHandler
+
+
Called by the requester before returning from the invoke method.
+
+
onInit(String, OutboundStream) + - Method in interface org.iot.dsa.dslink.requester.OutboundListHandler
+
+
Called by the requester before returning from the list method.
+
+
onInit(String, int, OutboundStream) + - Method in interface org.iot.dsa.dslink.requester.OutboundSubscribeHandler
+
+
Called by the requester before returning from the subscribe method.
+
+
onInitialize() - + Method in class org.iot.dsa.dslink.DSLinkConnection +
+
+
Always called before onConnect.
+
+
onInitialized() + - Method in interface org.iot.dsa.dslink.requester.OutboundListHandler
+
+
Called once the initial state of the target has been transmitted.
+
+
onInsert(int, DSList) + - Method in interface org.iot.dsa.dslink.requester.OutboundInvokeHandler
+
+
Called when the given rows should be inserted at the given index.
+
+
onInvoke(InboundInvokeRequest) + - Method in interface org.iot.dsa.dslink.DSIResponder +
+
+
The implementation should quickly create an object for responding to the + request, but do no + processing of it on the calling thread. +
+
+
onInvoke(DSInfo, ActionInvocation) + - Method in class org.iot.dsa.dslink.DSLink
+
+
Handles the save action.
+
+
onInvoke(DSInfo, ActionInvocation) + - Method in class org.iot.dsa.node.DSNode
+
+
Override point, called by the default implementation of DSAction.invoke. +
+
+
onList(InboundListRequest) + - Method in interface org.iot.dsa.dslink.DSIResponder +
+
+
The implementation should quickly create an object for responding to the + request, but do no + processing of it on the calling thread. +
+
+
onMode(OutboundInvokeHandler.Mode) + - Method in interface org.iot.dsa.dslink.requester.OutboundInvokeHandler
+
+
Called whenever a mode is received.
+
+
onRemove(String) + - Method in interface org.iot.dsa.dslink.requester.OutboundListHandler
+
+
Only called after onOpen(), indicates something about the target of the + request has been + removed. +
+
+
onReplace(int, int, DSList) + - Method in interface org.iot.dsa.dslink.requester.OutboundInvokeHandler
+
+
The rows starting and ending with the given indexes should be removed and + the given rows + inserted at the start index. +
+
+
onRun() + - Method in class org.iot.dsa.dslink.DSLinkConnection +
+
+
The long term management of the connection (reading and writing).
+
+
onSet(InboundSetRequest) + - Method in interface org.iot.dsa.dslink.DSIResponder +
+
+
The implementation should do no processing of it on the calling thread. +
+
+
onSet(DSInfo, DSIValue) + - Method in class org.iot.dsa.node.DSNode
+
+
Override point, called when a value being set.
+
+
onSet(DSIValue) + - Method in class org.iot.dsa.node.DSNode
+
+
Override point, called only when a DSNode subclass implements DSIValue is + being set. +
+
+
onSet(DSIValue) + - Method in class org.iot.dsa.node.DSValueNode
+
 
+
onStable() + - Method in class org.iot.dsa.dslink.DSLinkConnection +
+
+
Starts the connection.
+
+
onStable() - Method in class + org.iot.dsa.node.DSNode +
+
+
Called once this node is stable, but before stable is called on children. +
+
+
onStarted() - Method in class + org.iot.dsa.node.DSNode +
+
+
Called once this node and its entire subtree is started.
+
+
onStopped() + - Method in class org.iot.dsa.dslink.DSLink
+
 
+
onStopped() - Method in class + org.iot.dsa.node.DSNode +
+
+
Called once this node and its entire subtree is stopped.
+
+
onSubscribe(InboundSubscribeRequest) + - Method in interface org.iot.dsa.dslink.DSIResponder +
+
+
The implementation should quickly create an object for responding to the + request, but do no + processing of it on the calling thread. +
+
+
onSubscribe(DSTopic, DSInfo, DSISubscriber) + - Method in class org.iot.dsa.node.DSNode
+
+
Called for every subscription.
+
+
onSubscribed() + - Method in class org.iot.dsa.node.DSNode
+
+
Called when this node transitions from having no subscriptions to having a + subscription of + any kind. +
+
+
onSubscribed(DSTopic, DSInfo) + - Method in class org.iot.dsa.node.DSNode
+
+
Called when the child and topic pair transitions from having no + subscriptions to have a + subscription. +
+
+
onTableMeta(DSMap) + - Method in interface org.iot.dsa.dslink.requester.OutboundInvokeHandler
+
+
Called whenever metadata for the entire table is received.
+
+
onUnsubscribe(DSTopic, DSInfo, DSISubscriber) + - Method in class org.iot.dsa.node.DSNode
+
+
Called for every unsubscribe.
+
+
onUnsubscribed() + - Method in class org.iot.dsa.node.DSNode
+
+
Called when this node transitions to having no subscriptions of any kind. +
+
+
onUnsubscribed(DSTopic, DSInfo) + - Method in class org.iot.dsa.node.DSNode
+
+
Called when the child and topic pair transitions to having no + subscriptions. +
+
+
onUnsubscribed(DSTopic, DSNode, DSInfo) + - Method in interface org.iot.dsa.node.event.DSISubscriber
+
+
Called no matter how the unsubscribe happens, whether explicitly or if the + node + unsubscribes itself. +
+
+
onUpdate(DSList) + - Method in interface org.iot.dsa.dslink.requester.OutboundInvokeHandler
+
+
Called for every row.
+
+
onUpdate(String, DSElement) + - Method in interface org.iot.dsa.dslink.requester.OutboundListHandler
+
+
Called to provide a value for node metadata, attribute or child.
+
+
onUpdate(DSDateTime, DSElement, DSStatus) + - Method in interface org.iot.dsa.dslink.requester.OutboundSubscribeHandler
+
+
Subscription update mechanism.
+
+
org.iot.dsa - package org.iot.dsa
+
+
Use the DSRuntime thread pool and timers.
+
+
org.iot.dsa.dslink - package + org.iot.dsa.dslink +
+
+
DSLink is the main entry point for an application.
+
+
org.iot.dsa.dslink.requester + - package org.iot.dsa.dslink.requester +
+
+
API for implementing requesters without having to modeling everything in + the node tree. +
+
+
org.iot.dsa.dslink.responder + - package org.iot.dsa.dslink.responder +
+
+
API for implementing responders without having modeling everything in the + node tree. +
+
+
org.iot.dsa.io - package org.iot.dsa.io +
+
+
Node serialization and streaming abstraction for JSON and MsgPack.
+
+
org.iot.dsa.io.json - package + org.iot.dsa.io.json +
+
 
+
org.iot.dsa.io.msgpack - package + org.iot.dsa.io.msgpack +
+
 
+
org.iot.dsa.logging - package + org.iot.dsa.logging +
+
+
Async handler for Java Util Logging that also manages log backups.
+
+
org.iot.dsa.node - package + org.iot.dsa.node +
+
+
Persistent data model used to build the node tree of a link.
+
+
org.iot.dsa.node.action - package + org.iot.dsa.node.action +
+
 
+
org.iot.dsa.node.event - package + org.iot.dsa.node.event +
+
 
+
org.iot.dsa.security - package + org.iot.dsa.security +
+
 
+
org.iot.dsa.time - package + org.iot.dsa.time +
+
 
+
org.iot.dsa.util - package + org.iot.dsa.util +
+
 
+
OutboundInvokeHandler + - Interface in org.iot.dsa.dslink.requester +
+
+
Callback mechanism passed to the invoke method on DSIRequester.
+
+
OutboundInvokeHandler.Mode + - Enum in org.iot.dsa.dslink.requester +
+
 
+
OutboundListHandler + - Interface in org.iot.dsa.dslink.requester +
+
+
Callback mechanism passed to the list method on DSIRequester.
+
+
OutboundListResponse + - Interface in org.iot.dsa.dslink.responder +
+
+
The responder is responsible for returning this upon notification of a list + request. +
+
+
OutboundRequestHandler + - Interface in org.iot.dsa.dslink.requester +
+
+
Callbacks common to all outbound requests.
+
+
OutboundStream + - Interface in org.iot.dsa.dslink.requester +
+
+
Mechanism for the requester to close outbound requests.
+
+
OutboundSubscribeHandler + - Interface in org.iot.dsa.dslink.requester +
+
+
Callback mechanism passed to the subscribe method in the requester.
+
+
+ + + +

P

+
+
parse(String[]) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Parses command line args to set the internal state of this object.
+
+
PLACEHOLDER + - Static variable in class org.iot.dsa.node.DSMetadata +
+
 
+
prepareParameter(DSInfo, DSMap) + - Method in class org.iot.dsa.node.action.DSAction +
+
+
Override point, called for each parameter as it is being sent to the + requester. +
+
+
prettyPrint + - Variable in class org.iot.dsa.io.AbstractWriter
+
+
Subclasses can use this if applicable.
+
+
printStackTrace() + - Method in exception org.iot.dsa.util.DSException +
+
 
+
printStackTrace(PrintStream) + - Method in exception org.iot.dsa.util.DSException +
+
 
+
printStackTrace(PrintWriter) + - Method in exception org.iot.dsa.util.DSException +
+
 
+
PrintStreamLogHandler - Class in org.iot.dsa.logging
+
+
Async logging handler for writing to streams such as System.out.
+
+
PrintStreamLogHandler(String, PrintStream) + - Constructor for class org.iot.dsa.logging.PrintStreamLogHandler
+
 
+
publish(LogRecord) + - Method in class org.iot.dsa.logging.AsyncLogHandler +
+
+
Enqueues the record for the write thread.
+
+
put(int, DSElement) + - Method in class org.iot.dsa.node.DSList
+
+
Replaces a value and returns this.
+
+
put(int, boolean) + - Method in class org.iot.dsa.node.DSList
+
+
Primitive setter, returns this.
+
+
put(int, double) + - Method in class org.iot.dsa.node.DSList
+
+
Primitive setter, returns this.
+
+
put(int, int) + - Method in class org.iot.dsa.node.DSList
+
+
Primitive setter, returns this.
+
+
put(int, long) + - Method in class org.iot.dsa.node.DSList
+
+
Primitive setter, returns this.
+
+
put(int, String) - + Method in class org.iot.dsa.node.DSList
+
+
Primitive setter, returns this.
+
+
put(String, DSElement) + - Method in class org.iot.dsa.node.DSMap
+
+
Adds or replaces the value for the given key and returns this.
+
+
put(String, boolean) + - Method in class org.iot.dsa.node.DSMap
+
+
Primitive setter, returns this.
+
+
put(String, double) + - Method in class org.iot.dsa.node.DSMap
+
+
Primitive setter, returns this.
+
+
put(String, int) - + Method in class org.iot.dsa.node.DSMap
+
+
Primitive setter, returns this.
+
+
put(String, long) - + Method in class org.iot.dsa.node.DSMap
+
+
Primitive setter, returns this.
+
+
put(String, String) + - Method in class org.iot.dsa.node.DSMap
+
+
Primitive setter, returns this.
+
+
put(String, Throwable) + - Method in class org.iot.dsa.node.DSMap
+
+
Puts a String representing the stack trace into the map.
+
+
put(String, DSIObject) + - Method in class org.iot.dsa.node.DSNode
+
+
Adds or replaces the named child.
+
+
put(String, boolean) + - Method in class org.iot.dsa.node.DSNode
+
+
A convenience for put(String, DSIObject)
+
+
put(String, double) + - Method in class org.iot.dsa.node.DSNode
+
+
A convenience for put(String, DSIObject)
+
+
put(String, float) + - Method in class org.iot.dsa.node.DSNode
+
+
A convenience for put(String, DSIObject)
+
+
put(String, int) - + Method in class org.iot.dsa.node.DSNode
+
+
A convenience for put(String, DSIObject)
+
+
put(String, long) + - Method in class org.iot.dsa.node.DSNode
+
+
A convenience for put(String, DSIObject)
+
+
put(String, String) + - Method in class org.iot.dsa.node.DSNode
+
+
A convenience for put(String, DSIObject)
+
+
put(DSInfo, DSIObject) + - Method in class org.iot.dsa.node.DSNode
+
+
Replaces the child.
+
+
putAll(DSMap) - + Method in class org.iot.dsa.node.DSMap
+
+
Adds / overwrites entries in this map with those from the given.
+
+
putList(String) - + Method in class org.iot.dsa.node.DSMap
+
+
Puts a new list for given key and returns it.
+
+
putMap(String) + - Method in class org.iot.dsa.node.DSMap
+
+
Puts a new map for given key and returns it.
+
+
putNull(String) - + Method in class org.iot.dsa.node.DSMap
+
+
Puts a null value for given key and returns this.
+
+
+ + + +

R

+
+
readDouble(byte[], int, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Reads the primitive from a byte array.
+
+
readDouble(InputStream, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Reads the primitive from a stream.
+
+
readFloat(byte[], int, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Reads the primitive from a byte array.
+
+
readFloat(InputStream, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Reads the primitive a stream
+
+
readInt(byte[], int, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Reads the primitive from a byte array.
+
+
readInt(InputStream, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Reads the primitive from a stream.
+
+
readLong(byte[], int, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Reads the primitive from a byte array.
+
+
readLong(InputStream, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Reads the primitive from a stream.
+
+
readShort(byte[], int, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Reads the primitive from a byte array.
+
+
readShort(InputStream, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Reads the primitive from a stream.
+
+
recycle(Calendar) + - Static method in class org.iot.dsa.time.DSTime
+
+
Return a calendar instance for reuse.
+
+
registerDecoder(Class, DSIValue) + - Static method in class org.iot.dsa.node.DSRegistry +
+
+
DSIValues must provide an instance for decoding.
+
+
REMOTE_CONFIG_FAULT + - Static variable in class org.iot.dsa.node.DSStatus +
+
+
Bad, a configuration error is being reported by the foreign system.
+
+
REMOTE_CONFIG_FAULT_STR + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
REMOTE_DISABLED + - Static variable in class org.iot.dsa.node.DSStatus +
+
+
Bad, the foreign system is reporting the object is disabled.
+
+
REMOTE_DISABLED_STR + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
REMOTE_DOWN + - Static variable in class org.iot.dsa.node.DSStatus +
+
+
Bad, down communications are being reported by the foreign system.
+
+
REMOTE_DOWN_STR + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
REMOTE_FAULT + - Static variable in class org.iot.dsa.node.DSStatus +
+
+
Bad, an operational error is being reported by the foreign system.
+
+
REMOTE_FAULT_STR + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
REMOTE_STALE + - Static variable in class org.iot.dsa.node.DSStatus +
+
+
Bad, a stale value is being reported by the foreign system.
+
+
REMOTE_STALE_STR + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
REMOTE_UNKNOWN + - Static variable in class org.iot.dsa.node.DSStatus +
+
+
Bad, the foreign system is reporting the status is unknown.
+
+
REMOTE_UNKNOWN_STR + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
remoteConfigFault + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
remoteDisabled + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
remoteDown - Static variable in + class org.iot.dsa.node.DSStatus
+
 
+
remoteFault + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
remoteStale + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
remoteUnknown + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
remove(String, OutboundRequestHandler) + - Method in interface org.iot.dsa.dslink.DSIRequester +
+
+
Submits request to remove an attribute.
+
+
remove(int) - Method in class + org.iot.dsa.node.DSGroup +
+
+
Removes the value at the given index and returns it.
+
+
remove(int) - Method in class + org.iot.dsa.node.DSList +
+
 
+
remove(int) - Method in class + org.iot.dsa.node.DSMap
+
 
+
remove(String) + - Method in class org.iot.dsa.node.DSMap
+
+
Removes the key-value pair and returns the removed value.
+
+
remove(DSInfo) + - Method in class org.iot.dsa.node.DSNode
+
+
Removes the child.
+
+
remove(String) - + Method in class org.iot.dsa.node.DSNode
+
+
Remove the named child if it is contained.
+
+
removeFirst() + - Method in class org.iot.dsa.node.DSGroup
+
+
Remove and return the item at index 0.
+
+
removeLast() + - Method in class org.iot.dsa.node.DSGroup
+
+
Remove and return the item at the highest index.
+
+
removeListener(DSLinkConnection.Listener) + - Method in class org.iot.dsa.dslink.DSLinkConnection +
+
+
Removes a listener for connection events.
+
+
replace(int, int, DSList...) + - Method in interface org.iot.dsa.node.action.ActionInvocation
+
+
Only use with open tables, deletes len rows starting at the given index, + then inserts the + given rows in their place. +
+
+
reset() - Method in class + org.iot.dsa.io.AbstractReader +
+
 
+
reset() - Method in class + org.iot.dsa.io.AbstractWriter +
+
 
+
reset() - Method in interface + org.iot.dsa.io.DSIReader +
+
+
Sets last() == ROOT.
+
+
reset() - Method in interface + org.iot.dsa.io.DSIWriter +
+
+
Clears the state of the writer.
+
+
reset() - Method in class + org.iot.dsa.io.json.JsonAppender
+
 
+
reset() - Method in class + org.iot.dsa.io.json.JsonReader
+
 
+
reset() - Method in class + org.iot.dsa.io.json.JsonWriter
+
 
+
reset() + - Method in class org.iot.dsa.io.msgpack.MsgpackReader +
+
 
+
reset() + - Method in class org.iot.dsa.security.DSKeys.Signer +
+
+
Call to begin a new signature.
+
+
reset() + - Method in class org.iot.dsa.security.DSKeys.Verifier +
+
+
Call to begin a new signature.
+
+
restore(DSElement) + - Method in class org.iot.dsa.node.DSFlexEnum
+
 
+
restore(DSElement) + - Method in interface org.iot.dsa.node.DSIStorable +
+
+
Deserialize a value from the configuration database, these will be values + returned from the + store() method. +
+
+
restore(DSElement) + - Method in class org.iot.dsa.node.DSJavaEnum
+
 
+
restore(DSElement) + - Method in class org.iot.dsa.node.DSStatus
+
 
+
restore(File) - + Static method in class org.iot.dsa.security.DSKeys +
+
+
Decodes a key pair that was encoded by the store method.
+
+
restore(InputStream) + - Static method in class org.iot.dsa.security.DSKeys +
+
+
Decodes a key pair that was encoded by the store method, does not onClose + the given stream. +
+
+
restore(DSElement) + - Method in class org.iot.dsa.security.DSPasswordAes +
+
 
+
restore(DSElement) + - Method in class org.iot.dsa.security.DSPasswordSha256 +
+
 
+
run() + - Method in class org.iot.dsa.dslink.DSLink
+
+
Calls starts, waits the stableDelay, then calls stable.
+
+
run(Runnable) + - Static method in class org.iot.dsa.DSRuntime
+
+
Run as soon as possible on the application's thread pool and run only + once. +
+
+
run(Runnable, long, long) + - Static method in class org.iot.dsa.DSRuntime
+
+
Run periodically starting at the given time and repeat at the given + millisecond interval. +
+
+
run() - Method in class + org.iot.dsa.DSRuntime.Timer +
+
+
Do not call.
+
+
runAt(Runnable, long) + - Static method in class org.iot.dsa.DSRuntime
+
+
Run once at the given time.
+
+
runCount() + - Method in class org.iot.dsa.DSRuntime.Timer
+
+
The number of completed runs.
+
+
runDelayed(Runnable, long) + - Static method in class org.iot.dsa.DSRuntime
+
+
Run once after the given delay.
+
+
+ + + +

S

+
+
save() - Method in class + org.iot.dsa.dslink.DSLink
+
+
Serializes the configuration database.
+
+
send(DSList) + - Method in interface org.iot.dsa.node.action.ActionInvocation
+
+
Only use with stream and open tables.
+
+
set(String, DSIValue, OutboundRequestHandler) + - Method in interface org.iot.dsa.dslink.DSIRequester +
+
+
Submits a set request.
+
+
set(String, DSElement) + - Method in class org.iot.dsa.node.DSMetadata
+
+
Set arbitrary keys.
+
+
setAdmin(boolean) + - Method in class org.iot.dsa.node.DSInfo
+
 
+
setBackupThreshold(int) + - Method in class org.iot.dsa.logging.FileLogHandler +
+
+
The file size threshold after which a logging file will be backed up and + cleared. +
+
+
setBeginList() + - Method in class org.iot.dsa.io.AbstractReader
+
 
+
setBeginMap() + - Method in class org.iot.dsa.io.AbstractReader
+
 
+
setBit(int, int, boolean) + - Static method in class org.iot.dsa.util.DSUtil
+
+
Set or unset a bit at the given index.
+
+
setBooleanRange(DSList) + - Method in class org.iot.dsa.node.DSMetadata
+
+
The list must be size 2 and the entries must not be null.
+
+
setBooleanRange(String, String) + - Method in class org.iot.dsa.node.DSMetadata
+
+
The parameters can be null, which will result in the default text + (false/true). +
+
+
setBrokerUri(String) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
 
+
setConfig(String, boolean) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Modifies the in-memory representation of dslink.json, but it will not be + saved back to disk. +
+
+
setConfig(String, double) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Modifies the in-memory representation of dslink.json, but it will not be + saved back to disk. +
+
+
setConfig(String, int) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Modifies the in-memory representation of dslink.json, but it will not be + saved back to disk. +
+
+
setConfig(String, long) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Modifies the in-memory representation of dslink.json, but it will not be + saved back to disk. +
+
+
setConfig(String, String) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Modifies the in-memory representation of dslink.json, but it will not be + saved back to disk. +
+
+
setDecimalPlaces(DSLong) + - Method in class org.iot.dsa.node.DSMetadata
+
 
+
setDefault(DSIValue) + - Method in class org.iot.dsa.node.DSMetadata
+
+
Sets the default value only, does not set type information.
+
+
setDefaultLevel(Level) + - Static method in class org.iot.dsa.logging.DSLogging +
+
 
+
setDescription(String) + - Method in class org.iot.dsa.node.DSMetadata
+
 
+
setDetail(String) + - Method in exception org.iot.dsa.dslink.DSRequestException +
+
+
Overrides the default detail which is the stack trace of this exception. +
+
+
setDetail(Throwable) + - Method in exception org.iot.dsa.dslink.DSRequestException +
+
+
Overrides the default detail which is the stack trace of this exception. +
+
+
setDisplayName(String) + - Method in class org.iot.dsa.node.DSMetadata
+
 
+
setDslinkJson(DSMap) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Directly set the map without using file io.
+
+
setDslinkJson(File) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Sets the link map by file path.
+
+
setEditor(String) + - Method in class org.iot.dsa.node.DSMetadata
+
+
See the EDITOR_ constants.
+
+
setEndInput() + - Method in class org.iot.dsa.io.AbstractReader
+
 
+
setEndList() + - Method in class org.iot.dsa.io.AbstractReader
+
 
+
setEndMap() + - Method in class org.iot.dsa.io.AbstractReader
+
 
+
setEnumRange(DSList) + - Method in class org.iot.dsa.node.DSMetadata
+
+
List of string values for an enum or string.
+
+
setEnumRange(String...) + - Method in class org.iot.dsa.node.DSMetadata
+
+
List of string values for an enum or string.
+
+
setHidden(boolean) + - Method in class org.iot.dsa.node.DSInfo
+
 
+
setInput(CharSequence) + - Method in class org.iot.dsa.io.json.JsonReader +
+
+
Sets the input source, resets to ROOT, and returns this.
+
+
setInput(File) + - Method in class org.iot.dsa.io.json.JsonReader +
+
+
Sets the input source, resets to ROOT, and returns this.
+
+
setInput(InputStream, String) + - Method in class org.iot.dsa.io.json.JsonReader +
+
+
Sets the input source, resets to ROOT, and returns this.
+
+
setInput(Reader) + - Method in class org.iot.dsa.io.json.JsonReader +
+
+
Sets the input source, resets to ROOT, and returns this.
+
+
setInput(InputStream) + - Method in class org.iot.dsa.io.msgpack.MsgpackReader +
+
+
Sets the input source, resets to ROOT, and returns this.
+
+
setKeys(DSKeys) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Directly set the keys without using file io.
+
+
setKeys(File) - + Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Sets the link keys by file path.
+
+
setLinkName(String) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Overrides dslink.json.
+
+
setLogFile(File) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Overrides dslink.json.
+
+
setLogLevel(String) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Should be one of the following (case insensitive): all, finest, finer, + fine, config, info, + warning, severe, off. +
+
+
setLogLevel(Level) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Overrides dslink.json.
+
+
setMainType(Class) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
The type of the root node.
+
+
setMap(DSMap) + - Method in class org.iot.dsa.node.DSMetadata
+
+
Change the underlying map so the metadata instance can be reused.
+
+
setMaxBackups(int) + - Method in class org.iot.dsa.logging.FileLogHandler +
+
+
The default is 10.
+
+
setMaxQueueSize(int) + - Method in class org.iot.dsa.logging.AsyncLogHandler +
+
 
+
setMaxValue(DSElement) + - Method in class org.iot.dsa.node.DSMetadata
+
+
The arg should be a number.
+
+
setMinValue(DSElement) + - Method in class org.iot.dsa.node.DSMetadata
+
+
The arg should be a number.
+
+
setName(String) + - Method in class org.iot.dsa.node.DSMetadata
+
 
+
setNextValue(boolean) + - Method in class org.iot.dsa.io.AbstractReader
+
 
+
setNextValue(byte[]) + - Method in class org.iot.dsa.io.AbstractReader
+
 
+
setNextValue(double) + - Method in class org.iot.dsa.io.AbstractReader
+
 
+
setNextValue(long) - + Method in class org.iot.dsa.io.AbstractReader
+
 
+
setNextValue(String) + - Method in class org.iot.dsa.io.AbstractReader
+
 
+
setNextValueNull() - + Method in class org.iot.dsa.io.AbstractReader
+
 
+
setNodes(DSMainNode) + - Method in class org.iot.dsa.dslink.DSLink
+
 
+
setNodesFile(File) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Overrides dslink.json.
+
+
setOut(PrintStream) + - Method in class org.iot.dsa.logging.AsyncLogHandler +
+
+
Sets the sink for formatted messages.
+
+
setOutput(Appendable) + - Method in class org.iot.dsa.io.json.JsonAppender +
+
+
Sets the sink, resets the state and returns this.
+
+
setOutput(File) + - Method in class org.iot.dsa.io.json.JsonAppender +
+
+
Sets the sink, resets the state and returns this.
+
+
setOutput(File, String) + - Method in class org.iot.dsa.io.json.JsonAppender +
+
+
Will create a zip file using the zipFileName as file name inside the zip. +
+
+
setOutput(OutputStream) + - Method in class org.iot.dsa.io.json.JsonAppender +
+
+
Sets the sink, resets the state and returns this.
+
+
setOutput(OutputStream, String) + - Method in class org.iot.dsa.io.json.JsonAppender +
+
+
Will write a zip file to the given stream.
+
+
setOutput(File) + - Method in class org.iot.dsa.io.json.JsonWriter +
+
+
Sets the sink, resets the state and returns this.
+
+
setOutput(File, String) + - Method in class org.iot.dsa.io.json.JsonWriter +
+
+
Will create a zip file using the zipFileName as file name inside the zip. +
+
+
setOutput(OutputStream) + - Method in class org.iot.dsa.io.json.JsonWriter +
+
+
Sets the sink, resets the state and returns this.
+
+
setOutput(OutputStream, String) + - Method in class org.iot.dsa.io.json.JsonWriter +
+
+
Will write a zip file to the given stream.
+
+
setOutput(Writer) + - Method in class org.iot.dsa.io.json.JsonWriter +
+
+
Sets the sink, resets the state and returns this.
+
+
setPermission(DSPermission) + - Method in class org.iot.dsa.node.action.DSAction +
+
+
Returns this, it is not necessary to set the permission to read.
+
+
setPlaceHolder(String) + - Method in class org.iot.dsa.node.DSMetadata
+
+
Place holder text for text fields.
+
+
setPrettyPrint(boolean) + - Method in class org.iot.dsa.io.json.AbstractJsonWriter +
+
 
+
setReadOnly(boolean) + - Method in class org.iot.dsa.node.DSInfo
+
 
+
setRequester(boolean) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Overrides dslink.json.
+
+
setResponder(boolean) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Overrides dslink.json.
+
+
setResultType(ActionSpec.ResultType) + - Method in class org.iot.dsa.node.action.DSAction +
+
+
Returns this, it is not necessary to set the result to void.
+
+
setSaveEnabled(boolean) + - Method in class org.iot.dsa.dslink.DSLink
+
+
This is a transient option intended for unit tests.
+
+
setSkipMissedIntervals(boolean) + - Method in class org.iot.dsa.DSRuntime.Timer
+
+
The default is true, set this to false if all intervals should be run, even + if they run + later than scheduled. +
+
+
setToken(String) + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Overrides dslink.json.
+
+
setTransient(boolean) + - Method in class org.iot.dsa.node.DSInfo
+
 
+
setType(DSIValue) + - Method in class org.iot.dsa.node.DSMetadata
+
+
Sets the type and if the given is an enum, sets the enum range as well. +
+
+
setType(DSValueType) + - Method in class org.iot.dsa.node.DSMetadata
+
+
The type for action parameters, can be used to override types in the + responder api. +
+
+
setUnit(String) + - Method in class org.iot.dsa.node.DSMetadata
+
+
The unit identifier.
+
+
severe() - Method in class + org.iot.dsa.logging.DSLogger
+
+
True if the level is loggable.
+
+
severe(Object) + - Method in class org.iot.dsa.logging.DSLogger +
+
 
+
severe(Object, Throwable) + - Method in class org.iot.dsa.logging.DSLogger +
+
 
+
shouldEncode(int) + - Static method in class org.iot.dsa.node.DSPath
+
+
Returns true for characters that should be encoded.
+
+
shutdown() - Method in class + org.iot.dsa.dslink.DSLink
+
+
Properly shuts down the link when a thread is executing the run method. +
+
+
sign(byte[], int, int) + - Method in class org.iot.dsa.security.DSKeys +
+
+
A convenience that creates a signer and signs the given bytes.
+
+
Signer(PrivateKey) + - Constructor for class org.iot.dsa.security.DSKeys.Signer +
+
 
+
SimpleRequestHandler + - Class in org.iot.dsa.dslink.requester +
+
+
Empty callback implementations.
+
+
SimpleRequestHandler() + - Constructor for class org.iot.dsa.dslink.requester.SimpleRequestHandler
+
 
+
size() - Method in class + org.iot.dsa.node.DSGroup +
+
+
The number of items is the group.
+
+
size() + - Method in class org.iot.dsa.node.DSList
+
 
+
size() + - Method in class org.iot.dsa.node.DSMap
+
 
+
splitPath(String) + - Static method in class org.iot.dsa.node.DSPath
+
+
Splits the path, but does not decode any names.
+
+
stable() - Method in class + org.iot.dsa.node.DSNode +
+
+
Called after the entire subtree is started.
+
+
STALE + - Static variable in class org.iot.dsa.node.DSStatus +
+
+
Bad, the value hasn't updated in a reasonable amount of time (user + configurable on a per + point basis) within DSA. +
+
+
stale + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
STALE_STR - Static variable in + class org.iot.dsa.node.DSStatus
+
 
+
start() + - Method in class org.iot.dsa.logging.AsyncLogHandler +
+
+
This must be called for the handler to actually do anything.
+
+
start() - Method in class + org.iot.dsa.node.DSNode +
+
+
Sets the state to starting.
+
+
stop() + - Method in class org.iot.dsa.node.DSNode
+
+
Sets the state to stopped.
+
+
store() + - Method in class org.iot.dsa.node.DSFlexEnum
+
 
+
store() + - Method in interface org.iot.dsa.node.DSIStorable +
+
+
Serialize the value for the configuration database.
+
+
store() + - Method in class org.iot.dsa.node.DSJavaEnum
+
 
+
store() - Method in class + org.iot.dsa.node.DSStatus +
+
 
+
store(File) + - Method in class org.iot.dsa.security.DSKeys +
+
+
Write the bytes from the string encoding to the given file.
+
+
store(OutputStream) + - Method in class org.iot.dsa.security.DSKeys +
+
+
Writes the bytes from the string encoding to the given stream, does not + onClose the stream. +
+
+
store() + - Method in class org.iot.dsa.security.DSPasswordAes +
+
 
+
store() + - Method in class org.iot.dsa.security.DSPasswordSha256 +
+
 
+
subscribe(String, int, OutboundSubscribeHandler) + - Method in interface org.iot.dsa.dslink.DSIRequester +
+
+
Submits a subscribe request.
+
+
subscribe(DSTopic, DSInfo, DSISubscriber) + - Method in class org.iot.dsa.node.DSNode
+
+
Subscribes the child and topic.
+
+
SubscriptionCloseHandler + - Interface in org.iot.dsa.dslink.responder +
+
+
The responder returns this from the subscription request notification + method so the link can + notify the responder whenever a subscription is terminated. +
+
+
+ + + +

T

+
+
throwRuntime(Throwable) + - Static method in exception org.iot.dsa.util.DSException +
+
+
If the given exception is already a runtime exception, it is rethrown, + otherwise + it will be thrown wrapped by an instance of this class. +
+
+
timeInMillis() + - Method in class org.iot.dsa.time.DSDateTime
+
+
The Java time represented by this object.
+
+
toBoolean() - Method in class + org.iot.dsa.node.DSBool +
+
 
+
toBoolean() + - Method in class org.iot.dsa.node.DSDouble
+
 
+
toBoolean() + - Method in class org.iot.dsa.node.DSElement
+
+
Attempts to return a boolean value.
+
+
toBoolean() + - Method in interface org.iot.dsa.node.DSIBoolean +
+
 
+
toBoolean() - Method in class + org.iot.dsa.node.DSLong +
+
 
+
toBoolean() + - Method in class org.iot.dsa.node.DSString
+
 
+
toBytes() + - Method in class org.iot.dsa.node.DSBytes
+
 
+
toBytes() - Method in class + org.iot.dsa.node.DSElement +
+
+
Returns the raw byte array for DSBytes only, which should not be + modified. +
+
+
toDouble() - Method in class + org.iot.dsa.node.DSBool +
+
+
0 or 1.
+
+
toDouble() - Method in class + org.iot.dsa.node.DSDouble +
+
 
+
toDouble() - Method in class + org.iot.dsa.node.DSElement +
+
+
Attempts to return a double value.
+
+
toDouble() - Method in class + org.iot.dsa.node.DSFloat +
+
 
+
toDouble() + - Method in class org.iot.dsa.node.DSInt
+
 
+
toDouble() - Method in + interface org.iot.dsa.node.DSINumber
+
+
If not a double, will cast the underlying value.
+
+
toDouble() - Method in class + org.iot.dsa.node.DSLong +
+
 
+
toElement() + - Method in class org.iot.dsa.node.DSElement
+
+
Returns this.
+
+
toElement() + - Method in class org.iot.dsa.node.DSFlexEnum
+
 
+
toElement() - Method in class + org.iot.dsa.node.DSFloat +
+
 
+
toElement() - Method in class + org.iot.dsa.node.DSInt
+
 
+
toElement() + - Method in interface org.iot.dsa.node.DSIValue +
+
+
The current value should convert itself to an element for DSA interop such + as subscription + updates, and setting requests. +
+
+
toElement() + - Method in class org.iot.dsa.node.DSJavaEnum
+
 
+
toElement() - Method in class + org.iot.dsa.node.DSList +
+
 
+
toElement() - Method in class + org.iot.dsa.node.DSMap
+
 
+
toElement() - Method in class + org.iot.dsa.node.DSNull +
+
+
Returns this.
+
+
toElement() + - Method in class org.iot.dsa.node.DSStatus
+
 
+
toElement() + - Method in class org.iot.dsa.node.DSValueNode
+
 
+
toElement() + - Method in class org.iot.dsa.security.DSPasswordAes +
+
+
Returns a string representing the url safe base64 encoding of the hash. +
+
+
toElement() - + Method in class org.iot.dsa.security.DSPasswordSha256 +
+
+
Returns a string representing the url safe base64 encoding of the hash. +
+
+
toElement() + - Method in class org.iot.dsa.time.DSDateTime
+
 
+
toEnum() - Method in class + org.iot.dsa.node.DSJavaEnum +
+
+
The Java enum.
+
+
toFloat() + - Method in class org.iot.dsa.node.DSBool
+
+
0 or 1.
+
+
toFloat() - Method in class + org.iot.dsa.node.DSDouble +
+
 
+
toFloat() - Method in class + org.iot.dsa.node.DSElement +
+
+
Attempts to return a float value.
+
+
toFloat() + - Method in class org.iot.dsa.node.DSFloat
+
 
+
toFloat() - Method in class + org.iot.dsa.node.DSInt
+
 
+
toFloat() - Method in interface + org.iot.dsa.node.DSINumber
+
+
If not a float, will cast the underlying value.
+
+
toFloat() + - Method in class org.iot.dsa.node.DSLong
+
 
+
toGroup() - Method in class + org.iot.dsa.node.DSElement +
+
+
Lists and maps return themselves, everything else results in an + exception. +
+
+
toGroup() + - Method in class org.iot.dsa.node.DSGroup
+
 
+
toInt() - Method in class + org.iot.dsa.node.DSBool +
+
+
0 or 1.
+
+
toInt() - Method in class + org.iot.dsa.node.DSDouble +
+
 
+
toInt() - Method in class + org.iot.dsa.node.DSElement +
+
+
Attempts to return an int value.
+
+
toInt() - Method in class + org.iot.dsa.node.DSFloat +
+
 
+
toInt() - Method in class + org.iot.dsa.node.DSInt
+
 
+
toInt() - Method in interface + org.iot.dsa.node.DSINumber
+
+
If not an int, will cast the underlying value.
+
+
toInt() - Method in class + org.iot.dsa.node.DSLong +
+
 
+
toList() + - Method in class org.iot.dsa.node.DSElement
+
+
Lists return themselves, everything else results in an exception.
+
+
toList() - Method in class + org.iot.dsa.node.DSList +
+
 
+
toLong() - Method in class + org.iot.dsa.node.DSBool +
+
+
0 or 1.
+
+
toLong() + - Method in class org.iot.dsa.node.DSDouble
+
 
+
toLong() + - Method in class org.iot.dsa.node.DSElement
+
+
Attempts to return a long value.
+
+
toLong() - Method in class + org.iot.dsa.node.DSFloat +
+
 
+
toLong() - Method in class + org.iot.dsa.node.DSInt
+
 
+
toLong() + - Method in interface org.iot.dsa.node.DSINumber +
+
+
If not a long, will cast the underlying value.
+
+
toLong() - Method in class + org.iot.dsa.node.DSLong +
+
 
+
toMap() - Method in class + org.iot.dsa.node.DSElement +
+
+
Maps return themselves, everything else results in an exception.
+
+
toMap() - Method in class + org.iot.dsa.node.DSMap
+
 
+
toNode(Object) - + Static method in class org.iot.dsa.node.DSNode
+
+
A convenience that casts the argument to a node.
+
+
toNumber() - Method in class + org.iot.dsa.node.DSDouble +
+
 
+
toNumber() - Method in class + org.iot.dsa.node.DSFloat +
+
 
+
toNumber() + - Method in class org.iot.dsa.node.DSInt
+
 
+
toNumber() - Method in + interface org.iot.dsa.node.DSINumber
+
+
Returns the Java primitive wrapper.
+
+
toNumber() - Method in class + org.iot.dsa.node.DSLong +
+
 
+
toStatus() - Method in + interface org.iot.dsa.node.DSIStatus
+
 
+
toStatus() - Method in class + org.iot.dsa.node.DSStatus +
+
 
+
toString() + - Method in class org.iot.dsa.DSRuntime.Timer
+
 
+
toString() - + Method in enum org.iot.dsa.node.action.ActionSpec.ResultType
+
 
+
toString() - Method in class + org.iot.dsa.node.DSBool +
+
 
+
toString() - Method in class + org.iot.dsa.node.DSBytes +
+
 
+
toString() - Method in class + org.iot.dsa.node.DSDouble +
+
 
+
toString() + - Method in enum org.iot.dsa.node.DSElementType
+
 
+
toString() + - Method in class org.iot.dsa.node.DSFlexEnum
+
 
+
toString() - Method in class + org.iot.dsa.node.DSFloat +
+
 
+
toString() - Method in class + org.iot.dsa.node.DSGroup +
+
+
Json encodes the graph, be careful.
+
+
toString() - Method in interface + org.iot.dsa.node.DSIEnum
+
+
The string representation of the the enum value.
+
+
toString() + - Method in class org.iot.dsa.node.DSInt
+
 
+
toString() + - Method in class org.iot.dsa.node.DSJavaEnum
+
 
+
toString() - Method in class + org.iot.dsa.node.DSLong +
+
 
+
toString() - Method in class + org.iot.dsa.node.DSNull +
+
 
+
toString() - Method in class + org.iot.dsa.node.DSStatus +
+
 
+
toString() - Method in class + org.iot.dsa.node.DSString +
+
 
+
toString() - Method in class + org.iot.dsa.node.DSValue +
+
+
If isNull(), returns "null", otherwise returns toElement().toString()
+
+
toString() + - Method in enum org.iot.dsa.node.DSValueType
+
 
+
toString() + - Method in class org.iot.dsa.security.DSPasswordAes +
+
 
+
toString() - Method + in class org.iot.dsa.security.DSPasswordSha256 +
+
 
+
toString() + - Method in enum org.iot.dsa.security.DSPermission +
+
 
+
toString() + - Method in class org.iot.dsa.time.DSDateTime
+
+
ISO 8601 standard format of "yyyy-mm-ddThh:mm:ss.mmm[+/-]hh:mm".
+
+
toString() + - Method in exception org.iot.dsa.util.DSException +
+
 
+
trimBackups() - + Method in class org.iot.dsa.logging.FileLogHandler +
+
+
Only public for testing, do not call.
+
+
TRUE - + Static variable in class org.iot.dsa.node.DSBool
+
 
+
TYPE + - Static variable in class org.iot.dsa.node.DSMetadata +
+
 
+
+ + + +

U

+
+
UNIT + - Static variable in class org.iot.dsa.node.DSMetadata +
+
 
+
UNKNOWN - Static variable in class + org.iot.dsa.node.DSStatus +
+
+
Bad, the status is unknown within DSA, typically the initial state at + boot. +
+
+
unknown - Static variable in class + org.iot.dsa.node.DSStatus +
+
 
+
UNKNOWN_STR + - Static variable in class org.iot.dsa.node.DSStatus +
+
 
+
unsubscribe(DSTopic, DSInfo, DSISubscriber) + - Method in class org.iot.dsa.node.DSNode
+
+
Unsubscribes the tuple.
+
+
update(long, DSIValue, DSStatus) + - Method in interface org.iot.dsa.dslink.responder.InboundSubscribeRequest
+
+
The responder should call this when first received and then whenever the + value or status + changes. +
+
+
update(byte[]) - + Method in class org.iot.dsa.security.DSKeys.Signer +
+
+
Update the signature with the given bytes.
+
+
update(byte[], int, int) + - Method in class org.iot.dsa.security.DSKeys.Signer +
+
+
Update the signature with the given bytes.
+
+
update(byte[]) - + Method in class org.iot.dsa.security.DSKeys.Verifier +
+
+
Update the signature with the given bytes.
+
+
update(byte[], int, int) + - Method in class org.iot.dsa.security.DSKeys.Verifier +
+
+
Update the signature with the given bytes.
+
+
UTF8 - + Static variable in class org.iot.dsa.node.DSString +
+
+
The standard UTF8 charset, can be used with string.getBytes(Charset).
+
+
+ + + +

V

+
+
valBoolean + - Variable in class org.iot.dsa.io.AbstractReader
+
 
+
valBytes - Variable in class + org.iot.dsa.io.AbstractReader +
+
 
+
validate(byte[]) + - Method in class org.iot.dsa.security.DSKeys.Verifier +
+
+
Returns true if the given signature is valid for the bytes passed to + update. +
+
+
validate(String) + - Method in class org.iot.dsa.security.DSKeys.Verifier +
+
+
Returns true if the given base 64 encoded signature is valid for the bytes + passed to + update. +
+
+
validateChild(DSIObject) + - Method in class org.iot.dsa.node.DSNode
+
+
Override point, throw a meaningful IllegalArgumentException if the child is + not allowed +
+
+
validateParent(DSNode) + - Method in class org.iot.dsa.dslink.DSMainNode +
+
+
The parent must be a DSLink instance.
+
+
validateParent(DSNode) + - Method in class org.iot.dsa.node.DSNode
+
+
Override point, throw a meaningful IllegalArgumentException if the parent + is not allowed +
+
+
valLong - Variable in class + org.iot.dsa.io.AbstractReader +
+
 
+
valReal - Variable in class + org.iot.dsa.io.AbstractReader +
+
 
+
valString + - Variable in class org.iot.dsa.io.AbstractReader
+
 
+
value(DSElement) + - Method in class org.iot.dsa.io.AbstractWriter
+
 
+
value(boolean) + - Method in class org.iot.dsa.io.AbstractWriter
+
 
+
value(byte[]) + - Method in class org.iot.dsa.io.AbstractWriter
+
 
+
value(double) + - Method in class org.iot.dsa.io.AbstractWriter
+
 
+
value(int) + - Method in class org.iot.dsa.io.AbstractWriter
+
 
+
value(long) + - Method in class org.iot.dsa.io.AbstractWriter
+
 
+
value(String) - + Method in class org.iot.dsa.io.AbstractWriter
+
 
+
value(DSElement) + - Method in interface org.iot.dsa.io.DSIWriter
+
+
Write a value to the map or list.
+
+
value(boolean) + - Method in interface org.iot.dsa.io.DSIWriter
+
+
Write a value to the map or list.
+
+
value(byte[]) + - Method in interface org.iot.dsa.io.DSIWriter
+
+
Write a value to the map or list.
+
+
value(double) + - Method in interface org.iot.dsa.io.DSIWriter
+
+
Write a value to the map or list.
+
+
value(int) - Method in interface + org.iot.dsa.io.DSIWriter +
+
+
Write a value to the map or list.
+
+
value(long) - Method in + interface org.iot.dsa.io.DSIWriter
+
+
Write a value to the map or list.
+
+
value(String) - + Method in interface org.iot.dsa.io.DSIWriter
+
+
Write a value to the map or list.
+
+
value(DSElement) + - Method in class org.iot.dsa.io.json.AbstractJsonWriter +
+
 
+
VALUE_TOPIC - Static variable in + class org.iot.dsa.node.DSNode
+
 
+
valueOf(String) + - Static method in enum org.iot.dsa.dslink.requester.OutboundInvokeHandler.Mode
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) + - Static method in enum org.iot.dsa.io.DSIReader.Token +
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) + - Static method in enum org.iot.dsa.node.action.ActionSpec.ResultType
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(boolean) + - Static method in class org.iot.dsa.node.DSBool
+
+
Will return either TRUE or FALSE.
+
+
valueOf(DSElement) + - Method in class org.iot.dsa.node.DSBool
+
 
+
valueOf(String) - + Static method in class org.iot.dsa.node.DSBool
+
+
Will return NULL, TRUE or FALSE.
+
+
valueOf(byte[]) + - Static method in class org.iot.dsa.node.DSBytes +
+
 
+
valueOf(DSElement) + - Method in class org.iot.dsa.node.DSBytes
+
 
+
valueOf(String) - + Static method in class org.iot.dsa.node.DSBytes
+
+
Decodes a base64 encoded byte array.
+
+
valueOf(double) + - Static method in class org.iot.dsa.node.DSDouble +
+
+
Attempts to reuse some common values before creating a new instance.
+
+
valueOf(DSElement) + - Method in class org.iot.dsa.node.DSDouble
+
 
+
valueOf(String) - + Static method in class org.iot.dsa.node.DSDouble
+
+
Checks for null, then uses Double.parseDouble()
+
+
valueOf(DSElement) + - Method in class org.iot.dsa.node.DSElement
+
+
Returns the argument.
+
+
valueOf(String) + - Static method in enum org.iot.dsa.node.DSElementType +
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(DSElement) + - Method in class org.iot.dsa.node.DSFlexEnum
+
 
+
valueOf(String, DSList) + - Static method in class org.iot.dsa.node.DSFlexEnum +
+
+
Creates a enum representing the given value and range.
+
+
valueOf(String) + - Method in class org.iot.dsa.node.DSFlexEnum
+
+
Creates a new enum for the given value using the range from this + instance. +
+
+
valueOf(DSElement) + - Method in class org.iot.dsa.node.DSFloat
+
 
+
valueOf(float) + - Static method in class org.iot.dsa.node.DSFloat +
+
+
Attempts to reuse some common values before creating a new instance.
+
+
valueOf(String) - + Static method in class org.iot.dsa.node.DSFloat
+
+
Checks for null, then uses Float.parseFloat()
+
+
valueOf(DSElement) + - Method in class org.iot.dsa.node.DSInt
+
 
+
valueOf(int) - Static method in + class org.iot.dsa.node.DSInt
+
+
Attempts to reuse some common values before creating a new instance.
+
+
valueOf(String) - + Static method in class org.iot.dsa.node.DSInt
+
+
Checks for null, then uses Float.parseFloat()
+
+
valueOf(DSElement) + - Method in interface org.iot.dsa.node.DSIValue +
+
+
This should convert an element transmitted over DSA, such as subscription + updates or set + requests. +
+
+
valueOf(DSElement) + - Method in class org.iot.dsa.node.DSJavaEnum
+
 
+
valueOf(Enum) - + Static method in class org.iot.dsa.node.DSJavaEnum +
+
+
Creates an enum for the given value (and it's range).
+
+
valueOf(String) + - Method in class org.iot.dsa.node.DSJavaEnum
+
 
+
valueOf(DSElement) + - Method in class org.iot.dsa.node.DSList
+
 
+
valueOf(DSElement...) + - Static method in class org.iot.dsa.node.DSList
+
 
+
valueOf(Double...) + - Static method in class org.iot.dsa.node.DSList
+
 
+
valueOf(Long...) - + Static method in class org.iot.dsa.node.DSList
+
 
+
valueOf(String...) + - Static method in class org.iot.dsa.node.DSList
+
 
+
valueOf(DSElement) + - Method in class org.iot.dsa.node.DSLong
+
+
Returns this.
+
+
valueOf(long) + - Static method in class org.iot.dsa.node.DSLong
+
+
Attempts to reuse some common values before creating a new instance.
+
+
valueOf(String) - + Static method in class org.iot.dsa.node.DSLong
+
+
Checks for null, then uses Float.parseFloat()
+
+
valueOf(DSElement) + - Method in class org.iot.dsa.node.DSMap
+
 
+
valueOf(DSElement) + - Method in class org.iot.dsa.node.DSNull
+
+
Returns this.
+
+
valueOf(DSElement) + - Method in class org.iot.dsa.node.DSStatus
+
 
+
valueOf(String) - + Static method in class org.iot.dsa.node.DSStatus
+
 
+
valueOf(DSElement) + - Method in class org.iot.dsa.node.DSString
+
 
+
valueOf(Object) - + Static method in class org.iot.dsa.node.DSString
+
 
+
valueOf(DSElement) + - Method in class org.iot.dsa.node.DSValueNode
+
 
+
valueOf(String) + - Static method in enum org.iot.dsa.node.DSValueType +
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) + - Static method in enum org.iot.dsa.node.event.DSInfoTopic.Event
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) + - Static method in enum org.iot.dsa.node.event.DSValueTopic.Event
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(DSElement) + - Method in class org.iot.dsa.security.DSPasswordAes +
+
+
Creates a encrypted password for the given clear text.
+
+
valueOf(String) + - Static method in class org.iot.dsa.security.DSPasswordAes +
+
+
Creates a encrypted password for the given clear text.
+
+
valueOf(DSElement) + - Method in class org.iot.dsa.security.DSPasswordSha256 +
+
+
Creates a digest password for the given clear text.
+
+
valueOf(String) + - Static method in class org.iot.dsa.security.DSPasswordSha256 +
+
+
Creates a digest password for the given clear text.
+
+
valueOf(String) + - Static method in enum org.iot.dsa.security.DSPermission +
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(DSElement) + - Method in class org.iot.dsa.time.DSDateTime
+
 
+
valueOf(long) + - Static method in class org.iot.dsa.time.DSDateTime +
+
 
+
valueOf(String) + - Static method in class org.iot.dsa.time.DSDateTime +
+
+
Decodes an ISO 8601 standard format of + "yyyy-mm-ddThh:mm:ss.mmm[+/-]hh:mm". +
+
+
valueOf(String) + - Static method in enum org.iot.dsa.time.DSInterval +
+
+
Returns the enum constant of this type with the specified name.
+
+
values() + - Static method in enum org.iot.dsa.dslink.requester.OutboundInvokeHandler.Mode
+
+
Returns an array containing the constants of this enum type, in + the order they are declared. +
+
+
values() - Static method in + enum org.iot.dsa.io.DSIReader.Token
+
+
Returns an array containing the constants of this enum type, in + the order they are declared. +
+
+
values() - + Static method in enum org.iot.dsa.node.action.ActionSpec.ResultType
+
+
Returns an array containing the constants of this enum type, in + the order they are declared. +
+
+
values() - Static method in + enum org.iot.dsa.node.DSElementType
+
+
Returns an array containing the constants of this enum type, in + the order they are declared. +
+
+
values() - Static method in + enum org.iot.dsa.node.DSValueType
+
+
Returns an array containing the constants of this enum type, in + the order they are declared. +
+
+
values() - Static + method in enum org.iot.dsa.node.event.DSInfoTopic.Event +
+
+
Returns an array containing the constants of this enum type, in + the order they are declared. +
+
+
values() - Static + method in enum org.iot.dsa.node.event.DSValueTopic.Event +
+
+
Returns an array containing the constants of this enum type, in + the order they are declared. +
+
+
values() + - Static method in enum org.iot.dsa.security.DSPermission +
+
+
Returns an array containing the constants of this enum type, in + the order they are declared. +
+
+
values() - Static method in enum + org.iot.dsa.time.DSInterval +
+
+
Returns an array containing the constants of this enum type, in + the order they are declared. +
+
+
Verifier(PublicKey) + - Constructor for class org.iot.dsa.security.DSKeys.Verifier +
+
 
+
verify(byte[], int, int, String) + - Method in class org.iot.dsa.security.DSKeys +
+
+
A convenience that creates a verifier and validates the signature for the + given bytes. +
+
+
+ + + +

W

+
+
warn() - Method in class + org.iot.dsa.logging.DSLogger
+
+
True if the level is loggable.
+
+
warn(Object) - + Method in class org.iot.dsa.logging.DSLogger
+
+
Log an unusual but not critical event.
+
+
warn(Object, Throwable) + - Method in class org.iot.dsa.logging.DSLogger +
+
+
Log an unusual but not critical event.
+
+
wasHelpRequested() + - Method in class org.iot.dsa.dslink.DSLinkConfig +
+
+
Whether or not -h or --help was provided.
+
+
write(boolean) + - Method in class org.iot.dsa.io.AbstractWriter
+
+
Write the value.
+
+
write(byte[]) + - Method in class org.iot.dsa.io.AbstractWriter
+
+
Write the value.
+
+
write(double) + - Method in class org.iot.dsa.io.AbstractWriter
+
+
Write the value.
+
+
write(long) + - Method in class org.iot.dsa.io.AbstractWriter
+
+
Write the value.
+
+
write(boolean) + - Method in class org.iot.dsa.io.json.AbstractJsonWriter +
+
 
+
write(byte[]) - + Method in class org.iot.dsa.io.json.AbstractJsonWriter +
+
 
+
write(double) - + Method in class org.iot.dsa.io.json.AbstractJsonWriter +
+
 
+
write(long) - + Method in class org.iot.dsa.io.json.AbstractJsonWriter +
+
 
+
write(boolean) - + Method in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
 
+
write(byte[]) - + Method in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
 
+
write(double) - + Method in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
 
+
write(long) - Method + in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
 
+
write(LogRecord) + - Method in class org.iot.dsa.logging.AsyncLogHandler +
+
+
Formats and writes the logging record the underlying stream.
+
+
writeDouble(double, byte[], int, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Encodes the primitive into a byte array.
+
+
writeDouble(double, OutputStream, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Encodes the primitive into a stream.
+
+
writeFloat(float, byte[], int, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Encodes the primitive into a byte array.
+
+
writeFloat(float, OutputStream, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Encodes the primitive into a stream
+
+
writeInt(int, byte[], int, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Encodes the primitive into a byte array.
+
+
writeInt(int, OutputStream, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Encodes the primitive into a stream.
+
+
writeKey(CharSequence) + - Method in class org.iot.dsa.io.AbstractWriter
+
+
Write string key of a map entry.
+
+
writeKey(CharSequence) + - Method in class org.iot.dsa.io.json.AbstractJsonWriter +
+
 
+
writeKey(CharSequence) + - Method in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
 
+
writeKeyValueSeparator() + - Method in class org.iot.dsa.io.AbstractWriter
+
+
Separate the key from the value in a map.
+
+
writeKeyValueSeparator() + - Method in class org.iot.dsa.io.json.AbstractJsonWriter +
+
 
+
writeKeyValueSeparator() + - Method in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
 
+
writeListEnd() + - Method in class org.iot.dsa.io.AbstractWriter
+
+
End the current list.
+
+
writeListEnd() + - Method in class org.iot.dsa.io.json.AbstractJsonWriter +
+
 
+
writeListEnd() - + Method in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
 
+
writeListStart(int) + - Method in class org.iot.dsa.io.AbstractWriter
+
+
Start a new list.
+
+
writeListStart(int) + - Method in class org.iot.dsa.io.json.AbstractJsonWriter +
+
 
+
writeListStart(int) + - Method in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
+
A negative size implies dynamic and will be written when the list is + closed. +
+
+
writeLong(long, byte[], int, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Encodes the primitive into a byte array.
+
+
writeLong(long, OutputStream, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Encodes the primitive into a stream.
+
+
writeMapEnd() + - Method in class org.iot.dsa.io.AbstractWriter
+
+
End the current map.
+
+
writeMapEnd() - + Method in class org.iot.dsa.io.json.AbstractJsonWriter +
+
 
+
writeMapEnd() - + Method in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
 
+
writeMapStart(int) - + Method in class org.iot.dsa.io.AbstractWriter
+
+
Start a new map.
+
+
writeMapStart(int) + - Method in class org.iot.dsa.io.json.AbstractJsonWriter +
+
 
+
writeMapStart(int) + - Method in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
+
A negative size implies dynamic and will be written when the map is + closed. +
+
+
writeNewLineIndent() + - Method in class org.iot.dsa.io.AbstractWriter
+
+
Override point for subclasses which perform use pretty printing, such as + json. +
+
+
writeNewLineIndent() + - Method in class org.iot.dsa.io.json.AbstractJsonWriter +
+
+
Two spaces per level.
+
+
writeNewLineIndent() + - Method in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
 
+
writeNull() + - Method in class org.iot.dsa.io.AbstractWriter
+
+
Write a null value.
+
+
writeNull() - + Method in class org.iot.dsa.io.json.AbstractJsonWriter +
+
 
+
writeNull() - Method + in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
 
+
writeSeparator() + - Method in class org.iot.dsa.io.AbstractWriter
+
+
Write a value separator, such as the comma in json.
+
+
writeSeparator() + - Method in class org.iot.dsa.io.json.AbstractJsonWriter +
+
 
+
writeSeparator() + - Method in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
 
+
writeShort(short, byte[], int, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Encodes the primitive into a byte array.
+
+
writeShort(short, OutputStream, boolean) + - Static method in class org.iot.dsa.node.DSBytes +
+
+
Encodes the primitive into a stream.
+
+
writeTo(ByteBuffer) + - Method in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
+
Writes the internal buffer to the parameter.
+
+
writeTo(OutputStream) + - Method in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
+
Writes the internal buffer to the parameter.
+
+
writeValue(CharSequence) + - Method in class org.iot.dsa.io.AbstractWriter
+
+
Write the value, which will never be null.
+
+
writeValue(CharSequence) + - Method in class org.iot.dsa.io.json.AbstractJsonWriter +
+
 
+
writeValue(CharSequence) + - Method in class org.iot.dsa.io.msgpack.MsgpackWriter +
+
 
+
+ A B C D E F G H I J K L M N O P R S T U V W  +
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + + + + diff --git a/docs/javadoc/index.html b/docs/javadoc/index.html index 5a034975..b222090b 100644 --- a/docs/javadoc/index.html +++ b/docs/javadoc/index.html @@ -1,10 +1,11 @@ - + - -dslink-core 0.15.0 API - + + - - - - - - -<noscript> -<div>JavaScript is disabled on your browser.</div> -</noscript> -<h2>Frame Alert</h2> -<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="overview-summary.html">Non-frame version</a>.</p> - + + + + + + + <noscript> + <div>JavaScript is disabled on your browser.</div> + </noscript> + <h2>Frame Alert</h2> + <p>This document is designed to be viewed using the frames feature. If you see this message, you + are using a non-frame-capable web client. Link to <a href="overview-summary.html">Non-frame + version</a>.</p> + diff --git a/docs/javadoc/org/iot/dsa/DSRuntime.Timer.html b/docs/javadoc/org/iot/dsa/DSRuntime.Timer.html index 3b03235d..034121ee 100644 --- a/docs/javadoc/org/iot/dsa/DSRuntime.Timer.html +++ b/docs/javadoc/org/iot/dsa/DSRuntime.Timer.html @@ -1,12 +1,13 @@ - + - -DSRuntime.Timer (dslink-core 0.15.0 API) - - - + + DSRuntime.Timer (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + +
-
org.iot.dsa
-

Class DSRuntime.Timer

+
org.iot.dsa
+

Class DSRuntime.Timer

- -
- +
+
+ +
+
+ +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + + diff --git a/docs/javadoc/org/iot/dsa/DSRuntime.html b/docs/javadoc/org/iot/dsa/DSRuntime.html index 66827a3f..87c1e30e 100644 --- a/docs/javadoc/org/iot/dsa/DSRuntime.html +++ b/docs/javadoc/org/iot/dsa/DSRuntime.html @@ -1,12 +1,13 @@ - + - -DSRuntime (dslink-core 0.15.0 API) - - - + + DSRuntime (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + +
-
org.iot.dsa
-

Class DSRuntime

+
org.iot.dsa
+

Class DSRuntime

- -
- + + + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + + diff --git a/docs/javadoc/org/iot/dsa/io/AbstractReader.html b/docs/javadoc/org/iot/dsa/io/AbstractReader.html index 91d043c9..5d090b50 100644 --- a/docs/javadoc/org/iot/dsa/io/AbstractReader.html +++ b/docs/javadoc/org/iot/dsa/io/AbstractReader.html @@ -1,12 +1,13 @@ - + - -AbstractReader (dslink-core 0.15.0 API) - - - + + AbstractReader (dslink-core 0.15.0 API) + + +
- - -
Skip navigation links
- - - - + + +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + +
-
org.iot.dsa.io
-

Class AbstractReader

+
org.iot.dsa.io
+

Class AbstractReader

- -
-
+
+
Specified by:
+
next in + interface DSIReader +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- - -
Skip navigation links
- - - - + + +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + + diff --git a/docs/javadoc/org/iot/dsa/io/AbstractWriter.html b/docs/javadoc/org/iot/dsa/io/AbstractWriter.html index 6af2eb3c..47fc86c6 100644 --- a/docs/javadoc/org/iot/dsa/io/AbstractWriter.html +++ b/docs/javadoc/org/iot/dsa/io/AbstractWriter.html @@ -1,12 +1,13 @@ - + - -AbstractWriter (dslink-core 0.15.0 API) - - - + + AbstractWriter (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + +
-
org.iot.dsa.io
-

Class AbstractWriter

+
org.iot.dsa.io
+

Class AbstractWriter

- -
- + + + + +
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + + diff --git a/docs/javadoc/org/iot/dsa/io/DSBase64.html b/docs/javadoc/org/iot/dsa/io/DSBase64.html index 1624870a..0191cb06 100644 --- a/docs/javadoc/org/iot/dsa/io/DSBase64.html +++ b/docs/javadoc/org/iot/dsa/io/DSBase64.html @@ -1,12 +1,13 @@ - + - -DSBase64 (dslink-core 0.15.0 API) - - - + + DSBase64 (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + +
-
org.iot.dsa.io
-

Class DSBase64

+
org.iot.dsa.io
+

Class DSBase64

- -
- + + + + + + + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + + diff --git a/docs/javadoc/org/iot/dsa/io/DSIReader.Token.html b/docs/javadoc/org/iot/dsa/io/DSIReader.Token.html index 8e3b16e4..e30a9f6d 100644 --- a/docs/javadoc/org/iot/dsa/io/DSIReader.Token.html +++ b/docs/javadoc/org/iot/dsa/io/DSIReader.Token.html @@ -1,12 +1,13 @@ - + - -DSIReader.Token (dslink-core 0.15.0 API) - - - + + DSIReader.Token (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + +
-
org.iot.dsa.io
-

Enum DSIReader.Token

+
org.iot.dsa.io
+

Enum DSIReader.Token

- -
- -
-
- -
-
- +
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + + diff --git a/docs/javadoc/org/iot/dsa/io/DSIReader.html b/docs/javadoc/org/iot/dsa/io/DSIReader.html index b64689d2..7472153d 100644 --- a/docs/javadoc/org/iot/dsa/io/DSIReader.html +++ b/docs/javadoc/org/iot/dsa/io/DSIReader.html @@ -1,12 +1,13 @@ - + - -DSIReader (dslink-core 0.15.0 API) - - - + + DSIReader (dslink-core 0.15.0 API) + + +
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + +
-
org.iot.dsa.io
-

Interface DSIReader

+
org.iot.dsa.io
+

Interface DSIReader

-
-
+ + +
+
+ +
+
+ +
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + + diff --git a/docs/javadoc/org/iot/dsa/io/DSIWriter.html b/docs/javadoc/org/iot/dsa/io/DSIWriter.html index 4da4f7af..64d5b20f 100644 --- a/docs/javadoc/org/iot/dsa/io/DSIWriter.html +++ b/docs/javadoc/org/iot/dsa/io/DSIWriter.html @@ -1,12 +1,13 @@ - + - -DSIWriter (dslink-core 0.15.0 API) - - - + + DSIWriter (dslink-core 0.15.0 API) + + +
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + +
-
org.iot.dsa.io
-

Interface DSIWriter

+
org.iot.dsa.io
+

Interface DSIWriter

-
-
+ + +
+
+ +
+
+ +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + + diff --git a/docs/javadoc/org/iot/dsa/io/NodeDecoder.html b/docs/javadoc/org/iot/dsa/io/NodeDecoder.html index eaa4e070..97c08352 100644 --- a/docs/javadoc/org/iot/dsa/io/NodeDecoder.html +++ b/docs/javadoc/org/iot/dsa/io/NodeDecoder.html @@ -1,12 +1,13 @@ - + - -NodeDecoder (dslink-core 0.15.0 API) - - - + + NodeDecoder (dslink-core 0.15.0 API) + + +
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + +
-
org.iot.dsa.io
-

Class NodeDecoder

+
org.iot.dsa.io
+

Class NodeDecoder

- -
-
+
+
See Also:
+
NodeEncoder +
+
+ + +
+
+ +
+
+ +
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + + diff --git a/docs/javadoc/org/iot/dsa/io/NodeEncoder.html b/docs/javadoc/org/iot/dsa/io/NodeEncoder.html index e3108225..afc5d225 100644 --- a/docs/javadoc/org/iot/dsa/io/NodeEncoder.html +++ b/docs/javadoc/org/iot/dsa/io/NodeEncoder.html @@ -1,12 +1,13 @@ - + - -NodeEncoder (dslink-core 0.15.0 API) - - - + + NodeEncoder (dslink-core 0.15.0 API) + + +
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + +
-
org.iot.dsa.io
-

Class NodeEncoder

+
org.iot.dsa.io
+

Class NodeEncoder

- -
-
+
+
See Also:
+
NodeDecoder +
+
+ + +
+
+ +
+
+ +
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + + diff --git a/docs/javadoc/org/iot/dsa/io/package-frame.html b/docs/javadoc/org/iot/dsa/io/package-frame.html index 409ff783..fa48900e 100644 --- a/docs/javadoc/org/iot/dsa/io/package-frame.html +++ b/docs/javadoc/org/iot/dsa/io/package-frame.html @@ -1,33 +1,43 @@ - + - -org.iot.dsa.io (dslink-core 0.15.0 API) - - - + + org.iot.dsa.io (dslink-core 0.15.0 API) + + + -

org.iot.dsa.io

+

org.iot.dsa.io +

-

Interfaces

- -

Classes

- -

Enums

- +

Interfaces

+ +

Classes

+ +

Enums

+
diff --git a/docs/javadoc/org/iot/dsa/io/package-summary.html b/docs/javadoc/org/iot/dsa/io/package-summary.html index 6f007d2d..5249de06 100644 --- a/docs/javadoc/org/iot/dsa/io/package-summary.html +++ b/docs/javadoc/org/iot/dsa/io/package-summary.html @@ -1,12 +1,13 @@ - + - -org.iot.dsa.io (dslink-core 0.15.0 API) - - - + + org.iot.dsa.io (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + + + +
-

Package org.iot.dsa.io

-
-
Node serialization and streaming abstraction for JSON and MsgPack.
-
-

See: Description

+

Package org.iot.dsa.io

+
+
Node serialization and streaming abstraction for JSON and MsgPack.
+
+

See: Description

- - - - -

Package org.iot.dsa.io Description

-
Node serialization and streaming abstraction for JSON and MsgPack.
+ + + + +

Package org.iot.dsa.io Description

+
Node serialization and streaming abstraction for JSON and MsgPack.
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + + + + diff --git a/docs/javadoc/org/iot/dsa/io/package-tree.html b/docs/javadoc/org/iot/dsa/io/package-tree.html index 0f8bdbb5..cfaab144 100644 --- a/docs/javadoc/org/iot/dsa/io/package-tree.html +++ b/docs/javadoc/org/iot/dsa/io/package-tree.html @@ -1,12 +1,13 @@ - + - -org.iot.dsa.io Class Hierarchy (dslink-core 0.15.0 API) - - - + + org.iot.dsa.io Class Hierarchy (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + + + +
-

Hierarchy For Package org.iot.dsa.io

-Package Hierarchies: - +

Hierarchy For Package org.iot.dsa.io

+ Package Hierarchies: +
-

Class Hierarchy

- -

Interface Hierarchy

- -

Enum Hierarchy

- +

Class Hierarchy

+ +

Interface Hierarchy

+ +

Enum Hierarchy

+
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + + + + diff --git a/docs/javadoc/org/iot/dsa/node/DSBool.html b/docs/javadoc/org/iot/dsa/node/DSBool.html index f827712b..77c8718a 100644 --- a/docs/javadoc/org/iot/dsa/node/DSBool.html +++ b/docs/javadoc/org/iot/dsa/node/DSBool.html @@ -1,12 +1,13 @@ - + - -DSBool (dslink-core 0.15.0 API) - - - + + DSBool (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + +
-
org.iot.dsa.node
-

Class DSBool

+
org.iot.dsa.node
+

Class DSBool

- -
- +
+
+ +
+
+ +
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + + diff --git a/docs/javadoc/org/iot/dsa/node/DSInfo.html b/docs/javadoc/org/iot/dsa/node/DSInfo.html index e5e4c88f..a26ff364 100644 --- a/docs/javadoc/org/iot/dsa/node/DSInfo.html +++ b/docs/javadoc/org/iot/dsa/node/DSInfo.html @@ -1,12 +1,13 @@ - + - -DSInfo (dslink-core 0.15.0 API) - - - + + DSInfo (dslink-core 0.15.0 API) + + +
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + +
-
org.iot.dsa.node
-

Class DSInfo

+
org.iot.dsa.node
+

Class DSInfo

- -
- -
-
- -
-
- -
+

+ + + +
+ +
+
+ +
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + + diff --git a/docs/javadoc/org/iot/dsa/node/DSInt.html b/docs/javadoc/org/iot/dsa/node/DSInt.html index 9ed4e21e..9771dc76 100644 --- a/docs/javadoc/org/iot/dsa/node/DSInt.html +++ b/docs/javadoc/org/iot/dsa/node/DSInt.html @@ -1,12 +1,13 @@ - + - -DSInt (dslink-core 0.15.0 API) - - - + + DSInt (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + +
-
org.iot.dsa.node
-

Class DSInt

+
org.iot.dsa.node
+

Class DSInt

- -
- +
+
+ +
+
+ +
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + + diff --git a/docs/javadoc/org/iot/dsa/node/DSList.html b/docs/javadoc/org/iot/dsa/node/DSList.html index 03bad3de..9948d017 100644 --- a/docs/javadoc/org/iot/dsa/node/DSList.html +++ b/docs/javadoc/org/iot/dsa/node/DSList.html @@ -1,12 +1,13 @@ - + - -DSList (dslink-core 0.15.0 API) - - - + + DSList (dslink-core 0.15.0 API) + + +
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + +
-
org.iot.dsa.node
-

Class DSList

+
org.iot.dsa.node
+

Class DSList

- -
- -
-
- -
-
-
+ + +
+
+ +
+
+ -
+
Primitive setter, returns this.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + + diff --git a/docs/javadoc/org/iot/dsa/node/DSLong.html b/docs/javadoc/org/iot/dsa/node/DSLong.html index fa9cb7f7..3eea3c1c 100644 --- a/docs/javadoc/org/iot/dsa/node/DSLong.html +++ b/docs/javadoc/org/iot/dsa/node/DSLong.html @@ -1,12 +1,13 @@ - + - -DSLong (dslink-core 0.15.0 API) - - - + + DSLong (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + +
-
org.iot.dsa.node
-

Class DSLong

+
org.iot.dsa.node
+

Class DSLong

- -
- +
+
+ +
+
+ +
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + + diff --git a/docs/javadoc/org/iot/dsa/node/DSMap.html b/docs/javadoc/org/iot/dsa/node/DSMap.html index 5321da59..cd97debb 100644 --- a/docs/javadoc/org/iot/dsa/node/DSMap.html +++ b/docs/javadoc/org/iot/dsa/node/DSMap.html @@ -1,12 +1,13 @@ - + - -DSMap (dslink-core 0.15.0 API) - - - + + DSMap (dslink-core 0.15.0 API) + + +
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + +
-
org.iot.dsa.node
-

Class DSMap

+
org.iot.dsa.node
+

Class DSMap

- -
- +
+
+ +
+
+ -
+
Puts a String representing the stack trace into the map.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + + diff --git a/docs/javadoc/org/iot/dsa/node/DSNode.html b/docs/javadoc/org/iot/dsa/node/DSNode.html index 93972df2..f0134f3c 100644 --- a/docs/javadoc/org/iot/dsa/node/DSNode.html +++ b/docs/javadoc/org/iot/dsa/node/DSNode.html @@ -1,12 +1,13 @@ - + - -DSNode (dslink-core 0.15.0 API) - - - + + DSNode (dslink-core 0.15.0 API) + + +
- - -
Skip navigation links
- - - - + + +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + +
-
org.iot.dsa.node
-

Class DSNode

+
org.iot.dsa.node
+

Class DSNode

- -
- -
-
- -
-
- +
- - -
Skip navigation links
- - - - + + +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + + diff --git a/docs/javadoc/org/iot/dsa/node/DSNull.html b/docs/javadoc/org/iot/dsa/node/DSNull.html index f4e010d3..754ac73b 100644 --- a/docs/javadoc/org/iot/dsa/node/DSNull.html +++ b/docs/javadoc/org/iot/dsa/node/DSNull.html @@ -1,12 +1,13 @@ - + - -DSNull (dslink-core 0.15.0 API) - - - + + DSNull (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + +
-
org.iot.dsa.node
-

Class DSNull

+
org.iot.dsa.node
+

Class DSNull

- -
- +
+
+ +
+
+ +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + +
+ + +
+ + + diff --git a/docs/javadoc/org/iot/dsa/package-frame.html b/docs/javadoc/org/iot/dsa/package-frame.html index 91aceff3..1b0b6180 100644 --- a/docs/javadoc/org/iot/dsa/package-frame.html +++ b/docs/javadoc/org/iot/dsa/package-frame.html @@ -1,21 +1,24 @@ - + - -org.iot.dsa (dslink-core 0.15.0 API) - - - + + org.iot.dsa (dslink-core 0.15.0 API) + + + -

org.iot.dsa

+

org.iot.dsa

-

Classes

- +

Classes

+
diff --git a/docs/javadoc/org/iot/dsa/package-summary.html b/docs/javadoc/org/iot/dsa/package-summary.html index 7d98503c..dc712613 100644 --- a/docs/javadoc/org/iot/dsa/package-summary.html +++ b/docs/javadoc/org/iot/dsa/package-summary.html @@ -1,12 +1,13 @@ - + - -org.iot.dsa (dslink-core 0.15.0 API) - - - + + org.iot.dsa (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + + + +
-

Package org.iot.dsa

-
-
Use the DSRuntime thread pool and timers.
-
-

See: Description

+

Package org.iot.dsa

+
+
Use the DSRuntime thread pool and timers.
+
+

See: Description

- - - - -

Package org.iot.dsa Description

-
Use the DSRuntime thread pool and timers.
+ + + + +

Package org.iot.dsa Description

+
Use the DSRuntime thread pool and timers.
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + + + + diff --git a/docs/javadoc/org/iot/dsa/package-tree.html b/docs/javadoc/org/iot/dsa/package-tree.html index 8feadfcb..5a8e3e47 100644 --- a/docs/javadoc/org/iot/dsa/package-tree.html +++ b/docs/javadoc/org/iot/dsa/package-tree.html @@ -1,12 +1,13 @@ - + - -org.iot.dsa Class Hierarchy (dslink-core 0.15.0 API) - - - + + org.iot.dsa Class Hierarchy (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + + + +
-

Hierarchy For Package org.iot.dsa

-Package Hierarchies: - +

Hierarchy For Package org.iot.dsa

+ Package Hierarchies: +
-

Class Hierarchy

- +

Class Hierarchy

+
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + + + + diff --git a/docs/javadoc/overview-frame.html b/docs/javadoc/overview-frame.html index 06ddf63b..c50e13ba 100644 --- a/docs/javadoc/overview-frame.html +++ b/docs/javadoc/overview-frame.html @@ -1,33 +1,47 @@ - + - -Overview List (dslink-core 0.15.0 API) - - - + + Overview List (dslink-core 0.15.0 API) + + + -
All Classes
+
All Classes +
-

Packages

- +

Packages

+

 

diff --git a/docs/javadoc/overview-summary.html b/docs/javadoc/overview-summary.html index aaaa162c..60812783 100644 --- a/docs/javadoc/overview-summary.html +++ b/docs/javadoc/overview-summary.html @@ -1,12 +1,13 @@ - + - -Overview (dslink-core 0.15.0 API) - - - + + Overview (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + + + +
-

dslink-core 0.15.0 API

+

dslink-core 0.15.0 API

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Packages 
PackageDescription
org.iot.dsa -
Use the DSRuntime thread pool and timers.
-
org.iot.dsa.dslink -
DSLink is the main entry point for an application.
-
org.iot.dsa.dslink.requester -
API for implementing requesters without having to modeling everything in the node tree.
-
org.iot.dsa.dslink.responder -
API for implementing responders without having modeling everything in the node tree.
-
org.iot.dsa.io -
Node serialization and streaming abstraction for JSON and MsgPack.
-
org.iot.dsa.io.json 
org.iot.dsa.io.msgpack 
org.iot.dsa.logging -
Async handler for Java Util Logging that also manages log backups.
-
org.iot.dsa.node -
Persistent data model used to build the node tree of a link.
-
org.iot.dsa.node.action 
org.iot.dsa.node.event 
org.iot.dsa.security 
org.iot.dsa.time 
org.iot.dsa.util 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Packages 
PackageDescription
org.iot.dsa +
Use the DSRuntime thread pool and timers.
+
org.iot.dsa.dslink + +
DSLink is the main entry point for an application.
+
org.iot.dsa.dslink.requester + +
API for implementing requesters without having to modeling everything in + the node tree. +
+
org.iot.dsa.dslink.responder + +
API for implementing responders without having modeling everything in the + node tree. +
+
org.iot.dsa.io +
Node serialization and streaming abstraction for JSON and MsgPack.
+
org.iot.dsa.io.json 
org.iot.dsa.io.msgpack +  
org.iot.dsa.logging +
Async handler for Java Util Logging that also manages log backups.
+
org.iot.dsa.node +
Persistent data model used to build the node tree of a link.
+
org.iot.dsa.node.action +  
org.iot.dsa.node.event +  
org.iot.dsa.security 
org.iot.dsa.time 
org.iot.dsa.util 
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + + + + diff --git a/docs/javadoc/overview-tree.html b/docs/javadoc/overview-tree.html index 87442173..74c8dcd8 100644 --- a/docs/javadoc/overview-tree.html +++ b/docs/javadoc/overview-tree.html @@ -1,12 +1,13 @@ - + - -Class Hierarchy (dslink-core 0.15.0 API) - - - + + Class Hierarchy (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + + + +
-

Hierarchy For All Packages

-Package Hierarchies: - +

Hierarchy For All Packages

+ Package Hierarchies: +
-

Class Hierarchy

- -

Interface Hierarchy

- -

Enum Hierarchy

- +

Class Hierarchy

+ +

Interface Hierarchy

+ +

Enum Hierarchy

+
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + + + + diff --git a/docs/javadoc/serialized-form.html b/docs/javadoc/serialized-form.html index d5e0d3a3..adf6d5e3 100644 --- a/docs/javadoc/serialized-form.html +++ b/docs/javadoc/serialized-form.html @@ -1,12 +1,13 @@ - + - -Serialized Form (dslink-core 0.15.0 API) - - - + + Serialized Form (dslink-core 0.15.0 API) + + +
- + -
Skip navigation links
- - - - +
Skip navigation + links
+ + + +
+ + + + + +
-

Serialized Form

+

Serialized Form

- +
- - -
Skip navigation links
- - + - +
Skip navigation + links
+ + + +
+ + + + + + diff --git a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/io/DSByteBuffer.java b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/io/DSByteBuffer.java index c27f4ccb..deb2963f 100644 --- a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/io/DSByteBuffer.java +++ b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/io/DSByteBuffer.java @@ -1,10 +1,13 @@ package com.acuity.iot.dsa.dslink.io; +import com.acuity.iot.dsa.dslink.transport.DSBinaryTransport; +import java.io.OutputStream; import java.nio.ByteBuffer; +import org.iot.dsa.util.DSException; /** * A buffer for storing bytes being pushed from an input stream. Useful when bytes are - * coming in faster than can be processed. + * coming in faster than can be processed. This is not synchronized. * * @author Aaron Hansen */ @@ -15,11 +18,8 @@ public class DSByteBuffer { /////////////////////////////////////////////////////////////////////////// private byte[] buffer; - private RuntimeException closeException; private int length = 0; private int offset = 0; - private boolean open = false; - private long timeout = 60000; ///////////////////////////////////////////////////////////////// // Methods - Constructors @@ -38,93 +38,98 @@ public DSByteBuffer(int initialCapacity) { ///////////////////////////////////////////////////////////////// /** - * The number of bytes available for reading. + * Number of bytes available for reading. */ public int available() { return length; } - public synchronized void clear() { + public void clear() { length = 0; offset = 0; - notify(); } /** - * Important for notifying waiting threads. + * Increases the childCount of the buffer to at least the given. */ - public synchronized DSByteBuffer close() { - if (!open) { - return this; + private void growBuffer(int minSize) { + int size = buffer.length; + while (size < minSize) { + size *= 2; } - open = false; - notify(); - return this; + byte[] tmp = new byte[size]; + System.arraycopy(buffer, offset, tmp, 0, length); + buffer = tmp; + offset = 0; } /** - * Important for notifying waiting threads. + * Number of bytes available for reading. */ - public synchronized DSByteBuffer close(RuntimeException toThrow) { - if (!open) { - return this; - } - this.closeException = toThrow; - open = false; - notify(); - return this; + public int length() { + return length; } /** - * Number of millis the read methods will block before throwing an IOException. - * - * @return Zero or less is indefinite. + * Overwrites bytes in the internal buffer, does not change the current length or position. */ - public long getTimeout() { - return timeout; + public void overwrite(int dest, byte b1, byte b2) { + buffer[dest] = b1; + buffer[++dest] = b2; } /** - * Increases the childCount of the buffer to at least the given. + * Overwrites bytes in the internal buffer, does not change the current length or position. */ - private void growBuffer(int minSize) { - int size = buffer.length; - while (size < minSize) { - size *= 2; - } - byte[] tmp = new byte[size]; - System.arraycopy(buffer, offset, tmp, 0, length); - buffer = tmp; - offset = 0; - } - - public boolean isOpen() { - return open; + public void overwrite(int dest, byte b1, byte b2, byte b3, byte b4) { + buffer[dest] = b1; + buffer[++dest] = b2; + buffer[++dest] = b3; + buffer[++dest] = b4; } - public int length() { - return length; + /** + * Overwrites the primitive in the internal buffer. Does not change the buffer length or + * position. + * + * @param dest The offset in the internal buffer to write the bytes. + * @param v The value to encode. + * @param bigEndian Whether to encode in big or little endian byte ordering. + */ + public void overwriteInt(int dest, int v, boolean bigEndian) { + if (bigEndian) { + overwrite(dest, (byte) ((v >>> 24) & 0xFF), + (byte) ((v >>> 16) & 0xFF), + (byte) ((v >>> 8) & 0xFF), + (byte) ((v >>> 0) & 0xFF)); + } else { + overwrite(dest, (byte) ((v >>> 0) & 0xFF), + (byte) ((v >>> 8) & 0xFF), + (byte) ((v >>> 16) & 0xFF), + (byte) ((v >>> 24) & 0xFF)); + } } - public synchronized DSByteBuffer open() { - if (open) { - return this; + /** + * Overwrites the primitive in the internal buffer. Does not change the buffer length or* + * position. + * + * @param dest The offset in the internal buffer to write the bytes. + * @param v The value to encode. + * @param bigEndian Whether to encode in big or little endian byte ordering. + */ + public void overwriteShort(int dest, short v, boolean bigEndian) { + if (bigEndian) { + overwrite(dest, (byte) ((v >>> 8) & 0xFF), (byte) ((v >>> 0) & 0xFF)); + } else { + overwrite(dest, (byte) ((v >>> 0) & 0xFF), (byte) ((v >>> 8) & 0xFF)); } - length = 0; - offset = 0; - open = true; - closeException = null; - notify(); - return this; } /** * Gets the bytes from the given buffer, which will be flipped, then cleared. */ - public synchronized void put(ByteBuffer buf) { - if (!open) { - throw new DSIoException("Closed"); - } + public void put(ByteBuffer buf) { int len = buf.position(); int bufLen = buffer.length; if ((len + length + offset) >= bufLen) { @@ -139,16 +144,12 @@ public synchronized void put(ByteBuffer buf) { buf.get(buffer, length + offset, len); buf.clear(); length += len; - notify(); } /** * Add the byte to the buffer for reading. */ - public synchronized void put(byte b) { - if (!open) { - throw new DSIoException("Closed"); - } + public void put(byte b) { int bufLen = buffer.length; int msgLen = 1; if ((msgLen + length + offset) >= bufLen) { @@ -161,7 +162,74 @@ public synchronized void put(byte b) { } buffer[length + offset] = b; length++; - notify(); + } + + /** + * Add the byte to the buffer for reading. + */ + public void put(byte b1, byte b2) { + int bufLen = buffer.length; + int msgLen = 2; + if ((msgLen + length + offset) >= bufLen) { + if ((msgLen + length) > bufLen) { + growBuffer(msgLen + length); + } else { //offset must be > 0 + System.arraycopy(buffer, offset, buffer, 0, length); + offset = 0; + } + } + int idx = length + offset; + buffer[idx] = b1; + buffer[++idx] = b2; + length += msgLen; + } + + /** + * Add the byte to the buffer for reading. + */ + public void put(byte b1, byte b2, byte b3, byte b4) { + int bufLen = buffer.length; + int msgLen = 4; + if ((msgLen + length + offset) >= bufLen) { + if ((msgLen + length) > bufLen) { + growBuffer(msgLen + length); + } else { //offset must be > 0 + System.arraycopy(buffer, offset, buffer, 0, length); + offset = 0; + } + } + int idx = length + offset; + buffer[idx] = b1; + buffer[++idx] = b2; + buffer[++idx] = b3; + buffer[++idx] = b4; + length += msgLen; + } + + /** + * Add the byte to the buffer for reading. + */ + public void put(byte b1, byte b2, byte b3, byte b4, byte b5, byte b6, byte b7, byte b8) { + int bufLen = buffer.length; + int msgLen = 8; + if ((msgLen + length + offset) >= bufLen) { + if ((msgLen + length) > bufLen) { + growBuffer(msgLen + length); + } else { //offset must be > 0 + System.arraycopy(buffer, offset, buffer, 0, length); + offset = 0; + } + } + int idx = length + offset; + buffer[idx] = b1; + buffer[++idx] = b2; + buffer[++idx] = b3; + buffer[++idx] = b4; + buffer[++idx] = b5; + buffer[++idx] = b6; + buffer[++idx] = b7; + buffer[++idx] = b8; + length += msgLen; } /** @@ -169,7 +237,7 @@ public synchronized void put(byte b) { * * @param msg The data source. */ - public synchronized void put(byte[] msg) { + public void put(byte[] msg) { put(msg, 0, msg.length); } @@ -180,10 +248,7 @@ public synchronized void put(byte[] msg) { * @param off The start offset in the buffer to put data. * @param len The maximum number of bytes to read. */ - public synchronized void put(byte[] msg, int off, int len) { - if (!open) { - throw new DSIoException("Closed"); - } + public void put(byte[] msg, int off, int len) { int bufLen = buffer.length; if ((len + length + offset) >= bufLen) { if ((len + length) > bufLen) { //the buffer is too small @@ -195,7 +260,6 @@ public synchronized void put(byte[] msg, int off, int len) { } System.arraycopy(msg, off, buffer, length + offset, len); length += len; - notify(); } /** @@ -204,12 +268,9 @@ public synchronized void put(byte[] msg, int off, int len) { * @param dest The internal destination offset. * @param msg The data source. * @param off The start offset in the msg to put data. - * @param len The maximum number of bytes to read. + * @param len The maximum number of bytes to put. */ - public synchronized void put(int dest, byte[] msg, int off, int len) { - if (!open) { - throw new DSIoException("Closed"); - } + public void put(int dest, byte[] msg, int off, int len) { if (offset > 0) { System.arraycopy(buffer, offset, buffer, 0, length); offset = 0; @@ -225,35 +286,131 @@ public synchronized void put(int dest, byte[] msg, int off, int len) { if ((dest + len) > length) { length += len; } - notify(); } /** - * Returns the next incoming byte, or -1 when end of stream has been reached. + * Encodes the primitive into buffer using big endian encoding. + */ + public void putDouble(double v) { + putDouble(v, true); + } + + /** + * Encodes the primitive into the buffer. * - * @throws DSIoException if there are any issues. + * @param v The value to encode. + * @param bigEndian Whether to encode in big or little endian byte ordering. */ - public synchronized int read() { - while (open && (length == 0)) { - try { - if (timeout > 0) { - wait(timeout); - } else { - wait(); - } - } catch (InterruptedException ignore) { - } + public void putDouble(double v, boolean bigEndian) { + putLong(Double.doubleToRawLongBits(v), bigEndian); + } + + /** + * Encodes the primitive into buffer using big endian encoding. + */ + public void putFloat(float v) { + putFloat(v, true); + } + + /** + * Encodes the primitive into the buffer. + * + * @param v The value to encode. + * @param bigEndian Whether to encode in big or little endian byte ordering. + */ + public void putFloat(float v, boolean bigEndian) { + putInt(Float.floatToIntBits(v), bigEndian); + } + + /** + * Encodes the primitive into buffer using big endian encoding. + */ + public void putInt(int v) { + putInt(v, true); + } + + /** + * Encodes the primitive into buffer. + * + * @param v The value to encode. + * @param bigEndian Whether to encode in big or little endian byte ordering. + */ + public void putInt(int v, boolean bigEndian) { + if (bigEndian) { + put((byte) ((v >>> 24) & 0xFF), + (byte) ((v >>> 16) & 0xFF), + (byte) ((v >>> 8) & 0xFF), + (byte) ((v >>> 0) & 0xFF)); + } else { + put((byte) ((v >>> 0) & 0xFF), + (byte) ((v >>> 8) & 0xFF), + (byte) ((v >>> 16) & 0xFF), + (byte) ((v >>> 24) & 0xFF)); } - notify(); - if (!open) { - if (length == 0) { - if (closeException != null) { - throw closeException; - } - return -1; - } - } else if (length == 0) { - throw new DSIoException("Read timeout"); + } + + /** + * Encodes the primitive into the buffer using big endian encoding. + */ + public void putLong(long v) { + putLong(v, true); + } + + /** + * Encodes the primitive into the buffer. + * + * @param v The value to encode. + * @param bigEndian Whether to encode in big or little endian byte ordering. + */ + public void putLong(long v, boolean bigEndian) { + if (bigEndian) { + put((byte) (v >>> 56), + (byte) (v >>> 48), + (byte) (v >>> 40), + (byte) (v >>> 32), + (byte) (v >>> 24), + (byte) (v >>> 16), + (byte) (v >>> 8), + (byte) (v >>> 0)); + } else { + put((byte) (v >>> 0), + (byte) (v >>> 8), + (byte) (v >>> 16), + (byte) (v >>> 24), + (byte) (v >>> 32), + (byte) (v >>> 40), + (byte) (v >>> 48), + (byte) (v >>> 56)); + } + } + + /** + * Encodes the primitive into the buffer using big endian. + */ + public void putShort(short v) { + putShort(v, true); + } + + /** + * Encodes the primitive into the buffer. + * + * @param v The value to encode. + * @param bigEndian Whether to encode in big or little endian byte ordering. + */ + public void putShort(short v, boolean bigEndian) { + if (bigEndian) { + put((byte) ((v >>> 8) & 0xFF), (byte) ((v >>> 0) & 0xFF)); + } else { + put((byte) ((v >>> 0) & 0xFF), (byte) ((v >>> 8) & 0xFF)); + } + } + + /** + * Returns the next byte in the buffer, or -1 when nothing is available. + */ + public int read() { + if (length == 0) { + return -1; } int ret = buffer[offset]; offset++; @@ -262,35 +419,16 @@ public synchronized int read() { } /** - * Reads incoming bytes into the given buffer. + * Push bytes from the internal buffer to the given buffer. * * @param buf The buffer into which data is read. * @param off The start offset in the buffer to put data. * @param len The maximum number of bytes to read. - * @return The number of bytes read or -1 for end of stream. - * @throws DSIoException if there are any issues. + * @return The number of bytes read. */ - public synchronized int read(byte[] buf, int off, int len) { - while (open && (length < len)) { - try { - if (timeout > 0) { - wait(timeout); - } else { - wait(); - } - } catch (InterruptedException ignore) { - } - } - notify(); - if (!open) { - if (length == 0) { - if (closeException != null) { - throw closeException; - } - return -1; - } - } else if (length == 0) { - throw new DSIoException("Read timeout"); + public int sendTo(byte[] buf, int off, int len) { + if (length == 0) { + return 0; } len = Math.min(len, length); System.arraycopy(buffer, offset, buf, off, len); @@ -304,33 +442,14 @@ public synchronized int read(byte[] buf, int off, int len) { } /** - * Reads incoming bytes into the given buffer. + * Push bytes from the internal buffer to the given buffer. * * @param buf The buffer into which data is read. - * @return The number of bytes read or -1 for end of stream. - * @throws DSIoException if there are any issues. + * @return The number of bytes read. */ - public synchronized int read(ByteBuffer buf) { - while (open && (length == 0)) { - try { - if (timeout > 0) { - wait(timeout); - } else { - wait(); - } - } catch (InterruptedException ignore) { - } - } - notify(); - if (!open) { - if (length == 0) { - if (closeException != null) { - throw closeException; - } - return -1; - } - } else if (length == 0) { - throw new DSIoException("Read timeout"); + public int sendTo(ByteBuffer buf) { + if (length == 0) { + return 0; } int len = Math.min(buf.remaining(), length); buf.put(buffer, offset, len); @@ -344,14 +463,28 @@ public synchronized int read(ByteBuffer buf) { } /** - * Number of millis the read methods will block before throwing an DSIoException. - * - * @param timeout Zero or less for indefinite. - * @return This + * Push bytes from the internal buffer to the transport. */ - public DSByteBuffer setTimeout(long timeout) { - this.timeout = timeout; - return this; + public void sendTo(DSBinaryTransport transport, boolean isLast) { + transport.write(buffer, offset, length, isLast); + offset = 0; + length = 0; + } + + /** + * Push bytes from the internal buffer to the stream. + */ + public void sendTo(OutputStream out) { + if (length == 0) { + return; + } + try { + out.write(buffer, offset, length); + offset = 0; + length = 0; + } catch (Exception x) { + DSException.throwRuntime(x); + } } /** @@ -359,7 +492,7 @@ public DSByteBuffer setTimeout(long timeout) { */ public byte[] toByteArray() { byte[] ret = new byte[length]; - read(ret, 0, length); + sendTo(ret, 0, length); return ret; } diff --git a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/message/CloseMessage.java b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/message/CloseMessage.java index 48d679dc..89ab6b8a 100644 --- a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/message/CloseMessage.java +++ b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/message/CloseMessage.java @@ -1,7 +1,5 @@ package com.acuity.iot.dsa.dslink.protocol.message; -import org.iot.dsa.io.DSIWriter; - /** * A close request or response. * diff --git a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/DS1LinkConnection.java b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/DS1LinkConnection.java index 15a73dba..6d0a29a1 100644 --- a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/DS1LinkConnection.java +++ b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/DS1LinkConnection.java @@ -201,7 +201,7 @@ public void onComplete() { x.printStackTrace(); } */ - trans.write(byteBuffer, true); + writeTo(trans); } }; } else if (transport instanceof DSTextTransport) { diff --git a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/DS1Session.java b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/DS1Session.java index aaff50c1..1ae3996e 100644 --- a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/DS1Session.java +++ b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/DS1Session.java @@ -337,7 +337,7 @@ protected void processMessages(DSIReader reader, boolean areRequests) { throw new DSProtocolException("Response missing rid"); } if (areRequests) { - responder.processRequest(rid, req); + responder.handleRequest(rid, req); } else { requester.processResponse(rid, req); } @@ -424,7 +424,6 @@ public void writeResponse(OutboundMessage message) { message.write(getMessageWriter()); } - ///////////////////////////////////////////////////////////////// // Inner Classes ///////////////////////////////////////////////////////////////// diff --git a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/responder/DS1InboundList.java b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/responder/DS1InboundList.java index 99bbb045..72487d90 100644 --- a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/responder/DS1InboundList.java +++ b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/responder/DS1InboundList.java @@ -1,678 +1,28 @@ package com.acuity.iot.dsa.dslink.protocol.protocol_v1.responder; -import com.acuity.iot.dsa.dslink.protocol.DSStream; import com.acuity.iot.dsa.dslink.protocol.message.ErrorResponse; -import com.acuity.iot.dsa.dslink.protocol.message.MessageWriter; -import com.acuity.iot.dsa.dslink.protocol.message.OutboundMessage; -import com.acuity.iot.dsa.dslink.protocol.message.RequestPath; -import java.util.Iterator; -import org.iot.dsa.DSRuntime; -import org.iot.dsa.dslink.DSIResponder; -import org.iot.dsa.dslink.responder.ApiObject; -import org.iot.dsa.dslink.responder.InboundListRequest; -import org.iot.dsa.dslink.responder.OutboundListResponse; -import org.iot.dsa.io.DSIWriter; -import org.iot.dsa.node.DSElement; -import org.iot.dsa.node.DSIValue; -import org.iot.dsa.node.DSInfo; -import org.iot.dsa.node.DSList; +import com.acuity.iot.dsa.dslink.protocol.responder.DSInboundList; import org.iot.dsa.node.DSMap; -import org.iot.dsa.node.DSMap.Entry; -import org.iot.dsa.node.DSMetadata; -import org.iot.dsa.node.DSNode; -import org.iot.dsa.node.DSPath; -import org.iot.dsa.node.action.ActionSpec; -import org.iot.dsa.node.action.DSAction; -import org.iot.dsa.node.event.DSIEvent; -import org.iot.dsa.node.event.DSISubscriber; -import org.iot.dsa.node.event.DSInfoTopic; -import org.iot.dsa.node.event.DSTopic; /** * List implementation for a responder. * * @author Aaron Hansen */ -class DS1InboundList extends DS1InboundRequest - implements DSISubscriber, DSStream, InboundListRequest, OutboundMessage, - OutboundListResponse, Runnable { +class DS1InboundList extends DSInboundList { - /////////////////////////////////////////////////////////////////////////// - // Constants - /////////////////////////////////////////////////////////////////////////// - - private static final int STATE_INIT = 0; - private static final int STATE_CHILDREN = 1; - private static final int STATE_UPDATES = 2; - private static final int STATE_CLOSE_PENDING = 3; - private static final int STATE_CLOSED = 4; - - /////////////////////////////////////////////////////////////////////////// - // Fields - /////////////////////////////////////////////////////////////////////////// - - private StringBuilder cacheBuf = new StringBuilder(); - private DSMap cacheMap = new DSMap(); - private DSMetadata cacheMeta = new DSMetadata(cacheMap); - private Iterator children; - private Exception closeReason; - private DSInfo info; - private DSNode node; - private OutboundListResponse response; - private boolean enqueued = false; - private int state = STATE_INIT; - private Update updateHead; - private Update updateTail; - - /////////////////////////////////////////////////////////////////////////// - // Constructors - /////////////////////////////////////////////////////////////////////////// - - DS1InboundList() { - } - - /////////////////////////////////////////////////////////////////////////// - // Methods in alphabetical order - /////////////////////////////////////////////////////////////////////////// - - @Override - public void childAdded(ApiObject child) { - if (!isClosed()) { - enqueue(new Update(child, true)); - } - } + private DSMap request; @Override - public void childRemoved(ApiObject child) { - if (!isClosed()) { - enqueue(new Update(child, false)); - } - } - - @Override - public void close() { - if (!isOpen()) { - return; - } - state = STATE_CLOSE_PENDING; - enqueueResponse(); - fine(fine() ? getPath() + " list closed locally" : null); - } - - @Override - public void close(Exception reason) { - if (!isOpen()) { - return; - } - state = STATE_CLOSE_PENDING; - closeReason = reason; - enqueueResponse(); - fine(fine() ? getPath() + " list closed locally" : null); - } - - /** - * Remove an update from the queue. - */ - private synchronized Update dequeue() { - if (updateHead == null) { - return null; - } - Update ret = null; - ret = updateHead; - if (updateHead == updateTail) { - updateHead = null; - updateTail = null; - } else { - updateHead = updateHead.next; - } - ret.next = null; + protected ErrorResponse makeError(Throwable reason) { + ErrorResponse ret = new ErrorResponse(reason); + ret.parseRequest(request); return ret; } - private void doClose() { - state = STATE_CLOSED; - getResponder().removeRequest(getRequestId()); - if (response == null) { - return; - } - DSRuntime.run(new Runnable() { - @Override - public void run() { - try { - response.onClose(); - } catch (Exception x) { - severe(getPath(), x); - } - } - }); - } - - private void encodeChild(ApiObject child, DSIWriter out) { - out.beginList(); - String name = child.getName(); - String displayName = null; - if (DSPath.encodeName(name, cacheBuf)) { - displayName = name; - out.value(cacheBuf.toString()); - } else { - out.value(name); - } - cacheBuf.setLength(0); - out.beginMap(); - child.getMetadata(cacheMap.clear()); - DSElement e = cacheMap.remove(DSMetadata.DISPLAY_NAME); - if (e != null) { - out.key("$name").value(e); - } else if (displayName != null) { - out.key("$name").value(displayName); - } - e = cacheMap.remove("$is"); - if (e != null) { - out.key("$is").value(e); - } else { - out.key("$is").value("node"); - } - if (child.isAction()) { - ActionSpec action = child.getAction(); - e = cacheMap.remove("$invokable"); - if (e != null) { - out.key("$invokable").value(e); - } else { - out.key("$invokable").value(action.getPermission().toString()); - } - } else if (child.isValue()) { - out.key("$type"); - e = cacheMap.remove("$type"); - if (e != null) { - out.value(e); - } else { - encodeType(child.getValue(), cacheMeta, out); - } - if (!child.isReadOnly()) { - e = cacheMap.remove("$writable"); - if (e != null) { - out.key("$writable").value(e); - } else { - out.key("$writable").value(child.isAdmin() ? "config" : "write"); - } - } - } else if (child.isAdmin()) { - e = cacheMap.remove("$permission"); - if (e != null) { - out.key("$permission").value(e); - } else { - out.key("$permission").value("config"); - } - } - out.endMap().endList(); - cacheMap.clear(); - } - - /** - * Encode all the meta data about the root target of a list request. - */ - private void encodeTarget(ApiObject object, DSIWriter out) { - if (object instanceof DSInfo) { - DSMetadata.getMetadata((DSInfo) object, cacheMap.clear()); - } else { - object.getMetadata(cacheMap.clear()); - } - DSElement e = cacheMap.remove("$is"); - if (e == null) { - out.beginList().value("$is").value("node").endList(); - } else { - out.beginList().value("$is").value(e).endList(); - - } - e = cacheMap.get("$name"); - if (e == null) { - String safeName = object.getName(); - if (DSPath.encodeName(safeName, cacheBuf)) { - safeName = cacheBuf.toString(); - } - cacheBuf.setLength(0); - out.beginList().value("$name").value(safeName).endList(); - } else { - out.beginList().value("$name").value(e).endList(); - } - if (object.isAction()) { - encodeTargetAction(object, out); - } else if (object.isValue()) { - encodeTargetValue(object, out); - } else if (object.isAdmin()) { - e = cacheMap.remove("$permission"); - if (e == null) { - out.beginList().value("$permission").value("config").endList(); - } else { - out.beginList().value("$permission").value(e).endList(); - } - } - encodeTargetMetadata(cacheMap, out); - cacheMap.clear(); - } - - /** - * Called by encodeTarget for actions. - */ - private void encodeTargetAction(ApiObject object, DSIWriter out) { - DSInfo info = null; - if (object instanceof DSInfo) { - info = (DSInfo) object; - } - ActionSpec action = object.getAction(); - DSAction dsAction = null; - if (action instanceof DSAction) { - dsAction = (DSAction) action; - } - DSElement e = cacheMap.remove("$invokable"); - out.beginList().value("$invokable"); - if (e == null) { - out.value(action.getPermission().toString()).endList(); - } else { - out.value(e).endList(); - } - e = cacheMap.remove("params"); - out.beginList().value("$params"); - if (e == null) { - out.beginList(); - Iterator params = action.getParameters(); - if (params != null) { - DSMap param; - while (params.hasNext()) { - param = params.next(); - if (dsAction != null) { - dsAction.prepareParameter(info, param); - } - out.value(fixType(param)); - } - } - out.endList(); - } else { - out.value(e); - } - out.endList(); - if (action.getResultType().isValues()) { - e = cacheMap.remove("$columns"); - out.beginList().value("$columns"); - if (e == null) { - out.beginList(); - Iterator params = action.getParameters(); - if (params != null) { - DSMap param; - while (params.hasNext()) { - param = params.next(); - if (dsAction != null) { - dsAction.prepareParameter(info, param); - } - out.value(fixType(param)); - } - } - out.endList(); - } else { - out.value(e); - } - out.endList(); - } - e = cacheMap.remove("$result"); - if (e != null) { - out.beginList().value("$result").value(e).endList(); - } else if (!action.getResultType().isVoid()) { - out.beginList().value("$result").value(action.getResultType().toString()).endList(); - } - } - - /** - * Called by encodeTarget, encodes meta-data as configs. - */ - private void encodeTargetMetadata(DSMap metadata, DSIWriter out) { - if (cacheMap.isEmpty()) { - return; - } - Entry entry; - String name; - for (int i = 0, len = cacheMap.size(); i < len; i++) { - entry = cacheMap.getEntry(i); - out.beginList(); - name = entry.getKey(); - switch (name.charAt(0)) { - case '$': - case '@': - out.value(name); - default: - cacheBuf.append("@"); //TODO ? - DSPath.encodeName(name, cacheBuf); - out.value(cacheBuf.toString()); - cacheBuf.setLength(0); - - } - out.value(entry.getValue()); - out.endList(); - } - } - - /** - * Called by encodeTarget for values. - */ - private void encodeTargetValue(ApiObject object, DSIWriter out) { - DSElement e = cacheMap.remove("$type"); - out.beginList(); - out.value("$type"); - if (e != null) { - out.value(e); - } else { - encodeType(object.getValue(), cacheMeta, out); - } - out.endList(); - e = cacheMap.remove("$writable"); - if (e != null) { - out.beginList() - .value("$writable") - .value(e) - .endList(); - } else if (!object.isReadOnly()) { - out.beginList() - .value("$writable") - .value(object.isAdmin() ? "config" : "write") - .endList(); - } - } - - private void encodeType(DSIValue value, DSMetadata meta, DSIWriter out) { - String type = meta.getType(); - if ((type == null) && (value != null)) { - meta.setType(value); - } - fixType(meta.getMap()); - DSElement e = cacheMap.remove(DSMetadata.TYPE); - if (e == null) { - throw new IllegalArgumentException("Missing type"); - } - out.value(e); - } - - private void encodeUpdate(Update update, DSIWriter out) { - if (!isOpen()) { - return; - } - if (update.added) { - encodeChild(update.child, out); - } else { - out.beginMap(); - out.key("name").value(DSPath.encodeName(update.child.getName())); - out.key("change").value("remove"); - out.endMap(); - } - } - - private void enqueue(Update update) { - if (!isOpen()) { - return; - } - synchronized (this) { - if (updateHead == null) { - updateHead = update; - updateTail = update; - } else { - updateTail.next = update; - updateTail = update; - } - if (enqueued) { - return; - } - } - getResponder().sendResponse(this); - } - - /** - * Enqueues in the session. - */ - private void enqueueResponse() { - synchronized (this) { - if (enqueued) { - return; - } - enqueued = true; - } - getResponder().sendResponse(this); - } - - /** - * Combines boolean and enum ranges into the type name. - */ - private DSMap fixType(DSMap arg) { - String type = arg.getString(DSMetadata.TYPE); - if ("bool".equals(type)) { - DSList range = (DSList) arg.remove(DSMetadata.BOOLEAN_RANGE); - if ((range == null) || (range.size() != 2)) { - return arg; - } else { - cacheBuf.setLength(0); - cacheBuf.append(type); - cacheBuf.append('['); - cacheBuf.append(range.get(0).toString()); - cacheBuf.append(','); - cacheBuf.append(range.get(1).toString()); - cacheBuf.append(']'); - arg.put(DSMetadata.TYPE, cacheBuf.toString()); - } - } else if ("enum".equals(type)) { - DSList range = (DSList) arg.remove(DSMetadata.ENUM_RANGE); - if (range == null) { - return arg; - } - cacheBuf.setLength(0); - cacheBuf.append(type); - cacheBuf.append('['); - for (int i = 0, len = range.size(); i < len; i++) { - if (i > 0) { - cacheBuf.append(','); - } - cacheBuf.append(range.get(i).toString()); - } - cacheBuf.append(']'); - arg.put(DSMetadata.TYPE, cacheBuf.toString()); - } - return arg; - } - - @Override - public ApiObject getTarget() { - return info; - } - - private boolean isClosed() { - return state == STATE_CLOSED; - } - - private boolean isClosePending() { - return state == STATE_CLOSE_PENDING; - } - - /** - * Not closed or closed pending. - */ - @Override - public boolean isOpen() { - return (state != STATE_CLOSE_PENDING) && (state != STATE_CLOSED); - } - - @Override - public void onClose() { - if (node != null) { - node.unsubscribe(DSNode.INFO_TOPIC, null, this); - } - } - - @Override - public void onEvent(DSTopic topic, DSIEvent event, DSNode node, DSInfo child, - Object... params) { - switch ((DSInfoTopic.Event) event) { - case CHILD_ADDED: - childAdded(child); - break; - case CHILD_REMOVED: - childRemoved(child); - break; - case METADATA_CHANGED: //TODO - break; - default: - } - } - - @Override - public void onUnsubscribed(DSTopic topic, DSNode node, DSInfo child) { - close(); - } - - @Override - public void run() { - try { - RequestPath path = new RequestPath(getPath(), getLink()); - if (path.isResponder()) { - DSIResponder responder = (DSIResponder) path.getTarget(); - setPath(path.getPath()); - response = responder.onList(this); - } else { - info = path.getInfo(); - if (info.isNode()) { - node = info.getNode(); - node.subscribe(DSNode.INFO_TOPIC, null, this); - } - response = this; - } - } catch (Exception x) { - severe(getPath(), x); - close(x); - return; - } - if (response == null) { - close(); - } else { - enqueueResponse(); - } - } - - @Override - public void onClose(Integer requestId) { - if (isClosed()) { - return; - } - state = STATE_CLOSED; - fine(finer() ? getPath() + " list closed" : null); - synchronized (this) { - updateHead = updateTail = null; - } - doClose(); - } - - @Override - public void write(MessageWriter writer) { - DSIWriter out = writer.getWriter(); - enqueued = false; - if (isClosed()) { - return; - } - if (isClosePending() && (updateHead == null) && (closeReason != null)) { - ErrorResponse res = new ErrorResponse(closeReason); - res.parseRequest(getRequest()); - res.write(writer); - doClose(); - return; - } - int last = state; - out.beginMap(); - out.key("rid").value(getRequestId()); - switch (state) { - case STATE_INIT: - out.key("updates").beginList(); - writeInit(out); - break; - case STATE_CHILDREN: - out.key("updates").beginList(); - writeChildren(out); - break; - case STATE_CLOSE_PENDING: - case STATE_UPDATES: - out.key("updates").beginList(); - writeUpdates(out); - break; - default: - ; - } - out.endList(); - if ((state != last) && (state == STATE_UPDATES)) { - out.key("stream").value("open"); - } else if (isClosePending() && (updateHead == null)) { - if (closeReason != null) { - ErrorResponse res = new ErrorResponse(closeReason); - res.parseRequest(getRequest()); - getResponder().sendResponse(res); - } else { - out.key("stream").value("closed"); - } - doClose(); - } - out.endMap(); - } - - private void writeChildren(DSIWriter out) { - if (children != null) { - ApiObject child; - while (children.hasNext()) { - child = children.next(); - if (!child.isHidden()) { - encodeChild(child, out); - } - if (getResponder().shouldEndMessage()) { - enqueueResponse(); - return; - } - } - } - children = null; - state = STATE_UPDATES; - } - - private void writeInit(DSIWriter out) { - ApiObject target = response.getTarget(); - encodeTarget(target, out); - if (target.hasChildren()) { - state = STATE_CHILDREN; - children = target.getChildren(); - writeChildren(out); - } else { - state = STATE_UPDATES; - writeUpdates(out); - } - } - - private void writeUpdates(DSIWriter out) { - DS1Responder session = getResponder(); - Update update = dequeue(); - while (update != null) { - encodeUpdate(update, out); - if (session.shouldEndMessage()) { - enqueueResponse(); - break; - } - update = dequeue(); - } - } - - /////////////////////////////////////////////////////////////////////////// - // Inner Classes - /////////////////////////////////////////////////////////////////////////// - - private static class Update { - - boolean added; - ApiObject child; - Update next; - - Update(ApiObject child, boolean added) { - this.child = child; - this.added = added; - } + public DS1InboundList setRequest(DSMap request) { + this.request = request; + return this; } } diff --git a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/responder/DS1InboundRequest.java b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/responder/DS1InboundRequest.java index 40bb5960..d5070b16 100644 --- a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/responder/DS1InboundRequest.java +++ b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/responder/DS1InboundRequest.java @@ -1,10 +1,8 @@ package com.acuity.iot.dsa.dslink.protocol.protocol_v1.responder; -import com.acuity.iot.dsa.dslink.protocol.protocol_v1.DS1Session; +import com.acuity.iot.dsa.dslink.protocol.message.ErrorResponse; import com.acuity.iot.dsa.dslink.protocol.responder.DSInboundRequest; -import org.iot.dsa.dslink.DSLink; import org.iot.dsa.dslink.responder.InboundRequest; -import org.iot.dsa.logging.DSLogger; import org.iot.dsa.node.DSMap; /** @@ -20,7 +18,13 @@ public DSMap getRequest() { return request; } - public DS1InboundRequest setRequest(DSMap request){ + protected ErrorResponse makeError(Throwable reason) { + ErrorResponse ret = new ErrorResponse(reason); + ret.parseRequest(request); + return ret; + } + + public DS1InboundRequest setRequest(DSMap request) { this.request = request; return this; } diff --git a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/responder/DS1Responder.java b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/responder/DS1Responder.java index 18dde7b6..f1260dd9 100644 --- a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/responder/DS1Responder.java +++ b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v1/responder/DS1Responder.java @@ -7,7 +7,6 @@ import com.acuity.iot.dsa.dslink.protocol.message.ErrorResponse; import com.acuity.iot.dsa.dslink.protocol.responder.DSResponder; import java.util.Map; -import java.util.logging.Level; import org.iot.dsa.DSRuntime; import org.iot.dsa.node.DSList; import org.iot.dsa.node.DSMap; @@ -53,59 +52,10 @@ public DS1InboundSubscriptions getSubscriptions() { return subscriptions; } - public void onConnect() { - } - - public void onConnectFail() { - } - - public void onDisconnect() { - finer(finer() ? "Close" : null); - subscriptions.close(); - for (Map.Entry entry : getRequests().entrySet()) { - try { - entry.getValue().onClose(entry.getKey()); - } catch (Exception x) { - finer(finer() ? "Close" : null, x); - } - } - getRequests().clear(); - } - - /** - * Handles an invoke request. - */ - private void processInvoke(Integer rid, DSMap req) { - DS1InboundInvoke invokeImpl = new DS1InboundInvoke(req); - invokeImpl.setRequest(req) - .setPath(getPath(req)) - .setSession(getSession()) - .setRequestId(rid) - .setLink(getLink()) - .setResponder(this); - putRequest(rid, invokeImpl); - DSRuntime.run(invokeImpl); - } - - /** - * Handles a list request. - */ - private void processList(Integer rid, DSMap req) { - DS1InboundList listImpl = new DS1InboundList(); - listImpl.setRequest(req) - .setPath(getPath(req)) - .setSession(getSession()) - .setRequestId(rid) - .setLink(getLink()) - .setResponder(this); - putRequest(listImpl.getRequestId(), listImpl); - DSRuntime.run(listImpl); - } - /** * Process an individual request. */ - public void processRequest(final Integer rid, final DSMap map) { + public void handleRequest(final Integer rid, final DSMap map) { String method = map.get("method", null); try { if ((method == null) || method.isEmpty()) { @@ -123,8 +73,7 @@ public void run() { try { req.onClose(rid); } catch (Exception x) { - getConnection().getLink().getLogger().log( - Level.FINE, getConnection().getConnectionId(), x); + fine(getPath(), x); } } }); @@ -192,6 +141,55 @@ public void run() { } } + public void onConnect() { + } + + public void onConnectFail() { + } + + public void onDisconnect() { + finer(finer() ? "Close" : null); + subscriptions.close(); + for (Map.Entry entry : getRequests().entrySet()) { + try { + entry.getValue().onClose(entry.getKey()); + } catch (Exception x) { + finer(finer() ? "Close" : null, x); + } + } + getRequests().clear(); + } + + /** + * Handles an invoke request. + */ + private void processInvoke(Integer rid, DSMap req) { + DS1InboundInvoke invokeImpl = new DS1InboundInvoke(req); + invokeImpl.setRequest(req) + .setPath(getPath(req)) + .setSession(getSession()) + .setRequestId(rid) + .setLink(getLink()) + .setResponder(this); + putRequest(rid, invokeImpl); + DSRuntime.run(invokeImpl); + } + + /** + * Handles a list request. + */ + private void processList(Integer rid, DSMap req) { + DS1InboundList listImpl = new DS1InboundList(); + listImpl.setRequest(req) + .setPath(getPath(req)) + .setSession(getSession()) + .setRequestId(rid) + .setLink(getLink()) + .setResponder(this); + putRequest(listImpl.getRequestId(), listImpl); + DSRuntime.run(listImpl); + } + /** * Handles a set request. */ diff --git a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v2/DS2MessageReader.java b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v2/DS2MessageReader.java index 2b213106..7b0aca08 100644 --- a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v2/DS2MessageReader.java +++ b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v2/DS2MessageReader.java @@ -146,10 +146,10 @@ public DS2MessageReader init(InputStream in) { public boolean isRequest() { switch (method) { - case MSG_CLOSE : - case MSG_INVOKE_REQ : - case MSG_LIST_REQ : - case MSG_OBSERVE_REQ : + case MSG_CLOSE: + case MSG_INVOKE_REQ: + case MSG_LIST_REQ: + case MSG_OBSERVE_REQ: return true; } return false; diff --git a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v2/DS2MessageWriter.java b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v2/DS2MessageWriter.java index 85f94436..fce6282c 100644 --- a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v2/DS2MessageWriter.java +++ b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v2/DS2MessageWriter.java @@ -193,8 +193,8 @@ public byte[] toByteArray() { */ public DS2MessageWriter write(DSBinaryTransport out) { encodeHeaderLengths(); - out.write(header, false); - out.write(body, true); + //TODO out.write(header, false); + //TODO out.write(body, true); return this; } diff --git a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v2/responder/DS2InboundList.java b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v2/responder/DS2InboundList.java index 47464244..a1f10ef9 100644 --- a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v2/responder/DS2InboundList.java +++ b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v2/responder/DS2InboundList.java @@ -1,678 +1,29 @@ package com.acuity.iot.dsa.dslink.protocol.protocol_v2.responder; -import com.acuity.iot.dsa.dslink.protocol.DSStream; import com.acuity.iot.dsa.dslink.protocol.message.ErrorResponse; import com.acuity.iot.dsa.dslink.protocol.message.MessageWriter; -import com.acuity.iot.dsa.dslink.protocol.message.OutboundMessage; -import com.acuity.iot.dsa.dslink.protocol.message.RequestPath; -import java.util.Iterator; -import org.iot.dsa.DSRuntime; -import org.iot.dsa.dslink.DSIResponder; -import org.iot.dsa.dslink.responder.ApiObject; -import org.iot.dsa.dslink.responder.InboundListRequest; -import org.iot.dsa.dslink.responder.OutboundListResponse; -import org.iot.dsa.io.DSIWriter; -import org.iot.dsa.node.DSElement; -import org.iot.dsa.node.DSIValue; -import org.iot.dsa.node.DSInfo; -import org.iot.dsa.node.DSList; -import org.iot.dsa.node.DSMap; -import org.iot.dsa.node.DSMap.Entry; -import org.iot.dsa.node.DSMetadata; -import org.iot.dsa.node.DSNode; -import org.iot.dsa.node.DSPath; -import org.iot.dsa.node.action.ActionSpec; -import org.iot.dsa.node.action.DSAction; -import org.iot.dsa.node.event.DSIEvent; -import org.iot.dsa.node.event.DSISubscriber; -import org.iot.dsa.node.event.DSInfoTopic; -import org.iot.dsa.node.event.DSTopic; +import com.acuity.iot.dsa.dslink.protocol.responder.DSInboundList; /** * List implementation for a responder. * * @author Aaron Hansen */ -class DS2InboundList extends DS2InboundRequest - implements DSISubscriber, DSStream, InboundListRequest, OutboundMessage, - OutboundListResponse, Runnable { - - /////////////////////////////////////////////////////////////////////////// - // Constants - /////////////////////////////////////////////////////////////////////////// - - private static final int STATE_INIT = 0; - private static final int STATE_CHILDREN = 1; - private static final int STATE_UPDATES = 2; - private static final int STATE_CLOSE_PENDING = 3; - private static final int STATE_CLOSED = 4; - - /////////////////////////////////////////////////////////////////////////// - // Fields - /////////////////////////////////////////////////////////////////////////// - - private StringBuilder cacheBuf = new StringBuilder(); - private DSMap cacheMap = new DSMap(); - private DSMetadata cacheMeta = new DSMetadata(cacheMap); - private Iterator children; - private Exception closeReason; - private DSInfo info; - private DSNode node; - private OutboundListResponse response; - private boolean enqueued = false; - private int state = STATE_INIT; - private Update updateHead; - private Update updateTail; - - /////////////////////////////////////////////////////////////////////////// - // Constructors - /////////////////////////////////////////////////////////////////////////// - - DS2InboundList() { - } - - /////////////////////////////////////////////////////////////////////////// - // Methods in alphabetical order - /////////////////////////////////////////////////////////////////////////// - - @Override - public void childAdded(ApiObject child) { - if (!isClosed()) { - enqueue(new Update(child, true)); - } - } - - @Override - public void childRemoved(ApiObject child) { - if (!isClosed()) { - enqueue(new Update(child, false)); - } - } - - @Override - public void close() { - if (!isOpen()) { - return; - } - state = STATE_CLOSE_PENDING; - enqueueResponse(); - fine(fine() ? getPath() + " list closed locally" : null); - } +class DS2InboundList extends DSInboundList { @Override - public void close(Exception reason) { - if (!isOpen()) { - return; - } - state = STATE_CLOSE_PENDING; - closeReason = reason; - enqueueResponse(); - fine(fine() ? getPath() + " list closed locally" : null); - } - - /** - * Remove an update from the queue. - */ - private synchronized Update dequeue() { - if (updateHead == null) { - return null; - } - Update ret = null; - ret = updateHead; - if (updateHead == updateTail) { - updateHead = null; - updateTail = null; - } else { - updateHead = updateHead.next; - } - ret.next = null; + protected ErrorResponse makeError(Throwable reason) { + ErrorResponse ret = new ErrorResponse(reason); + //TODO return ret; } - private void doClose() { - state = STATE_CLOSED; - getResponder().removeInboundRequest(getRequestId()); - if (response == null) { - return; - } - DSRuntime.run(new Runnable() { - @Override - public void run() { - try { - response.onClose(); - } catch (Exception x) { - severe(getPath(), x); - } - } - }); - } - - private void encodeChild(ApiObject child, DSIWriter out) { - out.beginList(); - String name = child.getName(); - String displayName = null; - if (DSPath.encodeName(name, cacheBuf)) { - displayName = name; - out.value(cacheBuf.toString()); - } else { - out.value(name); - } - cacheBuf.setLength(0); - out.beginMap(); - child.getMetadata(cacheMap.clear()); - DSElement e = cacheMap.remove(DSMetadata.DISPLAY_NAME); - if (e != null) { - out.key("$name").value(e); - } else if (displayName != null) { - out.key("$name").value(displayName); - } - e = cacheMap.remove("$is"); - if (e != null) { - out.key("$is").value(e); - } else { - out.key("$is").value("node"); - } - if (child.isAction()) { - ActionSpec action = child.getAction(); - e = cacheMap.remove("$invokable"); - if (e != null) { - out.key("$invokable").value(e); - } else { - out.key("$invokable").value(action.getPermission().toString()); - } - } else if (child.isValue()) { - out.key("$type"); - e = cacheMap.remove("$type"); - if (e != null) { - out.value(e); - } else { - encodeType(child.getValue(), cacheMeta, out); - } - if (!child.isReadOnly()) { - e = cacheMap.remove("$writable"); - if (e != null) { - out.key("$writable").value(e); - } else { - out.key("$writable").value(child.isAdmin() ? "config" : "write"); - } - } - } else if (child.isAdmin()) { - e = cacheMap.remove("$permission"); - if (e != null) { - out.key("$permission").value(e); - } else { - out.key("$permission").value("config"); - } - } - out.endMap().endList(); - cacheMap.clear(); - } - - /** - * Encode all the meta data about the root target of a list request. - */ - private void encodeTarget(ApiObject object, DSIWriter out) { - if (object instanceof DSInfo) { - DSMetadata.getMetadata((DSInfo) object, cacheMap.clear()); - } else { - object.getMetadata(cacheMap.clear()); - } - DSElement e = cacheMap.remove("$is"); - if (e == null) { - out.beginList().value("$is").value("node").endList(); - } else { - out.beginList().value("$is").value(e).endList(); - - } - e = cacheMap.get("$name"); - if (e == null) { - String safeName = object.getName(); - if (DSPath.encodeName(safeName, cacheBuf)) { - safeName = cacheBuf.toString(); - } - cacheBuf.setLength(0); - out.beginList().value("$name").value(safeName).endList(); - } else { - out.beginList().value("$name").value(e).endList(); - } - if (object.isAction()) { - encodeTargetAction(object, out); - } else if (object.isValue()) { - encodeTargetValue(object, out); - } else if (object.isAdmin()) { - e = cacheMap.remove("$permission"); - if (e == null) { - out.beginList().value("$permission").value("config").endList(); - } else { - out.beginList().value("$permission").value(e).endList(); - } - } - encodeTargetMetadata(cacheMap, out); - cacheMap.clear(); - } - - /** - * Called by encodeTarget for actions. - */ - private void encodeTargetAction(ApiObject object, DSIWriter out) { - DSInfo info = null; - if (object instanceof DSInfo) { - info = (DSInfo) object; - } - ActionSpec action = object.getAction(); - DSAction dsAction = null; - if (action instanceof DSAction) { - dsAction = (DSAction) action; - } - DSElement e = cacheMap.remove("$invokable"); - out.beginList().value("$invokable"); - if (e == null) { - out.value(action.getPermission().toString()).endList(); - } else { - out.value(e).endList(); - } - e = cacheMap.remove("params"); - out.beginList().value("$params"); - if (e == null) { - out.beginList(); - Iterator params = action.getParameters(); - if (params != null) { - DSMap param; - while (params.hasNext()) { - param = params.next(); - if (dsAction != null) { - dsAction.prepareParameter(info, param); - } - out.value(fixType(param)); - } - } - out.endList(); - } else { - out.value(e); - } - out.endList(); - if (action.getResultType().isValues()) { - e = cacheMap.remove("$columns"); - out.beginList().value("$columns"); - if (e == null) { - out.beginList(); - Iterator params = action.getParameters(); - if (params != null) { - DSMap param; - while (params.hasNext()) { - param = params.next(); - if (dsAction != null) { - dsAction.prepareParameter(info, param); - } - out.value(fixType(param)); - } - } - out.endList(); - } else { - out.value(e); - } - out.endList(); - } - e = cacheMap.remove("$result"); - if (e != null) { - out.beginList().value("$result").value(e).endList(); - } else if (!action.getResultType().isVoid()) { - out.beginList().value("$result").value(action.getResultType().toString()).endList(); - } - } - - /** - * Called by encodeTarget, encodes meta-data as configs. - */ - private void encodeTargetMetadata(DSMap metadata, DSIWriter out) { - if (cacheMap.isEmpty()) { - return; - } - Entry entry; - String name; - for (int i = 0, len = cacheMap.size(); i < len; i++) { - entry = cacheMap.getEntry(i); - out.beginList(); - name = entry.getKey(); - switch (name.charAt(0)) { - case '$': - case '@': - out.value(name); - default: - cacheBuf.append("@"); //TODO ? - DSPath.encodeName(name, cacheBuf); - out.value(cacheBuf.toString()); - cacheBuf.setLength(0); - - } - out.value(entry.getValue()); - out.endList(); - } - } - - /** - * Called by encodeTarget for values. - */ - private void encodeTargetValue(ApiObject object, DSIWriter out) { - DSElement e = cacheMap.remove("$type"); - out.beginList(); - out.value("$type"); - if (e != null) { - out.value(e); - } else { - encodeType(object.getValue(), cacheMeta, out); - } - out.endList(); - e = cacheMap.remove("$writable"); - if (e != null) { - out.beginList() - .value("$writable") - .value(e) - .endList(); - } else if (!object.isReadOnly()) { - out.beginList() - .value("$writable") - .value(object.isAdmin() ? "config" : "write") - .endList(); - } - } - - private void encodeType(DSIValue value, DSMetadata meta, DSIWriter out) { - String type = meta.getType(); - if ((type == null) && (value != null)) { - meta.setType(value); - } - fixType(meta.getMap()); - DSElement e = cacheMap.remove(DSMetadata.TYPE); - if (e == null) { - throw new IllegalArgumentException("Missing type"); - } - out.value(e); - } - - private void encodeUpdate(Update update, DSIWriter out) { - if (!isOpen()) { - return; - } - if (update.added) { - encodeChild(update.child, out); - } else { - out.beginMap(); - out.key("name").value(DSPath.encodeName(update.child.getName())); - out.key("change").value("remove"); - out.endMap(); - } - } - - private void enqueue(Update update) { - if (!isOpen()) { - return; - } - synchronized (this) { - if (updateHead == null) { - updateHead = update; - updateTail = update; - } else { - updateTail.next = update; - updateTail = update; - } - if (enqueued) { - return; - } - } - getResponder().sendResponse(this); - } - - /** - * Enqueues in the session. - */ - private void enqueueResponse() { - synchronized (this) { - if (enqueued) { - return; - } - enqueued = true; - } - getResponder().sendResponse(this); - } - - /** - * Combines boolean and enum ranges into the type name. - */ - private DSMap fixType(DSMap arg) { - String type = arg.getString(DSMetadata.TYPE); - if ("bool".equals(type)) { - DSList range = (DSList) arg.remove(DSMetadata.BOOLEAN_RANGE); - if ((range == null) || (range.size() != 2)) { - return arg; - } else { - cacheBuf.setLength(0); - cacheBuf.append(type); - cacheBuf.append('['); - cacheBuf.append(range.get(0).toString()); - cacheBuf.append(','); - cacheBuf.append(range.get(1).toString()); - cacheBuf.append(']'); - arg.put(DSMetadata.TYPE, cacheBuf.toString()); - } - } else if ("enum".equals(type)) { - DSList range = (DSList) arg.remove(DSMetadata.ENUM_RANGE); - if (range == null) { - return arg; - } - cacheBuf.setLength(0); - cacheBuf.append(type); - cacheBuf.append('['); - for (int i = 0, len = range.size(); i < len; i++) { - if (i > 0) { - cacheBuf.append(','); - } - cacheBuf.append(range.get(i).toString()); - } - cacheBuf.append(']'); - arg.put(DSMetadata.TYPE, cacheBuf.toString()); - } - return arg; - } - - @Override - public ApiObject getTarget() { - return info; - } - - private boolean isClosed() { - return state == STATE_CLOSED; - } - - private boolean isClosePending() { - return state == STATE_CLOSE_PENDING; - } - - /** - * Not closed or closed pending. - */ - @Override - public boolean isOpen() { - return (state != STATE_CLOSE_PENDING) && (state != STATE_CLOSED); - } - - @Override - public void onClose() { - if (node != null) { - node.unsubscribe(DSNode.INFO_TOPIC, null, this); - } - } - - @Override - public void onEvent(DSTopic topic, DSIEvent event, DSNode node, DSInfo child, - Object... params) { - switch ((DSInfoTopic.Event) event) { - case CHILD_ADDED: - childAdded(child); - break; - case CHILD_REMOVED: - childRemoved(child); - break; - case METADATA_CHANGED: //TODO - break; - default: - } - } - - @Override - public void onUnsubscribed(DSTopic topic, DSNode node, DSInfo child) { - close(); - } - - @Override - public void run() { - try { - RequestPath path = new RequestPath(getPath(), getLink()); - if (path.isResponder()) { - DSIResponder responder = (DSIResponder) path.getTarget(); - setPath(path.getPath()); - response = responder.onList(this); - } else { - info = path.getInfo(); - if (info.isNode()) { - node = info.getNode(); - node.subscribe(DSNode.INFO_TOPIC, null, this); - } - response = this; - } - } catch (Exception x) { - severe(getPath(), x); - close(x); - return; - } - if (response == null) { - close(); - } else { - enqueueResponse(); - } - } - - @Override - public void onClose(Integer requestId) { - if (isClosed()) { - return; - } - state = STATE_CLOSED; - fine(finer() ? getPath() + " list closed" : null); - synchronized (this) { - updateHead = updateTail = null; - } - doClose(); - } - @Override public void write(MessageWriter writer) { - DSIWriter out = writer.getWriter(); - enqueued = false; - if (isClosed()) { - return; - } - if (isClosePending() && (updateHead == null) && (closeReason != null)) { - ErrorResponse res = new ErrorResponse(closeReason); - res.parseRequest(getRequest()); - res.write(writer); - doClose(); - return; - } - int last = state; - out.beginMap(); - out.key("rid").value(getRequestId()); - switch (state) { - case STATE_INIT: - out.key("updates").beginList(); - writeInit(out); - break; - case STATE_CHILDREN: - out.key("updates").beginList(); - writeChildren(out); - break; - case STATE_CLOSE_PENDING: - case STATE_UPDATES: - out.key("updates").beginList(); - writeUpdates(out); - break; - default: - ; - } - out.endList(); - if ((state != last) && (state == STATE_UPDATES)) { - out.key("stream").value("open"); - } else if (isClosePending() && (updateHead == null)) { - if (closeReason != null) { - ErrorResponse res = new ErrorResponse(closeReason); - res.parseRequest(getRequest()); - getResponder().sendResponse(res); - } else { - out.key("stream").value("closed"); - } - doClose(); - } - out.endMap(); - } - - private void writeChildren(DSIWriter out) { - if (children != null) { - ApiObject child; - while (children.hasNext()) { - child = children.next(); - if (!child.isHidden()) { - encodeChild(child, out); - } - if (getResponder().shouldEndMessage()) { - enqueueResponse(); - return; - } - } - } - children = null; - state = STATE_UPDATES; - } - - private void writeInit(DSIWriter out) { - ApiObject target = response.getTarget(); - encodeTarget(target, out); - if (target.hasChildren()) { - state = STATE_CHILDREN; - children = target.getChildren(); - writeChildren(out); - } else { - state = STATE_UPDATES; - writeUpdates(out); - } - } - - private void writeUpdates(DSIWriter out) { - DS2Responder session = getResponder(); - Update update = dequeue(); - while (update != null) { - encodeUpdate(update, out); - if (session.shouldEndMessage()) { - enqueueResponse(); - break; - } - update = dequeue(); - } - } - - /////////////////////////////////////////////////////////////////////////// - // Inner Classes - /////////////////////////////////////////////////////////////////////////// - - private static class Update { - - boolean added; - ApiObject child; - Update next; - - Update(ApiObject child, boolean added) { - this.child = child; - this.added = added; - } + //Prep response + //if multipart message, send next part + super.write(writer); + //get bytes determine if multi part message } } diff --git a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v2/responder/DS2InboundRequest.java b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v2/responder/DS2InboundRequest.java deleted file mode 100644 index b305257f..00000000 --- a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v2/responder/DS2InboundRequest.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.acuity.iot.dsa.dslink.protocol.protocol_v2.responder; - -import com.acuity.iot.dsa.dslink.protocol.protocol_v2.DS2Session; -import org.iot.dsa.dslink.DSLink; -import org.iot.dsa.dslink.responder.InboundRequest; -import org.iot.dsa.logging.DSLogger; -import org.iot.dsa.node.DSMap; - -/** - * Getters and setters common to most requests. - * - * @author Aaron Hansen - */ -class DS2InboundRequest extends DSLogger implements InboundRequest { - - /////////////////////////////////////////////////////////////////////////// - // Fields - /////////////////////////////////////////////////////////////////////////// - - private DSLink link; - private String path; - private DSMap request; - private Integer requestId; - private DS2Responder responder; - private DS2Session session; - - /////////////////////////////////////////////////////////////////////////// - // Constructors - /////////////////////////////////////////////////////////////////////////// - - DS2InboundRequest() { - } - - /////////////////////////////////////////////////////////////////////////// - // Methods in alphabetical order - /////////////////////////////////////////////////////////////////////////// - - public DSLink getLink() { - return link; - } - - public String getPath() { - return path; - } - - public DSMap getRequest() { - return request; - } - - public DS2Responder getResponder() { - return responder; - } - - public Integer getRequestId() { - return requestId; - } - - public DS2Session getSession() { - return session; - } - - public DS2InboundRequest setLink(DSLink link) { - this.link = link; - return this; - } - - public DS2InboundRequest setPath(String path) { - this.path = path; - return this; - } - - public DS2InboundRequest setSession(DS2Session session) { - this.session = session; - return this; - } - - public DS2InboundRequest setRequest(DSMap request) { - this.request = request; - return this; - } - - public DS2InboundRequest setRequestId(Integer requestId) { - this.requestId = requestId; - return this; - } - - public DS2InboundRequest setResponder(DS2Responder responder) { - this.responder = responder; - return this; - } - -} diff --git a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v2/responder/DS2Responder.java b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v2/responder/DS2Responder.java index a075a49c..6a27c645 100644 --- a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v2/responder/DS2Responder.java +++ b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/protocol_v2/responder/DS2Responder.java @@ -1,22 +1,17 @@ package com.acuity.iot.dsa.dslink.protocol.protocol_v2.responder; -import com.acuity.iot.dsa.dslink.protocol.DSStream; -import com.acuity.iot.dsa.dslink.protocol.message.OutboundMessage; +import com.acuity.iot.dsa.dslink.protocol.protocol_v2.DS2MessageReader; import com.acuity.iot.dsa.dslink.protocol.protocol_v2.DS2Session; import com.acuity.iot.dsa.dslink.protocol.protocol_v2.MessageConstants; -import com.acuity.iot.dsa.dslink.protocol.protocol_v2.DS2MessageReader; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; +import com.acuity.iot.dsa.dslink.protocol.responder.DSResponder; import org.iot.dsa.DSRuntime; -import org.iot.dsa.dslink.DSLinkConnection; -import org.iot.dsa.node.DSNode; /** * Implements DSA 1.1.2 * * @author Aaron Hansen */ -public class DS2Responder extends DSNode implements MessageConstants { +public class DS2Responder extends DSResponder implements MessageConstants { /////////////////////////////////////////////////////////////////////////// // Constants @@ -26,11 +21,6 @@ public class DS2Responder extends DSNode implements MessageConstants { // Fields /////////////////////////////////////////////////////////////////////////// - private ConcurrentHashMap inboundRequests = - new ConcurrentHashMap(); - private Logger logger; - private DS2Session session; - private DS2Responder responder; //private DS2InboundSubscriptions subscriptions = //new DS2InboundSubscriptions(this); @@ -39,32 +29,13 @@ public class DS2Responder extends DSNode implements MessageConstants { ///////////////////////////////////////////////////////////////// public DS2Responder(DS2Session session) { - this.session = session; + super(session); } ///////////////////////////////////////////////////////////////// // Methods - In alphabetical order by method name. ///////////////////////////////////////////////////////////////// - public DSLinkConnection getConnection() { - return session.getConnection(); - } - - @Override - public Logger getLogger() { - if (logger == null) { - logger = Logger.getLogger( - getConnection().getLink().getLinkName() + ".responderSession"); - } - return logger; - } - - /* - public DS2InboundSubscriptions getSubscriptions() { - return subscriptions; - } - */ - /** * Process an individual request. */ @@ -129,10 +100,10 @@ private void processList(DS2MessageReader msg) { String path = (String) msg.getHeader(HDR_TARGET_PATH); DS2InboundList listImpl = new DS2InboundList(); listImpl.setPath(path) - .setSession(session) + .setSession(getSession()) .setRequestId(rid) .setResponder(this); - inboundRequests.put(listImpl.getRequestId(), listImpl); + putRequest(listImpl.getRequestId(), listImpl); DSRuntime.run(listImpl); } @@ -193,18 +164,6 @@ private void processSubscribe(int rid, DSMap req) { * } */ - void removeInboundRequest(Integer requestId) { - inboundRequests.remove(requestId); - } - - public boolean shouldEndMessage() { - return session.shouldEndMessage(); - } - - public void sendResponse(OutboundMessage res) { - session.enqueueOutgoingResponse(res); - } - /** * Used throughout processRequest. private void throwInvalidMethod(String methodName, DSMap request) { diff --git a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/responder/DSInboundList.java b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/responder/DSInboundList.java new file mode 100644 index 00000000..5121d996 --- /dev/null +++ b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/responder/DSInboundList.java @@ -0,0 +1,675 @@ +package com.acuity.iot.dsa.dslink.protocol.responder; + +import com.acuity.iot.dsa.dslink.protocol.DSStream; +import com.acuity.iot.dsa.dslink.protocol.message.ErrorResponse; +import com.acuity.iot.dsa.dslink.protocol.message.MessageWriter; +import com.acuity.iot.dsa.dslink.protocol.message.OutboundMessage; +import com.acuity.iot.dsa.dslink.protocol.message.RequestPath; +import java.util.Iterator; +import org.iot.dsa.DSRuntime; +import org.iot.dsa.dslink.DSIResponder; +import org.iot.dsa.dslink.responder.ApiObject; +import org.iot.dsa.dslink.responder.InboundListRequest; +import org.iot.dsa.dslink.responder.OutboundListResponse; +import org.iot.dsa.io.DSIWriter; +import org.iot.dsa.node.DSElement; +import org.iot.dsa.node.DSIValue; +import org.iot.dsa.node.DSInfo; +import org.iot.dsa.node.DSList; +import org.iot.dsa.node.DSMap; +import org.iot.dsa.node.DSMap.Entry; +import org.iot.dsa.node.DSMetadata; +import org.iot.dsa.node.DSNode; +import org.iot.dsa.node.DSPath; +import org.iot.dsa.node.action.ActionSpec; +import org.iot.dsa.node.action.DSAction; +import org.iot.dsa.node.event.DSIEvent; +import org.iot.dsa.node.event.DSISubscriber; +import org.iot.dsa.node.event.DSInfoTopic; +import org.iot.dsa.node.event.DSTopic; + +/** + * List implementation for a responder. + * + * @author Aaron Hansen + */ +public abstract class DSInboundList extends DSInboundRequest + implements DSISubscriber, DSStream, InboundListRequest, OutboundMessage, + OutboundListResponse, Runnable { + + /////////////////////////////////////////////////////////////////////////// + // Constants + /////////////////////////////////////////////////////////////////////////// + + private static final int STATE_INIT = 0; + private static final int STATE_CHILDREN = 1; + private static final int STATE_UPDATES = 2; + private static final int STATE_CLOSE_PENDING = 3; + private static final int STATE_CLOSED = 4; + + /////////////////////////////////////////////////////////////////////////// + // Fields + /////////////////////////////////////////////////////////////////////////// + + private StringBuilder cacheBuf = new StringBuilder(); + private DSMap cacheMap = new DSMap(); + private DSMetadata cacheMeta = new DSMetadata(cacheMap); + private Iterator children; + private Exception closeReason; + private DSInfo info; + private DSNode node; + private OutboundListResponse response; + private boolean enqueued = false; + private int state = STATE_INIT; + private Update updateHead; + private Update updateTail; + + /////////////////////////////////////////////////////////////////////////// + // Constructors + /////////////////////////////////////////////////////////////////////////// + + /////////////////////////////////////////////////////////////////////////// + // Methods in alphabetical order + /////////////////////////////////////////////////////////////////////////// + + @Override + public void childAdded(ApiObject child) { + if (!isClosed()) { + enqueue(new Update(child, true)); + } + } + + @Override + public void childRemoved(ApiObject child) { + if (!isClosed()) { + enqueue(new Update(child, false)); + } + } + + @Override + public void close() { + if (!isOpen()) { + return; + } + state = STATE_CLOSE_PENDING; + enqueueResponse(); + fine(fine() ? getPath() + " list closed locally" : null); + } + + @Override + public void close(Exception reason) { + if (!isOpen()) { + return; + } + state = STATE_CLOSE_PENDING; + closeReason = reason; + enqueueResponse(); + fine(fine() ? getPath() + " list closed locally" : null); + } + + /** + * Remove an update from the queue. + */ + private synchronized Update dequeue() { + if (updateHead == null) { + return null; + } + Update ret = null; + ret = updateHead; + if (updateHead == updateTail) { + updateHead = null; + updateTail = null; + } else { + updateHead = updateHead.next; + } + ret.next = null; + return ret; + } + + private void doClose() { + state = STATE_CLOSED; + getResponder().removeRequest(getRequestId()); + if (response == null) { + return; + } + DSRuntime.run(new Runnable() { + @Override + public void run() { + try { + response.onClose(); + } catch (Exception x) { + severe(getPath(), x); + } + } + }); + } + + private void encodeChild(ApiObject child, DSIWriter out) { + out.beginList(); + String name = child.getName(); + String displayName = null; + if (DSPath.encodeName(name, cacheBuf)) { + displayName = name; + out.value(cacheBuf.toString()); + } else { + out.value(name); + } + cacheBuf.setLength(0); + out.beginMap(); + child.getMetadata(cacheMap.clear()); + DSElement e = cacheMap.remove(DSMetadata.DISPLAY_NAME); + if (e != null) { + out.key("$name").value(e); + } else if (displayName != null) { + out.key("$name").value(displayName); + } + e = cacheMap.remove("$is"); + if (e != null) { + out.key("$is").value(e); + } else { + out.key("$is").value("node"); + } + if (child.isAction()) { + ActionSpec action = child.getAction(); + e = cacheMap.remove("$invokable"); + if (e != null) { + out.key("$invokable").value(e); + } else { + out.key("$invokable").value(action.getPermission().toString()); + } + } else if (child.isValue()) { + out.key("$type"); + e = cacheMap.remove("$type"); + if (e != null) { + out.value(e); + } else { + encodeType(child.getValue(), cacheMeta, out); + } + if (!child.isReadOnly()) { + e = cacheMap.remove("$writable"); + if (e != null) { + out.key("$writable").value(e); + } else { + out.key("$writable").value(child.isAdmin() ? "config" : "write"); + } + } + } else if (child.isAdmin()) { + e = cacheMap.remove("$permission"); + if (e != null) { + out.key("$permission").value(e); + } else { + out.key("$permission").value("config"); + } + } + out.endMap().endList(); + cacheMap.clear(); + } + + /** + * Encode all the meta data about the root target of a list request. + */ + private void encodeTarget(ApiObject object, DSIWriter out) { + if (object instanceof DSInfo) { + DSMetadata.getMetadata((DSInfo) object, cacheMap.clear()); + } else { + object.getMetadata(cacheMap.clear()); + } + DSElement e = cacheMap.remove("$is"); + if (e == null) { + out.beginList().value("$is").value("node").endList(); + } else { + out.beginList().value("$is").value(e).endList(); + + } + e = cacheMap.get("$name"); + if (e == null) { + String safeName = object.getName(); + if (DSPath.encodeName(safeName, cacheBuf)) { + safeName = cacheBuf.toString(); + } + cacheBuf.setLength(0); + out.beginList().value("$name").value(safeName).endList(); + } else { + out.beginList().value("$name").value(e).endList(); + } + if (object.isAction()) { + encodeTargetAction(object, out); + } else if (object.isValue()) { + encodeTargetValue(object, out); + } else if (object.isAdmin()) { + e = cacheMap.remove("$permission"); + if (e == null) { + out.beginList().value("$permission").value("config").endList(); + } else { + out.beginList().value("$permission").value(e).endList(); + } + } + encodeTargetMetadata(cacheMap, out); + cacheMap.clear(); + } + + /** + * Called by encodeTarget for actions. + */ + private void encodeTargetAction(ApiObject object, DSIWriter out) { + DSInfo info = null; + if (object instanceof DSInfo) { + info = (DSInfo) object; + } + ActionSpec action = object.getAction(); + DSAction dsAction = null; + if (action instanceof DSAction) { + dsAction = (DSAction) action; + } + DSElement e = cacheMap.remove("$invokable"); + out.beginList().value("$invokable"); + if (e == null) { + out.value(action.getPermission().toString()).endList(); + } else { + out.value(e).endList(); + } + e = cacheMap.remove("params"); + out.beginList().value("$params"); + if (e == null) { + out.beginList(); + Iterator params = action.getParameters(); + if (params != null) { + DSMap param; + while (params.hasNext()) { + param = params.next(); + if (dsAction != null) { + dsAction.prepareParameter(info, param); + } + out.value(fixType(param)); + } + } + out.endList(); + } else { + out.value(e); + } + out.endList(); + if (action.getResultType().isValues()) { + e = cacheMap.remove("$columns"); + out.beginList().value("$columns"); + if (e == null) { + out.beginList(); + Iterator params = action.getParameters(); + if (params != null) { + DSMap param; + while (params.hasNext()) { + param = params.next(); + if (dsAction != null) { + dsAction.prepareParameter(info, param); + } + out.value(fixType(param)); + } + } + out.endList(); + } else { + out.value(e); + } + out.endList(); + } + e = cacheMap.remove("$result"); + if (e != null) { + out.beginList().value("$result").value(e).endList(); + } else if (!action.getResultType().isVoid()) { + out.beginList().value("$result").value(action.getResultType().toString()).endList(); + } + } + + /** + * Called by encodeTarget, encodes meta-data as configs. + */ + private void encodeTargetMetadata(DSMap metadata, DSIWriter out) { + if (cacheMap.isEmpty()) { + return; + } + Entry entry; + String name; + for (int i = 0, len = cacheMap.size(); i < len; i++) { + entry = cacheMap.getEntry(i); + out.beginList(); + name = entry.getKey(); + switch (name.charAt(0)) { + case '$': + case '@': + out.value(name); + default: + cacheBuf.append("@"); //TODO ? + DSPath.encodeName(name, cacheBuf); + out.value(cacheBuf.toString()); + cacheBuf.setLength(0); + + } + out.value(entry.getValue()); + out.endList(); + } + } + + /** + * Called by encodeTarget for values. + */ + private void encodeTargetValue(ApiObject object, DSIWriter out) { + DSElement e = cacheMap.remove("$type"); + out.beginList(); + out.value("$type"); + if (e != null) { + out.value(e); + } else { + encodeType(object.getValue(), cacheMeta, out); + } + out.endList(); + e = cacheMap.remove("$writable"); + if (e != null) { + out.beginList() + .value("$writable") + .value(e) + .endList(); + } else if (!object.isReadOnly()) { + out.beginList() + .value("$writable") + .value(object.isAdmin() ? "config" : "write") + .endList(); + } + } + + private void encodeType(DSIValue value, DSMetadata meta, DSIWriter out) { + String type = meta.getType(); + if ((type == null) && (value != null)) { + meta.setType(value); + } + fixType(meta.getMap()); + DSElement e = cacheMap.remove(DSMetadata.TYPE); + if (e == null) { + throw new IllegalArgumentException("Missing type"); + } + out.value(e); + } + + private void encodeUpdate(Update update, DSIWriter out) { + if (!isOpen()) { + return; + } + if (update.added) { + encodeChild(update.child, out); + } else { + out.beginMap(); + out.key("name").value(DSPath.encodeName(update.child.getName())); + out.key("change").value("remove"); + out.endMap(); + } + } + + private void enqueue(Update update) { + if (!isOpen()) { + return; + } + synchronized (this) { + if (updateHead == null) { + updateHead = update; + updateTail = update; + } else { + updateTail.next = update; + updateTail = update; + } + if (enqueued) { + return; + } + } + getResponder().sendResponse(this); + } + + /** + * Enqueues in the session. + */ + private void enqueueResponse() { + synchronized (this) { + if (enqueued) { + return; + } + enqueued = true; + } + getResponder().sendResponse(this); + } + + /** + * Combines boolean and enum ranges into the type name. + */ + private DSMap fixType(DSMap arg) { + String type = arg.getString(DSMetadata.TYPE); + if ("bool".equals(type)) { + DSList range = (DSList) arg.remove(DSMetadata.BOOLEAN_RANGE); + if ((range == null) || (range.size() != 2)) { + return arg; + } else { + cacheBuf.setLength(0); + cacheBuf.append(type); + cacheBuf.append('['); + cacheBuf.append(range.get(0).toString()); + cacheBuf.append(','); + cacheBuf.append(range.get(1).toString()); + cacheBuf.append(']'); + arg.put(DSMetadata.TYPE, cacheBuf.toString()); + } + } else if ("enum".equals(type)) { + DSList range = (DSList) arg.remove(DSMetadata.ENUM_RANGE); + if (range == null) { + return arg; + } + cacheBuf.setLength(0); + cacheBuf.append(type); + cacheBuf.append('['); + for (int i = 0, len = range.size(); i < len; i++) { + if (i > 0) { + cacheBuf.append(','); + } + cacheBuf.append(range.get(i).toString()); + } + cacheBuf.append(']'); + arg.put(DSMetadata.TYPE, cacheBuf.toString()); + } + return arg; + } + + @Override + public ApiObject getTarget() { + return info; + } + + private boolean isClosed() { + return state == STATE_CLOSED; + } + + private boolean isClosePending() { + return state == STATE_CLOSE_PENDING; + } + + /** + * Not closed or closed pending. + */ + @Override + public boolean isOpen() { + return (state != STATE_CLOSE_PENDING) && (state != STATE_CLOSED); + } + + @Override + public void onClose() { + if (node != null) { + node.unsubscribe(DSNode.INFO_TOPIC, null, this); + } + } + + @Override + public void onEvent(DSTopic topic, DSIEvent event, DSNode node, DSInfo child, + Object... params) { + switch ((DSInfoTopic.Event) event) { + case CHILD_ADDED: + childAdded(child); + break; + case CHILD_REMOVED: + childRemoved(child); + break; + case METADATA_CHANGED: //TODO + break; + default: + } + } + + @Override + public void onUnsubscribed(DSTopic topic, DSNode node, DSInfo child) { + close(); + } + + @Override + public void run() { + try { + RequestPath path = new RequestPath(getPath(), getLink()); + if (path.isResponder()) { + DSIResponder responder = (DSIResponder) path.getTarget(); + setPath(path.getPath()); + response = responder.onList(this); + } else { + info = path.getInfo(); + if (info.isNode()) { + node = info.getNode(); + node.subscribe(DSNode.INFO_TOPIC, null, this); + } + response = this; + } + } catch (Exception x) { + severe(getPath(), x); + close(x); + return; + } + if (response == null) { + close(); + } else { + enqueueResponse(); + } + } + + @Override + public void onClose(Integer requestId) { + if (isClosed()) { + return; + } + state = STATE_CLOSED; + fine(finer() ? getPath() + " list closed" : null); + synchronized (this) { + updateHead = updateTail = null; + } + doClose(); + } + + @Override + public void write(MessageWriter writer) { + DSIWriter out = writer.getWriter(); + enqueued = false; + if (isClosed()) { + return; + } + if (isClosePending() && (updateHead == null) && (closeReason != null)) { + ErrorResponse res = makeError(closeReason); + res.write(writer); + doClose(); + return; + } + int last = state; + out.beginMap(); + out.key("rid").value(getRequestId()); + switch (state) { + case STATE_INIT: + out.key("updates").beginList(); + writeInit(writer); + break; + case STATE_CHILDREN: + out.key("updates").beginList(); + writeChildren(writer); + break; + case STATE_CLOSE_PENDING: + case STATE_UPDATES: + out.key("updates").beginList(); + writeUpdates(writer); + break; + default: + ; + } + out.endList(); + if ((state != last) && (state == STATE_UPDATES)) { + out.key("stream").value("open"); + } else if (isClosePending() && (updateHead == null)) { + if (closeReason != null) { + getResponder().sendResponse(makeError(closeReason)); + } else { + out.key("stream").value("closed"); + } + doClose(); + } + out.endMap(); + } + + private void writeChildren(MessageWriter writer) { + DSIWriter out = writer.getWriter(); + if (children != null) { + ApiObject child; + while (children.hasNext()) { + child = children.next(); + if (!child.isHidden()) { + encodeChild(child, out); + } + if (getResponder().shouldEndMessage()) { + enqueueResponse(); + return; + } + } + } + children = null; + state = STATE_UPDATES; + } + + private void writeInit(MessageWriter writer) { + DSIWriter out = writer.getWriter(); + ApiObject target = response.getTarget(); + encodeTarget(target, out); + if (target.hasChildren()) { + state = STATE_CHILDREN; + children = target.getChildren(); + writeChildren(writer); + } else { + state = STATE_UPDATES; + writeUpdates(writer); + } + } + + private void writeUpdates(MessageWriter writer) { + DSIWriter out = writer.getWriter(); + DSResponder responder = getResponder(); + Update update = dequeue(); + while (update != null) { + encodeUpdate(update, out); + if (responder.shouldEndMessage()) { + enqueueResponse(); + break; + } + update = dequeue(); + } + } + + /////////////////////////////////////////////////////////////////////////// + // Inner Classes + /////////////////////////////////////////////////////////////////////////// + + private static class Update { + + boolean added; + ApiObject child; + Update next; + + Update(ApiObject child, boolean added) { + this.child = child; + this.added = added; + } + } + +} diff --git a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/responder/DSInboundRequest.java b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/responder/DSInboundRequest.java index c76265b3..8ec29dbf 100644 --- a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/responder/DSInboundRequest.java +++ b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/responder/DSInboundRequest.java @@ -1,6 +1,7 @@ package com.acuity.iot.dsa.dslink.protocol.responder; import com.acuity.iot.dsa.dslink.DSSession; +import com.acuity.iot.dsa.dslink.protocol.message.ErrorResponse; import org.iot.dsa.dslink.DSLink; import org.iot.dsa.dslink.responder.InboundRequest; import org.iot.dsa.logging.DSLogger; @@ -10,7 +11,7 @@ * * @author Aaron Hansen */ -public class DSInboundRequest extends DSLogger implements InboundRequest { +public abstract class DSInboundRequest extends DSLogger implements InboundRequest { /////////////////////////////////////////////////////////////////////////// // Fields @@ -46,6 +47,8 @@ public DSSession getSession() { return session; } + protected abstract ErrorResponse makeError(Throwable reason); + public DSInboundRequest setLink(DSLink link) { this.link = link; return this; diff --git a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/responder/DSResponder.java b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/responder/DSResponder.java index 48ef298e..0a4c61cf 100644 --- a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/responder/DSResponder.java +++ b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/protocol/responder/DSResponder.java @@ -88,6 +88,7 @@ public void onDisconnect() { public DSStream putRequest(Integer rid, DSStream request) { return inboundRequests.put(rid, request); } + public DSStream removeRequest(Integer rid) { return inboundRequests.remove(rid); } diff --git a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/test/TestTransport.java b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/test/TestTransport.java index 7c9e78c4..d68df623 100644 --- a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/test/TestTransport.java +++ b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/test/TestTransport.java @@ -1,209 +1,36 @@ package com.acuity.iot.dsa.dslink.test; -import com.acuity.iot.dsa.dslink.transport.DSBinaryTransport; -import com.acuity.iot.dsa.dslink.transport.DSTransport; -import java.io.IOException; -import java.io.InputStream; -import java.nio.ByteBuffer; -import org.iot.dsa.dslink.DSLinkConnection; -import com.acuity.iot.dsa.dslink.io.DSByteBuffer; -import com.acuity.iot.dsa.dslink.io.DSIoException; +import com.acuity.iot.dsa.dslink.transport.PushBinaryTransport; /** * Routes requests and responses back to self. * * @author Aaron Hansen */ -public class TestTransport extends DSBinaryTransport { +public class TestTransport extends PushBinaryTransport { /////////////////////////////////////////////////////////////////////////// // Fields /////////////////////////////////////////////////////////////////////////// - private DSByteBuffer buffer = new DSByteBuffer(); - private DSLinkConnection connection; - private String connectionUri; private int messageSize; - private boolean open = false; ///////////////////////////////////////////////////////////////// // Methods - In alphabetical order by method name. ///////////////////////////////////////////////////////////////// - @Override - public DSTransport beginMessage() { - synchronized (buffer) { - while (buffer.available() > 0) { - try { - buffer.wait(1000); - } catch (Exception ignore) { - } - } - } - return this; - } - - @Override - public DSTransport close() { - if (!open) { - return this; - } - open = false; - return this; - } - - @Override - public DSTransport endMessage() { - messageSize = 0; - return this; - } - - @Override - public DSLinkConnection getConnection() { - return connection; - } - - @Override - public InputStream getInput() { - return new MyInputStream(); - } - - @Override - public boolean isOpen() { - return open; - } - @Override public int messageSize() { - return buffer.length(); - } - - @Override - public DSTransport open() { - if (open) { - return this; - } - open = true; - buffer.open(); - return this; - } - - /** - * Returns the nextRun incoming byte, or -1 when end of stream has been reached. - * - * @throws DSIoException if there are any issues. - */ - private int read() { - return buffer.read(); - } - - /** - * Reads incoming bytes into the given buffer. - * - * @param buf The buffer into which data is read. - * @param off The start offset in the buffer to put data. - * @param len The maximum number of bytes to read. - * @return The number of bytes read or -1 for end of stream. - * @throws DSIoException if there are any issues. - */ - private int read(byte[] buf, int off, int len) { - return buffer.read(buf, off, len); - } - - @Override - public DSTransport setConnection(DSLinkConnection connection) { - this.connection = connection; - return this; + return messageSize; } @Override - public DSTransport setConnectionUrl(String uri) { - this.connectionUri = uri; - return this; - } - - @Override - public DSTransport setReadTimeout(long millis) { - buffer.setTimeout(millis); - return this; - } - - @Override - public void write(ByteBuffer buf, boolean isLast) { - buffer.put(buf); - } - - ///////////////////////////////////////////////////////////////// - // Inner Classes - ///////////////////////////////////////////////////////////////// - - private class MyInputStream extends InputStream { - - @Override - public int available() { - return buffer.available(); - } - - @Override - public void close() { - TestTransport.this.close(); - } - - @Override - public int read() throws IOException { - if (!open) { - if (buffer.available() == 0) { - throw new IOException("Closed " + connectionUri); - } - } - return TestTransport.this.read(); + public void write(byte[] buf, int off, int len, boolean isLast) { + messageSize += len; + push(buf, off, len); + if (isLast) { + messageSize = 0; } - - @Override - public int read(byte[] buf) throws IOException { - if (!open) { - if (buffer.available() == 0) { - throw new IOException("Closed " + connectionUri); - } - } - return TestTransport.this.read(buf, 0, buf.length); - } - - @Override - public int read(byte[] buf, int off, int len) throws IOException { - if (!open) { - if (buffer.available() == 0) { - throw new IOException("Closed " + connectionUri); - } - } - return TestTransport.this.read(buf, off, len); - } - } - - /* - private class MyOutputStream extends OutputStream { - - @Override - public void close() { - TestTransport.this.close(); - } - - @Override - public void write(int b) throws IOException { - TestTransport.this.write(b); - } - - @Override - public void write(byte[] buf) throws IOException { - TestTransport.this.write(buf, 0, buf.length, false); - } - - @Override - public void write(byte[] buf, int off, int len) throws IOException { - TestTransport.this.write(buf, off, len, false); - } - } - */ } diff --git a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/transport/DSBinaryTransport.java b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/transport/DSBinaryTransport.java index 99a266f2..492a84d8 100644 --- a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/transport/DSBinaryTransport.java +++ b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/transport/DSBinaryTransport.java @@ -1,7 +1,6 @@ package com.acuity.iot.dsa.dslink.transport; import java.io.InputStream; -import java.nio.ByteBuffer; /** * Transport that reads and writes binary data. @@ -10,8 +9,21 @@ */ public abstract class DSBinaryTransport extends DSTransport { + /** + * For reading raw bytes from the underlying transport. The DSK does not care about frame + * oriented transports. + */ public abstract InputStream getInput(); - public abstract void write(ByteBuffer buf, boolean isLast); + /** + * Writes bytes to the underlying transport. + * + * @param buf The buffer containing the bytes to write. + * @param off The index in the buffer of the first byte to write. + * @param len The number of bytes to write. + * @param isLast Indicator of end of frame (message) for frame oriented transports such as + * websockets. + */ + public abstract void write(byte[] buf, int off, int len, boolean isLast); } diff --git a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/transport/PushBinaryTransport.java b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/transport/PushBinaryTransport.java new file mode 100644 index 00000000..8a0bd074 --- /dev/null +++ b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/transport/PushBinaryTransport.java @@ -0,0 +1,183 @@ +package com.acuity.iot.dsa.dslink.transport; + +import com.acuity.iot.dsa.dslink.io.DSByteBuffer; +import com.acuity.iot.dsa.dslink.io.DSIoException; +import java.io.IOException; +import java.io.InputStream; +import org.iot.dsa.util.DSException; + +/** + * For transports that push values for reading (such as the TestTransport and websockets). + * + * @author Aaron Hansen + */ +public abstract class PushBinaryTransport extends DSBinaryTransport { + + /////////////////////////////////////////////////////////////////////////// + // Fields + /////////////////////////////////////////////////////////////////////////// + + private RuntimeException closeException; + private InputStream input = new MyInputStream(); + private boolean open = false; + private DSByteBuffer readBuffer = new DSByteBuffer(); + + ///////////////////////////////////////////////////////////////// + // Methods - In alphabetical order by method name. + ///////////////////////////////////////////////////////////////// + + @Override + public DSTransport beginMessage() { + return this; + } + + protected void close(Throwable reason) { + closeException = DSException.makeRuntime(reason); + close(); + } + + @Override + public DSTransport close() { + synchronized (this) { + open = false; + notifyAll(); + } + return this; + } + + @Override + public DSTransport endMessage() { + return this; + } + + @Override + public InputStream getInput() { + return input; + } + + @Override + public boolean isOpen() { + return open; + } + + /** + * Call super to set the open state. + */ + public DSTransport open() { + open = true; + return this; + } + + /** + * Call this to push bytes. + */ + protected void push(byte[] bytes, int off, int len) { + if (!testOpen()) { + throw new IllegalStateException("Transport closed"); + } + synchronized (this) { + readBuffer.put(bytes, 0, len); + notifyAll(); + } + } + + /** + * Returns true if open, false if closed, throws and exception if closed with an exception. + */ + protected boolean testOpen() { + if (!open) { + if (closeException != null) { + throw closeException; + } + return false; + } + return true; + } + + ///////////////////////////////////////////////////////////////// + // Inner Classes + ///////////////////////////////////////////////////////////////// + + private class MyInputStream extends InputStream { + + @Override + public int available() { + return readBuffer.available(); + } + + @Override + public void close() { + PushBinaryTransport.this.close(); + } + + @Override + public int read() throws IOException { + synchronized (PushBinaryTransport.this) { + if (testOpen() && readBuffer.available() == 0) { + try { + PushBinaryTransport.this.wait(getReadTimeout()); + } catch (Exception x) { + } + } + if (!testOpen()) { + return -1; + } + if (readBuffer.available() == 0) { + throw new DSIoException("Read timeout"); + } + return readBuffer.read(); + } + } + + @Override + public int read(byte[] buf) throws IOException { + if (buf.length == 0) { + if (!testOpen()) { + return -1; + } + return 0; + } + synchronized (PushBinaryTransport.this) { + if (testOpen() && readBuffer.available() == 0) { + try { + PushBinaryTransport.this.wait(getReadTimeout()); + } catch (Exception x) { + } + } + if (!testOpen()) { + return -1; + } + if (readBuffer.available() == 0) { + throw new DSIoException("Read timeout"); + } + return readBuffer.sendTo(buf, 0, buf.length); + } + } + + @Override + public int read(byte[] buf, int off, int len) throws IOException { + if (len == 0) { + if (!testOpen()) { + return -1; + } + return 0; + } + synchronized (PushBinaryTransport.this) { + if (testOpen() && readBuffer.available() == 0) { + try { + PushBinaryTransport.this.wait(getReadTimeout()); + } catch (Exception x) { + } + } + if (!testOpen()) { + return -1; + } + if (readBuffer.available() == 0) { + throw new DSIoException("Read timeout"); + } + return readBuffer.sendTo(buf, off, len); + } + } + } + +} diff --git a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/transport/SocketTransport.java b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/transport/SocketTransport.java index 1cfe4d7e..07b2297b 100644 --- a/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/transport/SocketTransport.java +++ b/dslink-core/src/main/java/com/acuity/iot/dsa/dslink/transport/SocketTransport.java @@ -4,7 +4,6 @@ import java.io.InputStream; import java.io.OutputStream; import java.net.Socket; -import java.nio.ByteBuffer; import org.iot.dsa.util.DSException; /** @@ -14,24 +13,15 @@ */ public class SocketTransport extends DSBinaryTransport { - /////////////////////////////////////////////////////////////////////////// - // Constants - /////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////// // Fields /////////////////////////////////////////////////////////////////////////// - private byte[] buffer = new byte[8192]; private int messageSize; private OutputStream out; private boolean open = false; private Socket socket; - ///////////////////////////////////////////////////////////////// - // Methods - Constructors - ///////////////////////////////////////////////////////////////// - ///////////////////////////////////////////////////////////////// // Methods - In alphabetical order by method name. ///////////////////////////////////////////////////////////////// @@ -95,11 +85,12 @@ public int messageSize() { @Override public DSTransport open() { + if (open) { + throw new IllegalStateException("Already open"); + } try { - if (open) { - return this; - } socket = new Socket(getConnectionUrl(), 443); + socket.setSoTimeout((int) getReadTimeout()); open = true; fine(fine() ? "SocketTransport open" : null); } catch (Exception x) { @@ -109,26 +100,15 @@ public DSTransport open() { } /** - * Flips the buffer, writes it, then clears it. + * Write the bytes to the socket, isLast is ignored. */ - public void write(ByteBuffer buf, boolean isLast) { - messageSize += buf.position(); + public void write(byte[] buf, int off, int len, boolean isLast) { try { + messageSize += len; if (out == null) { out = socket.getOutputStream(); } - buf.flip(); - int len = buf.remaining(); - while (len > 0) { - len = Math.min(buf.remaining(), buffer.length); - buf.get(buffer, 0, len); - out.write(buffer, 0, len); - len = buf.remaining(); - } - buf.clear(); - if (isLast) { - messageSize = 0; - } + out.write(buf, 0, len); } catch (IOException x) { DSException.throwRuntime(x); } diff --git a/dslink-core/src/main/java/org/iot/dsa/dslink/DSLink.java b/dslink-core/src/main/java/org/iot/dsa/dslink/DSLink.java index 20c0cf32..fe9b48fc 100644 --- a/dslink-core/src/main/java/org/iot/dsa/dslink/DSLink.java +++ b/dslink-core/src/main/java/org/iot/dsa/dslink/DSLink.java @@ -14,18 +14,11 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; import org.iot.dsa.DSRuntime; -import org.iot.dsa.dslink.responder.InboundInvokeRequest; -import org.iot.dsa.dslink.responder.InboundListRequest; -import org.iot.dsa.dslink.responder.InboundSetRequest; -import org.iot.dsa.dslink.responder.InboundSubscribeRequest; -import org.iot.dsa.dslink.responder.OutboundListResponse; -import org.iot.dsa.dslink.responder.SubscriptionCloseHandler; import org.iot.dsa.io.NodeDecoder; import org.iot.dsa.io.NodeEncoder; import org.iot.dsa.io.json.JsonReader; import org.iot.dsa.io.json.JsonWriter; import org.iot.dsa.logging.DSLogging; -import org.iot.dsa.node.DSIValue; import org.iot.dsa.node.DSInfo; import org.iot.dsa.node.DSNode; import org.iot.dsa.node.action.ActionInvocation; diff --git a/dslink-core/src/main/java/org/iot/dsa/io/msgpack/MsgpackWriter.java b/dslink-core/src/main/java/org/iot/dsa/io/msgpack/MsgpackWriter.java index 6d47e7e4..449e9e4f 100644 --- a/dslink-core/src/main/java/org/iot/dsa/io/msgpack/MsgpackWriter.java +++ b/dslink-core/src/main/java/org/iot/dsa/io/msgpack/MsgpackWriter.java @@ -1,5 +1,7 @@ package org.iot.dsa.io.msgpack; +import com.acuity.iot.dsa.dslink.io.DSByteBuffer; +import com.acuity.iot.dsa.dslink.transport.DSBinaryTransport; import java.io.IOException; import java.io.OutputStream; import java.nio.ByteBuffer; @@ -17,7 +19,7 @@ public class MsgpackWriter extends AbstractWriter implements MsgpackConstants { // Fields // ------ - protected ByteBuffer byteBuffer; + protected DSByteBuffer byteBuffer = new DSByteBuffer(); private CharBuffer charBuffer; private Frame frame; private CharsetEncoder encoder = DSString.UTF8.newEncoder(); @@ -27,11 +29,6 @@ public class MsgpackWriter extends AbstractWriter implements MsgpackConstants { // ------------ public MsgpackWriter() { - byteBuffer = ByteBuffer.allocate(1024 * 64); - } - - public MsgpackWriter(ByteBuffer buffer) { - this.byteBuffer = buffer; } // Methods @@ -105,7 +102,7 @@ private ByteBuffer getStringBuffer(int len) { * Returns the number of bytes in the outgoing byte buffer. */ public int length() { - return byteBuffer.position(); + return byteBuffer.length(); } /** @@ -114,6 +111,10 @@ public int length() { public void onComplete() { } + public byte[] toByteArray() { + return byteBuffer.toByteArray(); + } + @Override protected void writeSeparator() throws IOException { } @@ -237,7 +238,7 @@ protected void writeListStart(int len) throws IOException { this.frame = new Frame(true); if (len < 0) { byteBuffer.put(LIST16); - frame.offset = byteBuffer.position(); + frame.offset = byteBuffer.length(); byteBuffer.putShort((short) 0); } else if (len < (1 << 4)) { byteBuffer.put((byte) (FIXLIST_PREFIX | len)); @@ -270,7 +271,7 @@ protected void writeMapStart(int len) throws IOException { this.frame = new Frame(true); if (len < 0) { byteBuffer.put(MAP16); - frame.offset = byteBuffer.position(); + frame.offset = byteBuffer.length(); byteBuffer.putShort((short) 0); } else if (len < (1 << 4)) { byteBuffer.put((byte) (FIXMAP_PREFIX | len)); @@ -295,8 +296,7 @@ private void writeString(CharSequence arg) throws IOException { CharBuffer chars = getCharBuffer(arg); ByteBuffer strBuffer = getStringBuffer(chars.position() * (int) encoder.maxBytesPerChar()); encoder.encode(chars, strBuffer, false); - strBuffer.flip(); - int len = strBuffer.remaining(); + int len = strBuffer.position(); if (len < (1 << 5)) { byteBuffer.put((byte) (FIXSTR_PREFIX | len)); } else if (len < (1 << 8)) { @@ -317,9 +317,14 @@ private void writeString(CharSequence arg) throws IOException { * Writes the internal buffer to the parameter. The internal buffer will be cleared. */ public void writeTo(ByteBuffer out) { - byteBuffer.flip(); - out.put(byteBuffer); - byteBuffer.clear(); + byteBuffer.sendTo(out); + } + + /** + * Writes the internal buffer to the parameter. The internal buffer will be cleared. + */ + public void writeTo(DSBinaryTransport out) { + byteBuffer.sendTo(out, (frame == null)); } /** @@ -329,12 +334,8 @@ public void writeTo(ByteBuffer out) { */ public void writeTo(OutputStream out) { try { - byteBuffer.flip(); - while (byteBuffer.hasRemaining()) { - out.write(byteBuffer.get()); - } - byteBuffer.clear(); - } catch (IOException x) { + byteBuffer.sendTo(out); + } catch (Exception x) { DSException.throwRuntime(x); } } @@ -372,7 +373,7 @@ boolean isMap() { void writeSize() { if (offset >= 0) { - byteBuffer.putShort(offset, (short) size); + byteBuffer.overwriteShort(offset, (short) size, true); } } } diff --git a/dslink-core/src/main/java/org/iot/dsa/node/DSNode.java b/dslink-core/src/main/java/org/iot/dsa/node/DSNode.java index 1f3eb9f0..7de04331 100644 --- a/dslink-core/src/main/java/org/iot/dsa/node/DSNode.java +++ b/dslink-core/src/main/java/org/iot/dsa/node/DSNode.java @@ -389,7 +389,8 @@ void dsInit() { /** * Notifies subscribers of the event. - * @param topic Must not be null. + * + * @param topic Must not be null. * @param event Must not be null. * @param child Can be null. */ @@ -399,7 +400,8 @@ protected void fire(DSTopic topic, DSIEvent event, DSInfo child) { /** * Notifies subscribers of the event. - * @param topic Must not be null. + * + * @param topic Must not be null. * @param event Must not be null. * @param child Can be null. * @param params Optional diff --git a/dslink-core/src/test/java/org/iot/dsa/dslink/DSByteBufferTest.java b/dslink-core/src/test/java/org/iot/dsa/dslink/DSByteBufferTest.java index b985425f..b5f21c7f 100644 --- a/dslink-core/src/test/java/org/iot/dsa/dslink/DSByteBufferTest.java +++ b/dslink-core/src/test/java/org/iot/dsa/dslink/DSByteBufferTest.java @@ -1,6 +1,7 @@ package org.iot.dsa.dslink; import com.acuity.iot.dsa.dslink.io.DSByteBuffer; +import java.nio.ByteBuffer; import org.junit.Assert; import org.junit.Test; @@ -9,28 +10,14 @@ */ public class DSByteBufferTest { - // Constants - // --------- - - // Fields - // ------ - - // Constructors - // ------------ - - // Methods - // ------- - @Test public void theTest() throws Exception { DSByteBuffer buffer = new DSByteBuffer(5); - Assert.assertFalse(buffer.isOpen()); - buffer.open(); Assert.assertTrue(buffer.available() == 0); byte[] tmp = new byte[]{1, 2, 3, 4, 5}; buffer.put(tmp, 0, tmp.length); Assert.assertTrue(buffer.available() == tmp.length); - int len = buffer.read(tmp, 0, tmp.length); + int len = buffer.sendTo(tmp, 0, tmp.length); Assert.assertTrue(len == tmp.length); Assert.assertArrayEquals(tmp, new byte[]{1, 2, 3, 4, 5}); buffer.put(tmp, 0, tmp.length); @@ -63,8 +50,52 @@ public void theTest() throws Exception { Assert.assertTrue(buffer.read() == 3); } -// Inner Classes -// ------------- -// + @Test + public void comparisonTest() { + ByteBuffer javaBuf = ByteBuffer.allocate(1024); + javaBuf.put((byte) 1); + DSByteBuffer dsBuf = new DSByteBuffer(); + dsBuf.put((byte) 1); + byte[] dsry = dsBuf.toByteArray(); + byte[] jary = toByteArray(javaBuf); + Assert.assertEquals(dsry.length, jary.length); + Assert.assertArrayEquals(dsry, jary); + //double + javaBuf.putDouble(12345.6); + dsBuf.putDouble(12345.6); + dsry = dsBuf.toByteArray(); + jary = toByteArray(javaBuf); + Assert.assertEquals(dsry.length, jary.length); + Assert.assertArrayEquals(dsry, jary); + //int + javaBuf.putInt(12345); + dsBuf.putInt(12345); + dsry = dsBuf.toByteArray(); + jary = toByteArray(javaBuf); + Assert.assertEquals(dsry.length, jary.length); + Assert.assertArrayEquals(dsry, jary); + //long + javaBuf.putLong(12345); + dsBuf.putLong(12345); + dsry = dsBuf.toByteArray(); + jary = toByteArray(javaBuf); + Assert.assertEquals(dsry.length, jary.length); + Assert.assertArrayEquals(dsry, jary); + //short + javaBuf.putShort((short) 123); + dsBuf.putShort((short) 123); + dsry = dsBuf.toByteArray(); + jary = toByteArray(javaBuf); + Assert.assertEquals(dsry.length, jary.length); + Assert.assertArrayEquals(dsry, jary); + } + + private byte[] toByteArray(ByteBuffer buf) { + byte[] ret = new byte[buf.position()]; + buf.flip(); + buf.get(ret); + buf.clear(); + return ret; + } } diff --git a/dslink-core/src/test/java/org/iot/dsa/dslink/MsgpackTest.java b/dslink-core/src/test/java/org/iot/dsa/dslink/MsgpackTest.java index 489b7a0f..fee041cd 100644 --- a/dslink-core/src/test/java/org/iot/dsa/dslink/MsgpackTest.java +++ b/dslink-core/src/test/java/org/iot/dsa/dslink/MsgpackTest.java @@ -20,18 +20,6 @@ */ public class MsgpackTest { - // Constants - // --------- - - // Fields - // ------ - - // Constructors - // ------------ - - // Methods - // ------- - @Test public void testStrings() throws Exception { String input = "He wes Leovenaðes sone -- liðe him be Drihten."; @@ -63,6 +51,13 @@ public void testStrings() throws Exception { @Test public void theTest() throws Exception { + MsgpackWriter tmp = new MsgpackWriter(); + tmp.beginList(); + tmp.value("abc"); + tmp.endList(); + DSIReader reader = new MsgpackReader(new ByteArrayInputStream(tmp.toByteArray())); + reader.getElement().toList(); + final ByteArrayOutputStream baos1 = new ByteArrayOutputStream(); MsgpackWriter out = new MsgpackWriter(); out.beginList(); @@ -73,9 +68,9 @@ public void theTest() throws Exception { out.value(new DSMap()); out.value(new DSList()); out.endList(); - out.writeTo(baos1); - out.reset(); - byte[] encoded = baos1.toByteArray(); + //out.writeTo(baos1); + //out.reset(); + byte[] encoded = out.toByteArray(); DSIReader parser = new MsgpackReader(new ByteArrayInputStream(encoded)); DSList list = parser.getElement().toList(); parser.close(); diff --git a/dslink-core/src/test/java/org/iot/dsa/dslink/PerfTest.java b/dslink-core/src/test/java/org/iot/dsa/dslink/PerfTest.java index f3ed7971..d62f6c91 100644 --- a/dslink-core/src/test/java/org/iot/dsa/dslink/PerfTest.java +++ b/dslink-core/src/test/java/org/iot/dsa/dslink/PerfTest.java @@ -7,7 +7,6 @@ import org.iot.dsa.node.DSNode; import org.iot.dsa.node.DSString; import org.iot.dsa.node.action.DSAction; -import org.junit.Test; /** * @author Aaron Hansen diff --git a/dslink-core/src/test/java/org/iot/dsa/dslink/RequesterInvokeTest.java b/dslink-core/src/test/java/org/iot/dsa/dslink/RequesterInvokeTest.java index bc0df6e5..7a84cfc7 100644 --- a/dslink-core/src/test/java/org/iot/dsa/dslink/RequesterInvokeTest.java +++ b/dslink-core/src/test/java/org/iot/dsa/dslink/RequesterInvokeTest.java @@ -1,16 +1,10 @@ package org.iot.dsa.dslink; -import com.acuity.iot.dsa.dslink.protocol.protocol_v1.DS1LinkConnection; import com.acuity.iot.dsa.dslink.test.TestLink; -import com.acuity.iot.dsa.dslink.transport.DSBinaryTransport; -import org.iot.dsa.dslink.requester.AbstractInvokeHandler; -import org.iot.dsa.dslink.requester.OutboundInvokeHandler; import org.iot.dsa.dslink.requester.SimpleInvokeHandler; import org.iot.dsa.node.DSInfo; import org.iot.dsa.node.DSInt; -import org.iot.dsa.node.DSList; import org.iot.dsa.node.DSMap; -import org.iot.dsa.node.DSMetadata; import org.iot.dsa.node.DSNode; import org.iot.dsa.node.DSValueType; import org.iot.dsa.node.action.ActionInvocation; diff --git a/dslink-core/src/test/java/org/iot/dsa/dslink/RequesterSubscribeTest.java b/dslink-core/src/test/java/org/iot/dsa/dslink/RequesterSubscribeTest.java index e9fbece4..af228073 100644 --- a/dslink-core/src/test/java/org/iot/dsa/dslink/RequesterSubscribeTest.java +++ b/dslink-core/src/test/java/org/iot/dsa/dslink/RequesterSubscribeTest.java @@ -5,7 +5,6 @@ import org.iot.dsa.dslink.requester.SimpleRequestHandler; import org.iot.dsa.node.DSElement; import org.iot.dsa.node.DSIValue; -import org.iot.dsa.node.DSInfo; import org.iot.dsa.node.DSInt; import org.iot.dsa.node.DSNode; import org.iot.dsa.node.DSStatus; diff --git a/dslink-websocket-standalone/src/main/java/org/iot/dsa/dslink/websocket/WsBinaryTransport.java b/dslink-websocket-standalone/src/main/java/org/iot/dsa/dslink/websocket/WsBinaryTransport.java index cf28b342..ad7305f2 100644 --- a/dslink-websocket-standalone/src/main/java/org/iot/dsa/dslink/websocket/WsBinaryTransport.java +++ b/dslink-websocket-standalone/src/main/java/org/iot/dsa/dslink/websocket/WsBinaryTransport.java @@ -1,9 +1,9 @@ package org.iot.dsa.dslink.websocket; -import com.acuity.iot.dsa.dslink.transport.DSBinaryTransport; +import com.acuity.iot.dsa.dslink.io.DSIoException; import com.acuity.iot.dsa.dslink.transport.DSTransport; +import com.acuity.iot.dsa.dslink.transport.PushBinaryTransport; import java.io.IOException; -import java.io.InputStream; import java.net.URI; import java.nio.ByteBuffer; import javax.websocket.ClientEndpoint; @@ -16,8 +16,6 @@ import javax.websocket.RemoteEndpoint; import javax.websocket.Session; import org.glassfish.tyrus.client.ClientManager; -import com.acuity.iot.dsa.dslink.io.DSByteBuffer; -import com.acuity.iot.dsa.dslink.io.DSIoException; import org.iot.dsa.util.DSException; /** @@ -27,67 +25,42 @@ * @author Aaron Hansen */ @ClientEndpoint -public class WsBinaryTransport extends DSBinaryTransport { - - /////////////////////////////////////////////////////////////////////////// - // Constants - /////////////////////////////////////////////////////////////////////////// +public class WsBinaryTransport extends PushBinaryTransport { /////////////////////////////////////////////////////////////////////////// // Fields /////////////////////////////////////////////////////////////////////////// - private DSByteBuffer buffer = new DSByteBuffer(); private ClientManager client; - private InputStream input = new MyInputStream(); private int messageSize; - private boolean open = false; private Session session; - - ///////////////////////////////////////////////////////////////// - // Methods - Constructors - ///////////////////////////////////////////////////////////////// + private ByteBuffer writeBuffer; ///////////////////////////////////////////////////////////////// // Methods - In alphabetical order by method name. ///////////////////////////////////////////////////////////////// - @Override - public DSTransport beginMessage() { - return this; - } - - @Override - public DSTransport close() { - if (!open) { - return this; - } - open = false; - try { - if (session != null) { - session.close(); + /** + * Called by write(), returns a bytebuffer for the given capacity ready for writing + * (putting). Attempts to reuse the same buffer as much as possible. + */ + private ByteBuffer getByteBuffer(int len) { + if (writeBuffer == null) { + int tmp = 16 * 1024; + while (tmp < len) { + tmp += 1024; } - } catch (Exception x) { - finer(getConnection().getConnectionId(), x); + writeBuffer = ByteBuffer.allocate(tmp); + } else if (writeBuffer.capacity() < len) { + int tmp = writeBuffer.capacity(); + while (tmp < len) { + tmp += 1024; + } + writeBuffer = ByteBuffer.allocate(tmp); + } else { + writeBuffer.clear(); } - session = null; - buffer.close(); - return this; - } - - @Override - public DSTransport endMessage() { - return this; - } - - @Override - public InputStream getInput() { - return input; - } - - @Override - public boolean isOpen() { - return open; + return writeBuffer; } public int messageSize() { @@ -96,111 +69,63 @@ public int messageSize() { @OnClose public void onClose(Session session, CloseReason reason) { - if (open) { - info(getConnectionUrl() + " remotely closed, reason = " + reason.toString()); - close(); - } + info(getConnectionUrl() + " remotely closed, reason = " + reason.toString()); + close(); } @OnError public void onError(Session session, Throwable err) { - if (open) { - open = false; - severe(getConnectionUrl(), err); - buffer.close(DSException.makeRuntime(err)); - if (err instanceof RuntimeException) { - buffer.close((RuntimeException) err); - } else { - buffer.close(new DSException(err)); - } - } + close(err); } @OnMessage public void onMessage(Session session, byte[] msgPart, boolean isLast) { - //isLast is ignored because we treat the incoming bytes as a pure stream. - buffer.put(msgPart, 0, msgPart.length); + push(msgPart, 0, msgPart.length); } @OnOpen public void onOpen(Session session, EndpointConfig config) { - open = true; this.session = session; } @Override public DSTransport open() { try { - if (open) { - return this; - } + super.open(); if (client == null) { client = ClientManager.createClient(); } client.connectToServer(this, new URI(getConnectionUrl())); - buffer.open(); - open = true; fine(fine() ? "Transport open" : null); } catch (Exception x) { + close(x); DSException.throwRuntime(x); } return this; } - /** - * Flips the buffer, writes it, then clears it. - */ - public void write(ByteBuffer buf, boolean isLast) { - if (!open) { - throw new DSIoException("Closed " + getConnectionUrl()); + @Override + public void write(byte[] buf, int off, int len, boolean isLast) { + if (!testOpen()) { + throw new DSIoException("Closed"); } - messageSize += buf.position(); + ByteBuffer byteBuffer = getByteBuffer(len); + messageSize += len; try { - buf.flip(); + byteBuffer.put(buf, off, len); + byteBuffer.flip(); RemoteEndpoint.Basic basic = session.getBasicRemote(); - basic.sendBinary(buf, isLast); - buf.clear(); + basic.sendBinary(byteBuffer, isLast); + byteBuffer.clear(); if (isLast) { messageSize = 0; } } catch (IOException x) { - if (open) { + if (isOpen()) { close(); DSException.throwRuntime(x); } } } - ///////////////////////////////////////////////////////////////// - // Inner Classes - ///////////////////////////////////////////////////////////////// - - private class MyInputStream extends InputStream { - - @Override - public int available() { - return buffer.available(); - } - - @Override - public void close() { - WsBinaryTransport.this.close(); - } - - @Override - public int read() throws IOException { - return buffer.read(); - } - - @Override - public int read(byte[] buf) throws IOException { - return buffer.read(buf, 0, buf.length); - } - - @Override - public int read(byte[] buf, int off, int len) throws IOException { - return buffer.read(buf, off, len); - } - } - } diff --git a/dslink-websocket-standalone/src/main/java/org/iot/dsa/dslink/websocket/WsTextTransport.java b/dslink-websocket-standalone/src/main/java/org/iot/dsa/dslink/websocket/WsTextTransport.java index ba3b2d29..cc7f3d86 100644 --- a/dslink-websocket-standalone/src/main/java/org/iot/dsa/dslink/websocket/WsTextTransport.java +++ b/dslink-websocket-standalone/src/main/java/org/iot/dsa/dslink/websocket/WsTextTransport.java @@ -1,5 +1,7 @@ package org.iot.dsa.dslink.websocket; +import com.acuity.iot.dsa.dslink.io.DSCharBuffer; +import com.acuity.iot.dsa.dslink.io.DSIoException; import com.acuity.iot.dsa.dslink.transport.DSTextTransport; import com.acuity.iot.dsa.dslink.transport.DSTransport; import java.io.IOException; @@ -16,8 +18,6 @@ import javax.websocket.RemoteEndpoint; import javax.websocket.Session; import org.glassfish.tyrus.client.ClientManager; -import com.acuity.iot.dsa.dslink.io.DSCharBuffer; -import com.acuity.iot.dsa.dslink.io.DSIoException; import org.iot.dsa.util.DSException; /**