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 @@ - +
- -| Modifier and Type | -Constant Field | -Value | -
|---|---|---|
-
-public static final java.lang.String |
-CFG_AUTH_TOKEN |
-"token" |
-
-
-public static final java.lang.String |
-CFG_BROKER_URL |
-"broker" |
-
-
-public static final java.lang.String |
-CFG_CONNECTION_TYPE |
-"connectionType" |
-
-
-public static final java.lang.String |
-CFG_IS_REQUESTER |
-"isRequester" |
-
-
-public static final java.lang.String |
-CFG_IS_RESPONDER |
-"isResponder" |
-
-
-public static final java.lang.String |
-CFG_KEY_FILE |
-"key" |
-
-
-public static final java.lang.String |
-CFG_LOG_FILE |
-"logFile" |
-
-
-public static final java.lang.String |
-CFG_LOG_LEVEL |
-"log" |
-
-
-public static final java.lang.String |
-CFG_MAIN_TYPE |
-"mainType" |
-
-
-public static final java.lang.String |
-CFG_NODE_FILE |
-"nodes" |
-
-
-public static final java.lang.String |
-CFG_PROTOCOL_VERSION |
-"protocolVersion" |
-
-
-public static final java.lang.String |
-CFG_READ_TIMEOUT |
-"readTimeout" |
-
-
-public static final java.lang.String |
-CFG_SAVE_INTERVAL |
-"saveInterval" |
-
-
-public static final java.lang.String |
-CFG_STABLE_DELAY |
-"stableDelay" |
-
-
-public static final java.lang.String |
-CFG_WS_TRANSPORT_FACTORY |
-"wsTransportFactory" |
-
| Modifier and Type | -Constant Field | -Value | -
|---|---|---|
-
-public static final java.lang.String |
-DBL_NAN |
-"\u001bNaN" |
-
-
-public static final java.lang.String |
-DBL_NEG_INF |
-"\u001b-Infinity" |
-
-
-public static final java.lang.String |
-DBL_POS_INF |
-"\u001bInfinity" |
-
| Modifier and Type | -Constant Field | -Value | -
|---|---|---|
-
-public static final byte |
-BIN16 |
--59 |
-
-
-public static final byte |
-BIN32 |
--58 |
-
-
-public static final byte |
-BIN8 |
--60 |
-
-
-public static final byte |
-FALSE |
--62 |
-
-
-public static final byte |
-FIXLIST_PREFIX |
--112 |
-
-
-public static final byte |
-FIXMAP_PREFIX |
--128 |
-
-
-public static final byte |
-FIXSTR_PREFIX |
--96 |
-
-
-public static final byte |
-FLOAT32 |
--54 |
-
-
-public static final byte |
-FLOAT64 |
--53 |
-
-
-public static final byte |
-INT16 |
--47 |
-
-
-public static final byte |
-INT32 |
--46 |
-
-
-public static final byte |
-INT64 |
--45 |
-
-
-public static final byte |
-INT8 |
--48 |
-
-
-public static final byte |
-LIST16 |
--36 |
-
-
-public static final byte |
-LIST32 |
--35 |
-
-
-public static final byte |
-MAP16 |
--34 |
-
-
-public static final byte |
-MAP32 |
--33 |
-
-
-public static final byte |
-NULL |
--64 |
-
-
-public static final byte |
-STR16 |
--38 |
-
-
-public static final byte |
-STR32 |
--37 |
-
-
-public static final byte |
-STR8 |
--39 |
-
-
-public static final byte |
-TRUE |
--61 |
-
-
-public static final byte |
-UINT16 |
--51 |
-
-
-public static final byte |
-UINT32 |
--50 |
-
-
-public static final byte |
-UINT64 |
--49 |
-
-
-public static final byte |
-UINT8 |
--52 |
-
| Modifier and Type | -Constant Field | -Value | -
|---|---|---|
-
-public static final byte |
-BIN16 |
--59 |
-
-
-public static final byte |
-BIN32 |
--58 |
-
-
-public static final byte |
-BIN8 |
--60 |
-
-
-public static final byte |
-FALSE |
--62 |
-
-
-public static final byte |
-FIXLIST_PREFIX |
--112 |
-
-
-public static final byte |
-FIXMAP_PREFIX |
--128 |
-
-
-public static final byte |
-FIXSTR_PREFIX |
--96 |
-
-
-public static final byte |
-FLOAT32 |
--54 |
-
-
-public static final byte |
-FLOAT64 |
--53 |
-
-
-public static final byte |
-INT16 |
--47 |
-
-
-public static final byte |
-INT32 |
--46 |
-
-
-public static final byte |
-INT64 |
--45 |
-
-
-public static final byte |
-INT8 |
--48 |
-
-
-public static final byte |
-LIST16 |
--36 |
-
-
-public static final byte |
-LIST32 |
--35 |
-
-
-public static final byte |
-MAP16 |
--34 |
-
-
-public static final byte |
-MAP32 |
--33 |
-
-
-public static final byte |
-NULL |
--64 |
-
-
-public static final byte |
-STR16 |
--38 |
-
-
-public static final byte |
-STR32 |
--37 |
-
-
-public static final byte |
-STR8 |
--39 |
-
-
-public static final byte |
-TRUE |
--61 |
-
-
-public static final byte |
-UINT16 |
--51 |
-
-
-public static final byte |
-UINT32 |
--50 |
-
-
-public static final byte |
-UINT64 |
--49 |
-
-
-public static final byte |
-UINT8 |
--52 |
-
| Modifier and Type | -Constant Field | -Value | -
|---|---|---|
-
-public static final java.lang.String |
-BOOLEAN_RANGE |
-"booleanRange" |
-
-
-public static final java.lang.String |
-DECIMAL_PLACES |
-"decimalPlaces" |
-
-
-public static final java.lang.String |
-DEFAULT |
-"default" |
-
-
-public static final java.lang.String |
-DESCRIPTION |
-"description" |
-
-
-public static final java.lang.String |
-DISPLAY_NAME |
-"displayName" |
-
-
-public static final java.lang.String |
-EDITOR |
-"editor" |
-
-
-public static final java.lang.String |
-ENUM_RANGE |
-"enumRange" |
-
-
-public static final java.lang.String |
-MAX_VALUE |
-"maxValue" |
-
-
-public static final java.lang.String |
-MIN_VALUE |
-"minValue" |
-
-
-public static final java.lang.String |
-NAME |
-"name" |
-
-
-public static final java.lang.String |
-PLACEHOLDER |
-"placeholder" |
-
-
-public static final java.lang.String |
-TYPE |
-"type" |
-
-
-public static final java.lang.String |
-UNIT |
-"unit" |
-
| Modifier and Type | -Constant Field | -Value | -
|---|---|---|
-
-public static final int |
-CONFIG_FAULT |
-2048 |
-
-
-public static final java.lang.String |
-CONFIG_FAULT_STR |
-"configFault" |
-
-
-public static final int |
-DISABLED |
-4096 |
-
-
-public static final java.lang.String |
-DISABLED_STR |
-"disabled" |
-
-
-public static final int |
-DOWN |
-512 |
-
-
-public static final java.lang.String |
-DOWN_STR |
-"down" |
-
-
-public static final int |
-FAULT |
-1024 |
-
-
-public static final java.lang.String |
-FAULT_STR |
-"fault" |
-
-
-public static final int |
-OK |
-0 |
-
-
-public static final int |
-OK_OVERRIDE |
-1 |
-
-
-public static final java.lang.String |
-OK_OVERRIDE_STR |
-"override" |
-
-
-public static final int |
-OK_REMOTE_OVERRIDE |
-2 |
-
-
-public static final java.lang.String |
-OK_REMOTE_OVERRIDE_STR |
-"remoteOverride" |
-
-
-public static final java.lang.String |
-OK_STR |
-"ok" |
-
-
-public static final int |
-REMOTE_CONFIG_FAULT |
-524288 |
-
-
-public static final java.lang.String |
-REMOTE_CONFIG_FAULT_STR |
-"remoteConfigFault" |
-
-
-public static final int |
-REMOTE_DISABLED |
-1048576 |
-
-
-public static final java.lang.String |
-REMOTE_DISABLED_STR |
-"remoteDisabled" |
-
-
-public static final int |
-REMOTE_DOWN |
-131072 |
-
-
-public static final java.lang.String |
-REMOTE_DOWN_STR |
-"remoteDown" |
-
-
-public static final int |
-REMOTE_FAULT |
-262144 |
-
-
-public static final java.lang.String |
-REMOTE_FAULT_STR |
-"remoteFault" |
-
-
-public static final int |
-REMOTE_STALE |
-65536 |
-
-
-public static final java.lang.String |
-REMOTE_STALE_STR |
-"remoteStale" |
-
-
-public static final int |
-REMOTE_UNKNOWN |
-2097152 |
-
-
-public static final java.lang.String |
-REMOTE_UNKNOWN_STR |
-"remoteUnknown" |
-
-
-public static final int |
-STALE |
-256 |
-
-
-public static final java.lang.String |
-STALE_STR |
-"stale" |
-
-
-public static final int |
-UNKNOWN |
-8192 |
-
-
-public static final java.lang.String |
-UNKNOWN_STR |
-"unknown" |
-
| Modifier and Type | -Constant Field | -Value | -
|---|---|---|
-
-public static final int |
-MILLIS_DAY |
-86400000 |
-
-
-public static final int |
-MILLIS_FIFTEEN_MINUTES |
-900000 |
-
-
-public static final int |
-MILLIS_FIFTEEN_SECONDS |
-15000 |
-
-
-public static final int |
-MILLIS_FIVE_MINUTES |
-300000 |
-
-
-public static final int |
-MILLIS_FIVE_SECONDS |
-5000 |
-
-
-public static final int |
-MILLIS_FOUR_HOURS |
-14400000 |
-
-
-public static final int |
-MILLIS_HOUR |
-3600000 |
-
-
-public static final int |
-MILLIS_MINUTE |
-60000 |
-
-
-public static final long |
-MILLIS_MONTH |
-2592000000L |
-
-
-public static final long |
-MILLIS_QUARTER |
-7776000000L |
-
-
-public static final int |
-MILLIS_SECOND |
-1000 |
-
-
-public static final int |
-MILLIS_SIX_HOURS |
-21600000 |
-
-
-public static final int |
-MILLIS_TEN_MINUTES |
-600000 |
-
-
-public static final int |
-MILLIS_TEN_SECONDS |
-10000 |
-
-
-public static final int |
-MILLIS_THIRTY_MINUTES |
-1800000 |
-
-
-public static final int |
-MILLIS_THIRTY_SECONDS |
-30000 |
-
-
-public static final int |
-MILLIS_THREE_HOURS |
-10800000 |
-
-
-public static final int |
-MILLIS_TWELVE_HOURS |
-43200000 |
-
-
-public static final int |
-MILLIS_TWENTY_MINUTES |
-1200000 |
-
-
-public static final int |
-MILLIS_TWO_HOURS |
-7200000 |
-
-
-public static final int |
-MILLIS_WEEK |
-604800000 |
-
-
-public static final long |
-MILLIS_YEAR |
-31104000000L |
-
-
-public static final long |
-NANOS_IN_MS |
-1000000L |
-
-
-public static final long |
-NANOS_IN_SEC |
-1000000000L |
-
| Modifier and Type | +Constant Field | +Value | +
|---|---|---|
+
+ public static final java.lang.String |
+ CFG_AUTH_TOKEN
+ |
+ "token" |
+
+
+ public static final java.lang.String |
+ CFG_BROKER_URL
+ |
+ "broker" |
+
+
+ public static final java.lang.String |
+ CFG_CONNECTION_TYPE
+ |
+ "connectionType" |
+
+
+ public static final java.lang.String |
+ CFG_IS_REQUESTER
+ |
+ "isRequester" |
+
+
+ public static final java.lang.String |
+ CFG_IS_RESPONDER
+ |
+ "isResponder" |
+
+
+ public static final java.lang.String |
+ CFG_KEY_FILE |
+ "key" |
+
+
+ public static final java.lang.String |
+ CFG_LOG_FILE |
+ "logFile" |
+
+
+ public static final java.lang.String |
+ CFG_LOG_LEVEL
+ |
+ "log" |
+
+
+ public static final java.lang.String |
+ CFG_MAIN_TYPE
+ |
+ "mainType" |
+
+
+ public static final java.lang.String |
+ CFG_NODE_FILE
+ |
+ "nodes" |
+
+
+ public static final java.lang.String |
+ CFG_PROTOCOL_VERSION
+ |
+ "protocolVersion" |
+
+
+ public static final java.lang.String |
+ CFG_READ_TIMEOUT
+ |
+ "readTimeout" |
+
+
+ public static final java.lang.String |
+ CFG_SAVE_INTERVAL
+ |
+ "saveInterval" |
+
+
+ public static final java.lang.String |
+ CFG_STABLE_DELAY
+ |
+ "stableDelay" |
+
+
+ public static final java.lang.String |
+ CFG_WS_TRANSPORT_FACTORY
+ |
+ "wsTransportFactory" |
+
| Modifier and Type | +Constant Field | +Value | +
|---|---|---|
+
+ public static final java.lang.String |
+ DBL_NAN |
+ "\u001bNaN" |
+
+
+ public static final java.lang.String |
+ DBL_NEG_INF |
+ "\u001b-Infinity" |
+
+
+ public static final java.lang.String |
+ DBL_POS_INF |
+ "\u001bInfinity" |
+
| Modifier and Type | +Constant Field | +Value | +
|---|---|---|
+
+ public static final byte |
+ BIN16 |
+ -59 |
+
+
+ public static final byte |
+ BIN32 |
+ -58 |
+
+
+ public static final byte |
+ BIN8 |
+ -60 |
+
+
+ public static final byte |
+ FALSE |
+ -62 |
+
+
+ public static final byte |
+ FIXLIST_PREFIX |
+ -112 |
+
+
+ public static final byte |
+ FIXMAP_PREFIX |
+ -128 |
+
+
+ public static final byte |
+ FIXSTR_PREFIX |
+ -96 |
+
+
+ public static final byte |
+ FLOAT32 |
+ -54 |
+
+
+ public static final byte |
+ FLOAT64 |
+ -53 |
+
+
+ public static final byte |
+ INT16 |
+ -47 |
+
+
+ public static final byte |
+ INT32 |
+ -46 |
+
+
+ public static final byte |
+ INT64 |
+ -45 |
+
+
+ public static final byte |
+ INT8 |
+ -48 |
+
+
+ public static final byte |
+ LIST16 |
+ -36 |
+
+
+ public static final byte |
+ LIST32 |
+ -35 |
+
+
+ public static final byte |
+ MAP16 |
+ -34 |
+
+
+ public static final byte |
+ MAP32 |
+ -33 |
+
+
+ public static final byte |
+ NULL |
+ -64 |
+
+
+ public static final byte |
+ STR16 |
+ -38 |
+
+
+ public static final byte |
+ STR32 |
+ -37 |
+
+
+ public static final byte |
+ STR8 |
+ -39 |
+
+
+ public static final byte |
+ TRUE |
+ -61 |
+
+
+ public static final byte |
+ UINT16 |
+ -51 |
+
+
+ public static final byte |
+ UINT32 |
+ -50 |
+
+
+ public static final byte |
+ UINT64 |
+ -49 |
+
+
+ public static final byte |
+ UINT8 |
+ -52 |
+
| Modifier and Type | +Constant Field | +Value | +
|---|---|---|
+
+ public static final byte |
+ BIN16 |
+ -59 |
+
+
+ public static final byte |
+ BIN32 |
+ -58 |
+
+
+ public static final byte |
+ BIN8 |
+ -60 |
+
+
+ public static final byte |
+ FALSE |
+ -62 |
+
+
+ public static final byte |
+ FIXLIST_PREFIX |
+ -112 |
+
+
+ public static final byte |
+ FIXMAP_PREFIX |
+ -128 |
+
+
+ public static final byte |
+ FIXSTR_PREFIX |
+ -96 |
+
+
+ public static final byte |
+ FLOAT32 |
+ -54 |
+
+
+ public static final byte |
+ FLOAT64 |
+ -53 |
+
+
+ public static final byte |
+ INT16 |
+ -47 |
+
+
+ public static final byte |
+ INT32 |
+ -46 |
+
+
+ public static final byte |
+ INT64 |
+ -45 |
+
+
+ public static final byte |
+ INT8 |
+ -48 |
+
+
+ public static final byte |
+ LIST16 |
+ -36 |
+
+
+ public static final byte |
+ LIST32 |
+ -35 |
+
+
+ public static final byte |
+ MAP16 |
+ -34 |
+
+
+ public static final byte |
+ MAP32 |
+ -33 |
+
+
+ public static final byte |
+ NULL |
+ -64 |
+
+
+ public static final byte |
+ STR16 |
+ -38 |
+
+
+ public static final byte |
+ STR32 |
+ -37 |
+
+
+ public static final byte |
+ STR8 |
+ -39 |
+
+
+ public static final byte |
+ TRUE |
+ -61 |
+
+
+ public static final byte |
+ UINT16 |
+ -51 |
+
+
+ public static final byte |
+ UINT32 |
+ -50 |
+
+
+ public static final byte |
+ UINT64 |
+ -49 |
+
+
+ public static final byte |
+ UINT8 |
+ -52 |
+
| Modifier and Type | +Constant Field | +Value | +
|---|---|---|
+
+ public static final java.lang.String |
+ BOOLEAN_RANGE |
+ "booleanRange" |
+
+
+ public static final java.lang.String |
+ DECIMAL_PLACES |
+ "decimalPlaces" |
+
+
+ public static final java.lang.String |
+ DEFAULT |
+ "default" |
+
+
+ public static final java.lang.String |
+ DESCRIPTION
+ |
+ "description" |
+
+
+ public static final java.lang.String |
+ DISPLAY_NAME
+ |
+ "displayName" |
+
+
+ public static final java.lang.String |
+ EDITOR |
+ "editor" |
+
+
+ public static final java.lang.String |
+ ENUM_RANGE |
+ "enumRange" |
+
+
+ public static final java.lang.String |
+ MAX_VALUE |
+ "maxValue" |
+
+
+ public static final java.lang.String |
+ MIN_VALUE |
+ "minValue" |
+
+
+ public static final java.lang.String |
+ NAME |
+ "name" |
+
+
+ public static final java.lang.String |
+ PLACEHOLDER
+ |
+ "placeholder" |
+
+
+ public static final java.lang.String |
+ TYPE |
+ "type" |
+
+
+ public static final java.lang.String |
+ UNIT |
+ "unit" |
+
| Modifier and Type | +Constant Field | +Value | +
|---|---|---|
+
+ public static final int |
+ CONFIG_FAULT
+ |
+ 2048 |
+
+
+ public static final java.lang.String |
+ CONFIG_FAULT_STR
+ |
+ "configFault" |
+
+
+ public static final int |
+ DISABLED |
+ 4096 |
+
+
+ public static final java.lang.String |
+ DISABLED_STR
+ |
+ "disabled" |
+
+
+ public static final int |
+ DOWN |
+ 512 |
+
+
+ public static final java.lang.String |
+ DOWN_STR |
+ "down" |
+
+
+ public static final int |
+ FAULT |
+ 1024 |
+
+
+ public static final java.lang.String |
+ FAULT_STR |
+ "fault" |
+
+
+ public static final int |
+ OK |
+ 0 |
+
+
+ public static final int |
+ OK_OVERRIDE |
+ 1 |
+
+
+ public static final java.lang.String |
+ OK_OVERRIDE_STR |
+ "override" |
+
+
+ public static final int |
+ OK_REMOTE_OVERRIDE
+ |
+ 2 |
+
+
+ public static final java.lang.String |
+ OK_REMOTE_OVERRIDE_STR
+ |
+ "remoteOverride" |
+
+
+ public static final java.lang.String |
+ OK_STR |
+ "ok" |
+
+
+ public static final int |
+ REMOTE_CONFIG_FAULT
+ |
+ 524288 |
+
+
+ public static final java.lang.String |
+ REMOTE_CONFIG_FAULT_STR
+ |
+ "remoteConfigFault" |
+
+
+ public static final int |
+ REMOTE_DISABLED |
+ 1048576 |
+
+
+ public static final java.lang.String |
+ REMOTE_DISABLED_STR
+ |
+ "remoteDisabled" |
+
+
+ public static final int |
+ REMOTE_DOWN |
+ 131072 |
+
+
+ public static final java.lang.String |
+ REMOTE_DOWN_STR |
+ "remoteDown" |
+
+
+ public static final int |
+ REMOTE_FAULT
+ |
+ 262144 |
+
+
+ public static final java.lang.String |
+ REMOTE_FAULT_STR
+ |
+ "remoteFault" |
+
+
+ public static final int |
+ REMOTE_STALE
+ |
+ 65536 |
+
+
+ public static final java.lang.String |
+ REMOTE_STALE_STR
+ |
+ "remoteStale" |
+
+
+ public static final int |
+ REMOTE_UNKNOWN |
+ 2097152 |
+
+
+ public static final java.lang.String |
+ REMOTE_UNKNOWN_STR
+ |
+ "remoteUnknown" |
+
+
+ public static final int |
+ STALE |
+ 256 |
+
+
+ public static final java.lang.String |
+ STALE_STR |
+ "stale" |
+
+
+ public static final int |
+ UNKNOWN |
+ 8192 |
+
+
+ public static final java.lang.String |
+ UNKNOWN_STR |
+ "unknown" |
+
| Modifier and Type | +Constant Field | +Value | +
|---|---|---|
+
+ public static final int |
+ MILLIS_DAY |
+ 86400000 |
+
+
+ public static final int |
+ MILLIS_FIFTEEN_MINUTES
+ |
+ 900000 |
+
+
+ public static final int |
+ MILLIS_FIFTEEN_SECONDS
+ |
+ 15000 |
+
+
+ public static final int |
+ MILLIS_FIVE_MINUTES
+ |
+ 300000 |
+
+
+ public static final int |
+ MILLIS_FIVE_SECONDS
+ |
+ 5000 |
+
+
+ public static final int |
+ MILLIS_FOUR_HOURS
+ |
+ 14400000 |
+
+
+ public static final int |
+ MILLIS_HOUR |
+ 3600000 |
+
+
+ public static final int |
+ MILLIS_MINUTE
+ |
+ 60000 |
+
+
+ public static final long |
+ MILLIS_MONTH |
+ 2592000000L |
+
+
+ public static final long |
+ MILLIS_QUARTER
+ |
+ 7776000000L |
+
+
+ public static final int |
+ MILLIS_SECOND
+ |
+ 1000 |
+
+
+ public static final int |
+ MILLIS_SIX_HOURS |
+ 21600000 |
+
+
+ public static final int |
+ MILLIS_TEN_MINUTES
+ |
+ 600000 |
+
+
+ public static final int |
+ MILLIS_TEN_SECONDS
+ |
+ 10000 |
+
+
+ public static final int |
+ MILLIS_THIRTY_MINUTES
+ |
+ 1800000 |
+
+
+ public static final int |
+ MILLIS_THIRTY_SECONDS
+ |
+ 30000 |
+
+
+ public static final int |
+ MILLIS_THREE_HOURS
+ |
+ 10800000 |
+
+
+ public static final int |
+ MILLIS_TWELVE_HOURS
+ |
+ 43200000 |
+
+
+ public static final int |
+ MILLIS_TWENTY_MINUTES
+ |
+ 1200000 |
+
+
+ public static final int |
+ MILLIS_TWO_HOURS |
+ 7200000 |
+
+
+ public static final int |
+ MILLIS_WEEK |
+ 604800000 |
+
+
+ public static final long |
+ MILLIS_YEAR |
+ 31104000000L |
+
+
+ public static final long |
+ NANOS_IN_MS |
+ 1000000L |
+
+
+ public static final long |
+ NANOS_IN_SEC |
+ 1000000000L |
+
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
-Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
-Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
-Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
-Each annotation type has its own separate page with the following sections:
-Each enum has its own separate page with the following sections:
-There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
-The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
-These links take you to the next or previous class, interface, package, or related page.
-These links show and hide the HTML frames. All pages are available with or without frames.
-The All Classes link shows all classes and interfaces except non-static nested types.
-Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
-The Constant Field Values page lists the static final fields and their values.
-The Overview page is the front page of this API + document and provides a list of all packages with a summary for each. This page can also + contain an overall description of the set of packages.
+Each package has a page that contains a list of its classes and interfaces, with a summary + for each. This page can contain six categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of + these pages has three sections consisting of a class/interface description, summary tables, + and detailed member descriptions:
+Each summary entry contains the first sentence from the detailed description for that item. + The summary entries are alphabetical, while the detailed descriptions are in the order they + appear in the source code. This preserves the logical groupings established by the + programmer.
+Each annotation type has its own separate page with the following sections:
+Each enum has its own separate page with the following sections:
+There is a Class Hierarchy page for all packages, plus a
+ hierarchy for each package. Each hierarchy page contains a list of classes and a list of
+ interfaces. The classes are organized by inheritance structure starting with java.lang.Object.
+ The interfaces do not inherit from java.lang.Object.
The Deprecated API page lists all of the API that have + been deprecated. A deprecated API is not recommended for use, generally due to improvements, + and a replacement API is usually given. Deprecated APIs may be removed in future + implementations.
+The Index contains an alphabetic list of all classes, + interfaces, constructors, methods, and fields.
+These links take you to the next or previous class, interface, package, or related + page.
+These links show and hide the HTML frames. All pages are available with or without + frames.
+The All Classes link shows all classes and interfaces + except non-static nested types.
+Each serializable or externalizable class has a description of its serialization fields and + methods. This information is of interest to re-implementors, not to developers using the + API. While there is no link in the navigation bar, you can get to this information by going + to any serialized class and clicking "Serialized Form" in the "See also" section of the + class description.
+The Constant Field Values page lists the static final + fields and their values.
+public static class DSRuntime.Timer
+ public static class DSRuntime.Timer
extends java.lang.Object
implements java.lang.Runnable
-| Modifier and Type | -Method and Description | -
|---|---|
void |
-cancel()
-Cancel execution, will not impact current running tasks and will have no effect if
- already cancelled.
- |
-
long |
-getInterval()
-The interval between runs, zero or less for no interval.
- |
-
java.lang.Runnable |
-getRunnable()
-The runnable being managed by this timer.
- |
-
boolean |
-isCancelled() |
-
boolean |
-isFinished()
-True if cancelled or was a one time execution and that has finished.
- |
-
boolean |
-isRunning()
-True when the runnable is being actually being executed.
- |
-
long |
-lastRun()
-The lastRun run or -1 if it hasn't run yet.
- |
-
long |
-nextRun()
-The next scheduled time to run.
- |
-
void |
-run()
-Do not call.
- |
-
long |
-runCount()
-The number of completed runs.
- |
-
DSRuntime.Timer |
-setSkipMissedIntervals(boolean skipMissed)
-The default is true, set this to false if all intervals should be run, even if they run
- later than scheduled.
- |
-
java.lang.String |
-toString() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic void cancel()-
public long getInterval()-
public java.lang.Runnable getRunnable()-
public boolean isCancelled()-
public boolean isFinished()-
public boolean isRunning()-
public long lastRun()-
public long nextRun()-
public void run()-
run in interface java.lang.Runnablepublic long runCount()-
public DSRuntime.Timer setSkipMissedIntervals(boolean skipMissed)-
skipMissed - False if intervals should be run after they were scheduled to.public java.lang.String toString()-
toString in class java.lang.Object| Modifier and Type | +Method and Description | +
|---|---|
void |
+ cancel()
+ Cancel execution, will not impact current running tasks and
+ will have no effect if
+ already cancelled.
+
+ |
+
long |
+ getInterval()
+ The interval between runs, zero or less for no interval.
+ |
+
java.lang.Runnable |
+ getRunnable()
+ The runnable being managed by this timer.
+ |
+
boolean |
+ isCancelled()
+ |
+
boolean |
+ isFinished()
+ True if cancelled or was a one time execution and that has
+ finished.
+
+ |
+
boolean |
+ isRunning()
+ True when the runnable is being actually being executed.
+ |
+
long |
+ lastRun()
+ The lastRun run or -1 if it hasn't run yet.
+ |
+
long |
+ nextRun()
+ The next scheduled time to run.
+ |
+
void |
+ run()
+ Do not call.
+ |
+
long |
+ runCount()
+ The number of completed runs.
+ |
+
DSRuntime.Timer
+ |
+ setSkipMissedIntervals(boolean skipMissed)
+ The default is true, set this to false if all intervals should
+ be run, even if they run
+ later than scheduled.
+
+ |
+
java.lang.String |
+ toString()
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait,
+ waitpublic void cancel()+
public long getInterval()+
public java.lang.Runnable getRunnable()+
public boolean isCancelled()+
public boolean isFinished()+
public boolean isRunning()+
public long lastRun()+
public long nextRun()+
public void run()+
run in interface java.lang.Runnablepublic long runCount()+
public DSRuntime.Timer setSkipMissedIntervals(boolean skipMissed)+
skipMissed - False if intervals should be run after they were
+ scheduled to.
+ public java.lang.String toString()+
toString in class java.lang.Objectpublic class DSRuntime
+ public class DSRuntime
extends java.lang.Object
-| Modifier and Type | -Class and Description | -
|---|---|
static class |
-DSRuntime.Timer
-Can be used to inspect and cancel tasks passed to the run methods in DSRuntime.
- |
-
| Modifier and Type | -Method and Description | -
|---|---|
static void |
-run(java.lang.Runnable arg)
-Run as soon as possible on the application's thread pool and run only once.
- |
-
static DSRuntime.Timer |
-run(java.lang.Runnable arg,
- long start,
- long interval)
-Run periodically starting at the given time and repeat at the given millisecond interval.
- |
-
static DSRuntime.Timer |
-runAt(java.lang.Runnable arg,
- long at)
-Run once at the given time.
- |
-
static DSRuntime.Timer |
-runDelayed(java.lang.Runnable arg,
- long delayMillis)
-Run once after the given delay.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static void run(java.lang.Runnable arg)-
public static DSRuntime.Timer run(java.lang.Runnable arg, +DSA thread pool and timers.+
| Modifier and Type | +Class and Description | +
|---|---|
static class |
+ DSRuntime.Timer
+ Can be used to inspect and cancel tasks passed to the run
+ methods in DSRuntime.
+
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
static void |
+ run(java.lang.Runnable arg)
+ Run as soon as possible on the application's thread pool and
+ run only once.
+
+ |
+
static DSRuntime.Timer
+ |
+ run(java.lang.Runnable arg,
+ long start,
+ long interval)
+ Run periodically starting at the given time and repeat at the
+ given millisecond interval.
+
+ |
+
static DSRuntime.Timer
+ |
+ runAt(java.lang.Runnable arg,
+ long at)
+ Run once at the given time.
+ |
+
static DSRuntime.Timer
+ |
+ runDelayed(java.lang.Runnable arg,
+ long delayMillis)
+ Run once after the given delay.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
+ wait, wait, waitpublic static void run(java.lang.Runnable arg)+
public static DSRuntime.Timer run(java.lang.Runnable arg, long start, long interval)-
arg - What to runAt.start - First absolute execution time, or if less or equal to 0, start immediately.interval - The millisecond interval at which to run.public static DSRuntime.Timer runAt(java.lang.Runnable arg, +Run periodically starting at the given time and repeat at the + given millisecond interval. ++
arg - What to runAt.start - First absolute execution time, or if less or equal to 0,
+ start immediately.
+ interval - The millisecond interval at which to run.public static DSRuntime.Timer runAt(java.lang.Runnable arg, long at)-
arg - What to runAt.at - Execution time. If the time is past, it'll run right away.public static DSRuntime.Timer runDelayed(java.lang.Runnable arg, +Run once at the given time.+
arg - What to runAt.at - Execution time. If the time is past, it'll run right away.
+ public static DSRuntime.Timer runDelayed(java.lang.Runnable arg, long delayMillis)-
arg - What to runAt.delayMillis - The number of millis to wait before running.arg - What to runAt.delayMillis - The number of millis to wait before running.public abstract class AbstractReader
+ public abstract class AbstractReader extends java.lang.Object implements DSIReader-
DSIReader.Token| Modifier and Type | -Field and Description | -
|---|---|
protected boolean |
-valBoolean |
-
protected byte[] |
-valBytes |
-
protected long |
-valLong |
-
protected double |
-valReal |
-
protected java.lang.String |
-valString |
-
| Constructor and Description | -
|---|
AbstractReader() |
-
| Modifier and Type | -Method and Description | -
|---|---|
boolean |
-getBoolean()
-Returns the value when last() == BOOLEAN.
- |
-
byte[] |
-getBytes()
-Returns the value when last() == BYTES.
- |
-
double |
-getDouble()
-Returns the value when last() == DOUBLE.
- |
-
DSElement |
-getElement()
-Returns the DSElement when last() == raw type or ROOT.
- |
-
DSList |
-getList()
-This should only be called when last() == BEGIN_LIST and it will decodeKeys the entire
- list.
- |
-
long |
-getLong()
-Returns the value when last() == LONG.
- |
-
DSMap |
-getMap()
-This should only be called when last() == BEGIN_MAP and it will decodeKeys the entire map.
- |
-
java.lang.String |
-getString()
-Returns the value when last() == STRING.
- |
-
DSIReader.Token |
-last()
-The last value returned from next().
- |
-
abstract DSIReader.Token |
-next()
-Subclasses must override this, read the next item from the stream, then call one of the
- setXxx methods.
- |
-
AbstractReader |
-reset()
-Sets last() == ROOT.
- |
-
protected DSIReader.Token |
-setBeginList() |
-
protected DSIReader.Token |
-setBeginMap() |
-
protected DSIReader.Token |
-setEndInput() |
-
protected DSIReader.Token |
-setEndList() |
-
protected DSIReader.Token |
-setEndMap() |
-
protected DSIReader.Token |
-setNextValue(boolean arg) |
-
protected DSIReader.Token |
-setNextValue(byte[] arg) |
-
protected DSIReader.Token |
-setNextValue(double arg) |
-
protected DSIReader.Token |
-setNextValue(long arg) |
-
protected DSIReader.Token |
-setNextValue(java.lang.String arg) |
-
protected DSIReader.Token |
-setNextValueNull() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected boolean valBoolean-
protected byte[] valBytes-
protected double valReal-
protected long valLong-
protected java.lang.String valString-
public boolean getBoolean()-
DSIReadergetBoolean in interface DSIReaderpublic byte[] getBytes()-
DSIReaderpublic double getDouble()-
DSIReaderpublic DSElement getElement()-
DSIReadergetElement in interface DSIReaderpublic DSList getList()-
DSIReaderpublic long getLong()-
DSIReaderpublic DSMap getMap()-
DSIReaderpublic java.lang.String getString()-
DSIReaderpublic DSIReader.Token last()-
DSIReaderpublic abstract DSIReader.Token next()-
DSIReader.Token| Modifier and Type | +Field and Description | +
|---|---|
protected boolean |
+ valBoolean
+ |
+
protected byte[] |
+ valBytes
+ |
+
protected long |
+ valLong
+ |
+
protected double |
+ valReal
+ |
+
protected java.lang.String |
+ valString
+ |
+
| Constructor and Description | +
|---|
AbstractReader()
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
boolean |
+ getBoolean()
+ Returns the value when last() == BOOLEAN.
+ |
+
byte[] |
+ getBytes()
+ Returns the value when last() == BYTES.
+ |
+
double |
+ getDouble()
+ Returns the value when last() == DOUBLE.
+ |
+
DSElement
+ |
+ getElement()
+ Returns the DSElement when last() == raw type or ROOT.
+ |
+
DSList
+ |
+ getList()
+ This should only be called when last() == BEGIN_LIST and it
+ will decodeKeys the entire
+ list.
+
+ |
+
long |
+ getLong()
+ Returns the value when last() == LONG.
+ |
+
DSMap
+ |
+ getMap()
+ This should only be called when last() == BEGIN_MAP and it will
+ decodeKeys the entire map.
+
+ |
+
java.lang.String |
+ getString()
+ Returns the value when last() == STRING.
+ |
+
DSIReader.Token
+ |
+ last()
+ The last value returned from next().
+ |
+
abstract DSIReader.Token |
+ next()
+ Subclasses must override this, read the next item from the
+ stream, then call one of the
+ setXxx methods.
+
+ |
+
AbstractReader
+ |
+ reset()
+ Sets last() == ROOT.
+ |
+
protected DSIReader.Token |
+ setBeginList()
+ |
+
protected DSIReader.Token |
+ setBeginMap()
+ |
+
protected DSIReader.Token |
+ setEndInput()
+ |
+
protected DSIReader.Token |
+ setEndList()
+ |
+
protected DSIReader.Token |
+ setEndMap()
+ |
+
protected DSIReader.Token |
+ setNextValue(boolean arg)
+ |
+
protected DSIReader.Token |
+ setNextValue(byte[] arg)
+ |
+
protected DSIReader.Token |
+ setNextValue(double arg)
+ |
+
protected DSIReader.Token |
+ setNextValue(long arg)
+ |
+
protected DSIReader.Token |
+ setNextValue(java.lang.String arg)
+ |
+
protected DSIReader.Token |
+ setNextValueNull()
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
+ wait, wait, waitprotected boolean valBoolean+
protected byte[] valBytes+
protected double valReal+
protected long valLong+
protected java.lang.String valString+
public boolean getBoolean()+
DSIReader
+ getBoolean in
+ interface DSIReader
+ public byte[] getBytes()+
DSIReader
+ public double getDouble()+
DSIReader
+ public DSElement getElement()+
DSIReader
+ getElement in
+ interface DSIReader
+ public DSList getList()+
DSIReader
+ public long getLong()+
DSIReader
+ public DSMap getMap()+
DSIReader
+ public java.lang.String getString()+
DSIReader
+ public DSIReader.Token last()+
DSIReader
+ public abstract DSIReader.Token next()+
+
- Advances the reader to the next item and returns the token representing it's current state.
protected DSIReader.Token setBeginList()-
protected DSIReader.Token setBeginMap()-
protected DSIReader.Token setEndList()-
protected DSIReader.Token setEndMap()-
protected DSIReader.Token setEndInput()-
protected DSIReader.Token setNextValue(boolean arg)-
protected DSIReader.Token setNextValue(byte[] arg)-
protected DSIReader.Token setNextValue(double arg)-
protected DSIReader.Token setNextValue(long arg)-
protected DSIReader.Token setNextValue(java.lang.String arg)-
protected DSIReader.Token setNextValueNull()-
public AbstractReader reset()-
DSIReaderprotected DSIReader.Token setBeginList()+
protected DSIReader.Token setBeginMap()+
protected DSIReader.Token setEndList()+
protected DSIReader.Token setEndMap()+
protected DSIReader.Token setEndInput()+
protected DSIReader.Token setNextValue(boolean arg)+
protected DSIReader.Token setNextValue(byte[] arg)+
protected DSIReader.Token setNextValue(double arg)+
protected DSIReader.Token setNextValue(long arg)+
protected DSIReader.Token setNextValue(java.lang.String arg)+
protected DSIReader.Token setNextValueNull()+
public AbstractReader reset()+
DSIReader
+ public abstract class AbstractWriter
+ public abstract class AbstractWriter extends java.lang.Object -implements java.io.Closeable, DSIWriter-
DSIWriter| Modifier and Type | -Field and Description | -
|---|---|
protected boolean |
-prettyPrint
-Subclasses can use this if applicable.
- |
-
| Constructor and Description | -
|---|
AbstractWriter() |
-
| Modifier and Type | -Method and Description | -
|---|---|
AbstractWriter |
-beginList()
-Start a new list and return this.
- |
-
AbstractWriter |
-beginList(int size)
-Start a new list of the given size and return this.
- |
-
AbstractWriter |
-beginMap()
-Start a new map and return this.
- |
-
AbstractWriter |
-beginMap(int size)
-Start a new map of the given size and return this.
- |
-
AbstractWriter |
-endList()
-End the current list.
- |
-
AbstractWriter |
-endMap()
-End the current map.
- |
-
protected int |
-getDepth()
-Current depth in the tree, will be needed by writeNewLineIndent.
- |
-
AbstractWriter |
-key(java.lang.CharSequence arg)
-Write a key in the current map.
- |
-
int |
-length()
-Returns 0 by default.
- |
-
AbstractWriter |
-reset()
-Clears the state of the writer.
- |
-
AbstractWriter |
-value(boolean arg)
-Write a value to the map or list.
- |
-
AbstractWriter |
-value(byte[] arg)
-Write a value to the map or list.
- |
-
AbstractWriter |
-value(double arg)
-Write a value to the map or list.
- |
-
AbstractWriter |
-value(DSElement arg)
-Write a value to the map or list.
- |
-
AbstractWriter |
-value(int arg)
-Write a value to the map or list.
- |
-
AbstractWriter |
-value(long arg)
-Write a value to the map or list.
- |
-
AbstractWriter |
-value(java.lang.String arg)
-Write a value to the map or list.
- |
-
protected abstract void |
-write(boolean arg)
-Write the value.
- |
-
protected abstract void |
-write(byte[] arg)
-Write the value.
- |
-
protected abstract void |
-write(double arg)
-Write the value.
- |
-
protected abstract void |
-write(long arg)
-Write the value.
- |
-
protected abstract void |
-writeKey(java.lang.CharSequence arg)
-Write string key of a map entry.
- |
-
protected abstract void |
-writeKeyValueSeparator()
-Separate the key from the value in a map.
- |
-
protected abstract void |
-writeListEnd()
-End the current list.
- |
-
protected abstract void |
-writeListStart(int size)
-Start a new list.
- |
-
protected abstract void |
-writeMapEnd()
-End the current map.
- |
-
protected abstract void |
-writeMapStart(int size)
-Start a new map.
- |
-
protected void |
-writeNewLineIndent()
-Override point for subclasses which perform use pretty printing, such as json.
- |
-
protected abstract void |
-writeNull()
-Write a null value.
- |
-
protected abstract void |
-writeSeparator()
-Write a value separator, such as the comma in json.
- |
-
protected abstract void |
-writeValue(java.lang.CharSequence arg)
-Write the value, which will never be null.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected boolean prettyPrint-
public AbstractWriter beginList()-
DSIWriterpublic AbstractWriter beginList(int size)-
DSIWriterpublic AbstractWriter beginMap()-
DSIWriterpublic AbstractWriter beginMap(int size)-
DSIWriterpublic AbstractWriter endList()-
DSIWriterpublic AbstractWriter endMap()-
DSIWriterprotected int getDepth()-
public AbstractWriter key(java.lang.CharSequence arg)-
DSIWriterpublic int length()-
public AbstractWriter reset()-
DSIWriterpublic AbstractWriter value(DSElement arg)-
DSIWriterpublic AbstractWriter value(boolean arg)-
DSIWriterpublic AbstractWriter value(byte[] arg)-
DSIWriterpublic AbstractWriter value(double arg)-
DSIWriterpublic AbstractWriter value(int arg)-
DSIWriterpublic AbstractWriter value(long arg)-
DSIWriterpublic AbstractWriter value(java.lang.String arg)-
DSIWriter| Modifier and Type | +Field and Description | +
|---|---|
protected boolean |
+ prettyPrint
+ Subclasses can use this if applicable.
+ |
+
| Constructor and Description | +
|---|
AbstractWriter()
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
AbstractWriter
+ |
+ beginList()
+ Start a new list and return this.
+ |
+
AbstractWriter
+ |
+ beginList(int size)
+ Start a new list of the given size and return this.
+ |
+
AbstractWriter
+ |
+ beginMap()
+ Start a new map and return this.
+ |
+
AbstractWriter
+ |
+ beginMap(int size)
+ Start a new map of the given size and return this.
+ |
+
AbstractWriter
+ |
+ endList()
+ End the current list.
+ |
+
AbstractWriter
+ |
+ endMap()
+ End the current map.
+ |
+
protected int |
+ getDepth()
+ Current depth in the tree, will be needed by
+ writeNewLineIndent.
+
+ |
+
AbstractWriter
+ |
+ key(java.lang.CharSequence arg)
+ Write a key in the current map.
+ |
+
int |
+ length()
+ Returns 0 by default.
+ |
+
AbstractWriter
+ |
+ reset()
+ Clears the state of the writer.
+ |
+
AbstractWriter
+ |
+ value(boolean arg)
+ Write a value to the map or list.
+ |
+
AbstractWriter
+ |
+ value(byte[] arg)
+ Write a value to the map or list.
+ |
+
AbstractWriter
+ |
+ value(double arg)
+ Write a value to the map or list.
+ |
+
AbstractWriter
+ |
+ value(DSElement arg)
+ Write a value to the map or list.
+ |
+
AbstractWriter
+ |
+ value(int arg)
+ Write a value to the map or list.
+ |
+
AbstractWriter
+ |
+ value(long arg)
+ Write a value to the map or list.
+ |
+
AbstractWriter
+ |
+ value(java.lang.String arg)
+ Write a value to the map or list.
+ |
+
protected abstract void |
+ write(boolean arg)
+ Write the value.
+ |
+
protected abstract void |
+ write(byte[] arg)
+ Write the value.
+ |
+
protected abstract void |
+ write(double arg)
+ Write the value.
+ |
+
protected abstract void |
+ write(long arg)
+ Write the value.
+ |
+
protected abstract void |
+ writeKey(java.lang.CharSequence arg)
+ Write string key of a map entry.
+ |
+
protected abstract void |
+ writeKeyValueSeparator()
+ Separate the key from the value in a map.
+ |
+
protected abstract void |
+ writeListEnd()
+ End the current list.
+ |
+
protected abstract void |
+ writeListStart(int size)
+ Start a new list.
+ |
+
protected abstract void |
+ writeMapEnd()
+ End the current map.
+ |
+
protected abstract void |
+ writeMapStart(int size)
+ Start a new map.
+ |
+
protected void |
+ writeNewLineIndent()
+ Override point for subclasses which perform use pretty
+ printing, such as json.
+
+ |
+
protected abstract void |
+ writeNull()
+ Write a null value.
+ |
+
protected abstract void |
+ writeSeparator()
+ Write a value separator, such as the comma in json.
+ |
+
protected abstract void |
+ writeValue(java.lang.CharSequence arg)
+ Write the value, which will never be null.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
+ wait, wait, waitprotected boolean prettyPrint+
public AbstractWriter beginList()+
DSIWriter
+ public AbstractWriter beginList(int size)+
DSIWriter
+ public AbstractWriter beginMap()+
DSIWriter
+ public AbstractWriter beginMap(int size)+
DSIWriter
+ public AbstractWriter endList()+
DSIWriter
+ public AbstractWriter endMap()+
DSIWriter
+ protected int getDepth()+
public AbstractWriter key(java.lang.CharSequence arg)+
DSIWriter
+ public int length()+
public AbstractWriter reset()+
DSIWriter
+ public AbstractWriter value(DSElement arg)+
DSIWriter
+ public AbstractWriter value(boolean arg)+
DSIWriter
+ public AbstractWriter value(byte[] arg)+
DSIWriter
+ public AbstractWriter value(double arg)+
DSIWriter
+ public AbstractWriter value(int arg)+
DSIWriter
+ public AbstractWriter value(long arg)+
DSIWriter
+ public AbstractWriter value(java.lang.String arg)+
DSIWriter
+ protected abstract void write(boolean arg)
throws java.io.IOException
-java.io.IOExceptionprotected abstract void write(byte[] arg) +Write the value.+
java.io.IOExceptionprotected abstract void write(byte[] arg)
throws java.io.IOException
-java.io.IOExceptionprotected abstract void write(double arg) +Write the value.+
java.io.IOExceptionprotected abstract void write(double arg)
throws java.io.IOException
-java.io.IOExceptionprotected abstract void write(long arg) +Write the value.+
java.io.IOExceptionprotected abstract void write(long arg)
throws java.io.IOException
-java.io.IOExceptionprotected abstract void writeKey(java.lang.CharSequence arg) +Write the value.+
java.io.IOExceptionprotected abstract void writeKey(java.lang.CharSequence arg)
throws java.io.IOException
-java.io.IOExceptionprotected abstract void writeKeyValueSeparator() +Write string key of a map entry.+
java.io.IOExceptionprotected abstract void writeKeyValueSeparator()
throws java.io.IOException
-java.io.IOExceptionprotected abstract void writeListEnd() +Separate the key from the value in a map.+
java.io.IOExceptionprotected abstract void writeListEnd()
throws java.io.IOException
-java.io.IOExceptionprotected abstract void writeListStart(int size) +End the current list.+
java.io.IOExceptionprotected abstract void writeListStart(int size)
throws java.io.IOException
-java.io.IOExceptionprotected abstract void writeMapEnd() +Start a new list.+
java.io.IOExceptionprotected abstract void writeMapEnd()
throws java.io.IOException
-java.io.IOExceptionprotected abstract void writeMapStart(int size) +End the current map.+
java.io.IOExceptionprotected abstract void writeMapStart(int size)
throws java.io.IOException
-java.io.IOExceptionprotected void writeNewLineIndent() +Start a new map.+
java.io.IOExceptionprotected void writeNewLineIndent()
throws java.io.IOException
-java.io.IOExceptiongetDepth()protected abstract void writeNull() +Override point for subclasses which perform use pretty printing, + such as json. Does nothing + by default. ++
java.io.IOExceptiongetDepth()
+ protected abstract void writeNull()
throws java.io.IOException
-java.io.IOExceptionprotected abstract void writeSeparator() +Write a null value.+
java.io.IOExceptionprotected abstract void writeSeparator()
throws java.io.IOException
-java.io.IOExceptionprotected abstract void writeValue(java.lang.CharSequence arg) +Write a value separator, such as the comma in json.+
java.io.IOExceptionprotected abstract void writeValue(java.lang.CharSequence arg)
throws java.io.IOException
-java.io.IOExceptionjava.io.IOExceptionpublic class DSBase64
+ public class DSBase64
extends java.lang.Object
-| Modifier and Type | -Method and Description | -
|---|---|
static byte[] |
-decode(java.lang.String str)
-Decodes a base 64 encoded string.
- |
-
static java.lang.String |
-encode(byte[] buf)
-Encodes the bytes into a single line string with no padding.
- |
-
static java.lang.String |
-encode(byte[] buf,
- int linelen)
-Encodes the buffer into a String with the given line length.
- |
-
static java.lang.String |
-encodeUrl(byte[] bytes)
-Encodes to a URL safe base64 string.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static byte[] decode(java.lang.String str)-
str - Most not be null.java.lang.IllegalArgumentException - If anything is wrong with the parameter.public static java.lang.String encode(byte[] buf)-
buf - The bytes to encode.public static java.lang.String encode(byte[] buf, +Thread-safe Base64 encoder and decoder. This only exists because we need + to be compatible with + Java 6. ++
| Constructor and Description | +
|---|
DSBase64()
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
static byte[] |
+ decode(java.lang.String str)
+ Decodes a base 64 encoded string.
+ |
+
static java.lang.String |
+ encode(byte[] buf)
+ Encodes the bytes into a single line string with no padding.
+
+ |
+
static java.lang.String |
+ encode(byte[] buf,
+ int linelen)
+ Encodes the buffer into a String with the given line length.
+
+ |
+
static java.lang.String |
+ encodeUrl(byte[] bytes)
+ Encodes to a URL safe base64 string.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
+ wait, wait, waitpublic static byte[] decode(java.lang.String str)+
str - Most not be null.java.lang.IllegalArgumentException - If anything is wrong with
+ the parameter.
+ public static java.lang.String encode(byte[] buf)+
buf - The bytes to encode.public static java.lang.String encode(byte[] buf,
int linelen)
-buf - The bytes to encode.linelen - A number greater than zero limits the number of characters before an
- interleaving newline.public static java.lang.String encodeUrl(byte[] bytes)-
buf - The bytes to encode.linelen - A number greater than zero limits the number of
+ characters before an
+ interleaving newline.
+ public static java.lang.String encodeUrl(byte[] bytes)+
public static enum DSIReader.Token -extends java.lang.Enum<DSIReader.Token>-
| Enum Constant and Description | -
|---|
BEGIN_LIST |
-
BEGIN_MAP |
-
BOOLEAN |
-
BYTES |
-
DOUBLE |
-
END_INPUT |
-
END_LIST |
-
END_MAP |
-
LONG |
-
NULL |
-
ROOT |
-
STRING |
-
| Modifier and Type | -Method and Description | -
|---|---|
static DSIReader.Token |
-valueOf(java.lang.String name)
-Returns the enum constant of this type with the specified name.
- |
-
static DSIReader.Token[] |
-values()
-Returns an array containing the constants of this enum type, in
-the order they are declared.
- |
-
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfgetClass, notify, notifyAll, wait, wait, waitpublic static final DSIReader.Token BEGIN_LIST-
public static final DSIReader.Token BEGIN_MAP-
public static final DSIReader.Token BOOLEAN-
public static final DSIReader.Token BYTES-
public static final DSIReader.Token END_INPUT-
public static final DSIReader.Token END_LIST-
public static final DSIReader.Token END_MAP-
public static final DSIReader.Token DOUBLE-
public static final DSIReader.Token LONG-
public static final DSIReader.Token NULL-
public static final DSIReader.Token ROOT-
public static final DSIReader.Token STRING-
public static DSIReader.Token[] values()-
+
public static enum DSIReader.Token +extends java.lang.Enum<DSIReader.Token>+
| Enum Constant and Description | +
|---|
BEGIN_LIST
+ |
+
BEGIN_MAP
+ |
+
BOOLEAN
+ |
+
BYTES
+ |
+
DOUBLE
+ |
+
END_INPUT
+ |
+
END_LIST
+ |
+
END_MAP
+ |
+
LONG
+ |
+
NULL
+ |
+
ROOT
+ |
+
STRING
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
static DSIReader.Token |
+ valueOf(java.lang.String name)
+ Returns the enum constant of this type with the specified
+ name.
+
+ |
+
static DSIReader.Token[] |
+ values()
+ Returns an array containing the constants of this enum type, in
+ the order they are declared.
+
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name,
+ ordinal, toString, valueOfgetClass, notify, notifyAll, wait, wait, waitpublic static final DSIReader.Token BEGIN_LIST+
public static final DSIReader.Token BEGIN_MAP+
public static final DSIReader.Token BOOLEAN+
public static final DSIReader.Token BYTES+
public static final DSIReader.Token END_INPUT+
public static final DSIReader.Token END_LIST+
public static final DSIReader.Token END_MAP+
public static final DSIReader.Token DOUBLE+
public static final DSIReader.Token LONG+
public static final DSIReader.Token NULL+
public static final DSIReader.Token ROOT+
public static final DSIReader.Token STRING+
public static DSIReader.Token[] values()+
for (DSIReader.Token c : DSIReader.Token.values()) System.out.println(c); -
public static DSIReader.Token valueOf(java.lang.String name)-
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static DSIReader.Token valueOf(java.lang.String name)+
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no
+ constant with the specified name
+ java.lang.NullPointerException - if the argument is nullpublic interface DSIReader ++++
- +
+
+- All Superinterfaces:
+- java.lang.AutoCloseable, java.io.Closeable
++
+- All Known Implementing Classes:
+- AbstractReader, JsonReader, MsgpackReader
+
+
+public interface DSIReader extends java.io.Closeable-A decoder that can be used to get an entire graph in pieces, or one large group, or somewhere in - between. To get an entire graph, call getElement(), getMap() or getList(). Otherwise, use the - next() method to iterate the elements of the input. +-A decoder that can be used to get an entire graph in pieces, or one large + group, or somewhere in + between. To get an entire graph, call getElement(), getMap() or getList(). Otherwise, use + the + next() method to iterate the elements of the input. -- - -+
- When next() returns: + When next() returns: -
+
--
+- ROOT - The initial state, not in a list or map, call next() or getElement(). +
- ROOT - The initial state, not in a list or map, call next() or getElement(). -
- BEGIN_LIST - Call getList() to decodeKeys the entire list, or call next again to get the - first element of the list (or END_LIST if empty). +
- BEGIN_LIST - Call getList() to decodeKeys the entire list, or call next again to get + the + first element of the list (or END_LIST if empty). -
- BEGIN_MAP - Call getMap() to decodeKeys the entire map, or call next again to get the first - key of the map (or END_MAP if empty). +
- BEGIN_MAP - Call getMap() to decodeKeys the entire map, or call next again to get + the first + key of the map (or END_MAP if empty). -
- END_INPUT - Parsing is finished, close the reader. +
- END_INPUT - Parsing is finished, close the reader. -
- END_LIST - The current list is complete, call next again. +
- END_LIST - The current list is complete, call next again. -
- END_MAP - The current map is complete, call next again. +
- END_MAP - The current map is complete, call next again. -
- BOOLEAN,DOUBLE,LONG,NULL,STRING - Call getElement() or the corresponding getter. +
- BOOLEAN,DOUBLE,LONG,NULL,STRING - Call getElement() or the corresponding getter. -
+
- Be aware that if the underlying encoding (such as JSON) doesn't provide a mechanism to - differentiate between data types (such as numbers), values might not get as the same type they - were encoded.
---
-- - -
--
- -- - - -
-Nested Class Summary
--
-Nested Classes -- -Modifier and Type -Interface and Description -- -- static class- DSIReader.Token-Represents the state of the reader, and determines which getter should be called next.--
-- - - -
-Method Summary
--
-All Methods Instance Methods Abstract Methods -- -Modifier and Type -Method and Description -- -- void- close()-Close the input.-- -- boolean- getBoolean()-Returns the value when last() == BOOLEAN.-- -- byte[]- getBytes()-Returns the value when last() == BYTES.-- -- double- getDouble()-Returns the value when last() == DOUBLE.-- -- DSElement- getElement()-Returns the DSElement when last() == raw type or ROOT.-- -- DSList- getList()-This should only be called when last() == BEGIN_LIST and it will decodeKeys the entire - list.-- -- long- getLong()-Returns the value when last() == LONG.-- -- DSMap- getMap()-This should only be called when last() == BEGIN_MAP and it will decodeKeys the entire map.-- -- java.lang.String- getString()-Returns the value when last() == STRING.-- -- DSIReader.Token- last()-The last value returned from next().-- -- DSIReader.Token- next()-Advances the reader to the next item and returns the token representing it's current state.-- -- DSIReader- reset()-Sets last() == ROOT.--+ Be aware that if the underlying encoding (such as JSON) doesn't provide a mechanism to + differentiate between data types (such as numbers), values might not get as the same + type they + were encoded.-
-- - -
--
-- - - -
-Method Detail
- - - --
- - - -- -
-close
-void close()-Close the input.--
-- Specified by:
-- -
closein interfacejava.lang.AutoCloseable- Specified by:
-- -
closein interfacejava.io.Closeable-
- - - -- -
-getBoolean
-boolean getBoolean()-Returns the value when last() == BOOLEAN.--
- - - -- -
-getBytes
-byte[] getBytes()-Returns the value when last() == BYTES.--
- - - -- -
-getDouble
-double getDouble()-Returns the value when last() == DOUBLE.--
- - - -- -
-getElement
-DSElement getElement()-Returns the DSElement when last() == raw type or ROOT.--
- - - -- -
-getLong
-long getLong()-Returns the value when last() == LONG.--
- - - -- -
-getList
-DSList getList()-This should only be called when last() == BEGIN_LIST and it will decodeKeys the entire - list. Call next rather than this method to get the list in pieces.--
- - - -- -
-getMap
-DSMap getMap()-This should only be called when last() == BEGIN_MAP and it will decodeKeys the entire map. - Call next rather than this method get the map in pieces.--
- - - -- -
-getString
-java.lang.String getString()-Returns the value when last() == STRING.--
- - - -- -
-last
-DSIReader.Token last()-The last value returned from next(). At the beginning of a document, before next has been - called, this will return ROOT.--
- - - -- -
-next
-DSIReader.Token next()-Advances the reader to the next item and returns the token representing it's current state.--
-- -
-reset
-DSIReader reset()-Sets last() == ROOT.-
| Modifier and Type | +Interface and Description | +
|---|---|
static class |
+ DSIReader.Token
+ Represents the state of the reader, and determines which getter
+ should be called next.
+
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
void |
+ close()
+ Close the input.
+ |
+
boolean |
+ getBoolean()
+ Returns the value when last() == BOOLEAN.
+ |
+
byte[] |
+ getBytes()
+ Returns the value when last() == BYTES.
+ |
+
double |
+ getDouble()
+ Returns the value when last() == DOUBLE.
+ |
+
DSElement
+ |
+ getElement()
+ Returns the DSElement when last() == raw type or ROOT.
+ |
+
DSList
+ |
+ getList()
+ This should only be called when last() == BEGIN_LIST and it
+ will decodeKeys the entire
+ list.
+
+ |
+
long |
+ getLong()
+ Returns the value when last() == LONG.
+ |
+
DSMap
+ |
+ getMap()
+ This should only be called when last() == BEGIN_MAP and it will
+ decodeKeys the entire map.
+
+ |
+
java.lang.String |
+ getString()
+ Returns the value when last() == STRING.
+ |
+
DSIReader.Token
+ |
+ last()
+ The last value returned from next().
+ |
+
DSIReader.Token
+ |
+ next()
+ Advances the reader to the next item and returns the token
+ representing it's current state.
+
+ |
+
DSIReader
+ |
+ reset()
+ Sets last() == ROOT.
+ |
+
void close()+
close in interface java.lang.AutoCloseable
+ close in interface java.io.Closeableboolean getBoolean()+
byte[] getBytes()+
double getDouble()+
DSElement getElement()+
long getLong()+
DSList getList()+
DSMap getMap()+
java.lang.String getString()+
DSIReader.Token last()+
DSIReader.Token next()+
DSIReader reset()+
public interface DSIWriter ++++
- +
+
+- All Superinterfaces:
+- java.lang.AutoCloseable, java.io.Closeable
++
+- All Known Implementing Classes:
+- AbstractJsonWriter, AbstractWriter, + JsonAppender, JsonWriter, MsgpackWriter
+
+
+public interface DSIWriter extends java.io.Closeable-An encoder that can be used to encode large graphs with or without object instances. +-An encoder that can be used to encode large graphs with or without object + instances. -- - -+
- To simply encode a DSMap or DSList, use the value(DSElement) method. + To simply encode a DSMap or DSList, use the value(DSElement) method. - For example: + For example: -
+
--
+- new JsonWriter(out).value(myMap).close(); +
- new JsonWriter(out).value(myMap).close(); -
+
- Otherwise, you can stream data struct without using any DSIObject instances: + Otherwise, you can stream data struct without using any DSIObject instances: -
+
--
+- out.newMap().key("a").value(1).key("b").value(2).key("c").value(3).endMap(); +
- out.newMap().key("a").value(1).key("b").value(2).key("c").value(3).endMap(); -
+
- Be aware that if the underlying encoding (such as JSON) doesn't provide a mechanism to - differentiate between data types (such as numbers), values might not get as the same type they - were encoded.
---
-- - -
--
-- - - -
-Method Summary
--
-All Methods Instance Methods Abstract Methods -- -Modifier and Type -Method and Description -- -- DSIWriter- beginList()-Start a new list and return this.-- -- DSIWriter- beginList(int size)-Start a new list of the given size and return this.-- -- DSIWriter- beginMap()-Start a new map and return this.-- -- DSIWriter- beginMap(int size)-Start a new map of the given size and return this.-- -- void- close()-Close the stream.-- -- DSIWriter- endList()-End the current list.-- -- DSIWriter- endMap()-End the current map.-- -- DSIWriter- flush()-Flush the stream.-- -- DSIWriter- key(java.lang.CharSequence key)-Write a key in the current map.-- -- int- length()-If the writer is buffering output, this returns the size of that buffer.-- -- DSIWriter- reset()-Clears the state of the writer.-- -- DSIWriter- value(boolean arg)-Write a value to the map or list.-- -- DSIWriter- value(byte[] arg)-Write a value to the map or list.-- -- DSIWriter- value(double arg)-Write a value to the map or list.-- -- DSIWriter- value(DSElement arg)-Write a value to the map or list.-- -- DSIWriter- value(int arg)-Write a value to the map or list.-- -- DSIWriter- value(long arg)-Write a value to the map or list.-- -- DSIWriter- value(java.lang.String arg)-Write a value to the map or list.--+ Be aware that if the underlying encoding (such as JSON) doesn't provide a mechanism to + differentiate between data types (such as numbers), values might not get as the same + type they + were encoded.-
-- - -
--
-- - - -
-Method Detail
- - - --
- - - -- -
-beginList
-DSIWriter beginList()-Start a new list and return this.--
-- Throws:
-- -
java.lang.IllegalStateException- when improperly called.-
- - - -- -
-beginList
-DSIWriter beginList(int size)-Start a new list of the given size and return this.--
-- Parameters:
-- -
size- Less than zero means the size is unknown.- Throws:
-- -
java.lang.IllegalStateException- when improperly called.-
- - - -- -
-beginMap
-DSIWriter beginMap()-Start a new map and return this.--
-- Throws:
-- -
java.lang.IllegalStateException- when improperly called.-
- - - -- -
-beginMap
-DSIWriter beginMap(int size)-Start a new map of the given size and return this.--
-- Parameters:
-- -
size- Less than zero means the size is unknown.- Throws:
-- -
java.lang.IllegalStateException- when improperly called.-
- - - -- -
-close
-void close()-Close the stream. IOExceptions will be wrapped in runtime exceptions.--
-- Specified by:
-- -
closein interfacejava.lang.AutoCloseable- Specified by:
-- -
closein interfacejava.io.Closeable-
- - - -- -
-endList
-DSIWriter endList()-End the current list.--
-- Throws:
-- -
java.lang.IllegalStateException- when improperly called.-
- - - -- -
-endMap
-DSIWriter endMap()-End the current map.--
-- Throws:
-- -
java.lang.IllegalStateException- when improperly called.-
- - - -- -
-flush
-DSIWriter flush()-Flush the stream. IOExceptions will be wrapped in runtime exceptions.--
- - - -- -
-key
-DSIWriter key(java.lang.CharSequence key)-Write a key in the current map. Cannot be called in a list, must be followed by a call to - one of the value methods.--
-- Throws:
-- -
java.lang.IllegalStateException- when improperly called.-
- - - -- -
-length
-int length()-If the writer is buffering output, this returns the size of that buffer.--
- - - -- -
-reset
-DSIWriter reset()-Clears the state of the writer.--
- - - -- -
-value
-DSIWriter value(DSElement arg)-Write a value to the map or list. If in a map, this must have been preceded by a call to - key(String). This can be used to encode an entire graph.--
-- Throws:
-- -
java.lang.IllegalStateException- when improperly called.-
- - - -- -
-value
-DSIWriter value(boolean arg)-Write a value to the map or list. If in a map, this must have been preceded by a call to - key(String).--
-- Throws:
-- -
java.lang.IllegalStateException- when improperly called.-
- - - -- -
-value
-DSIWriter value(byte[] arg)-Write a value to the map or list. If in a map, this must have been preceded by a call to - key(String).--
-- Throws:
-- -
java.lang.IllegalStateException- when improperly called.-
- - - -- -
-value
-DSIWriter value(double arg)-Write a value to the map or list. If in a map, this must have been preceded by a call to - key(String).--
-- Throws:
-- -
java.lang.IllegalStateException- when improperly called.-
- - - -- -
-value
-DSIWriter value(int arg)-Write a value to the map or list. If in a map, this must have been preceded by a call to - key(String).--
-- Throws:
-- -
java.lang.IllegalStateException- when improperly called.-
- - - -- -
-value
-DSIWriter value(long arg)-Write a value to the map or list. If in a map, this must have been preceded by a call to - key(String).--
-- Throws:
-- -
java.lang.IllegalStateException- when improperly called.-
-- -
-value
-DSIWriter value(java.lang.String arg)-Write a value to the map or list. If in a map, this must have been preceded by a call to - key(String).--
-- Throws:
-- -
java.lang.IllegalStateException- when improperly called.
| Modifier and Type | +Method and Description | +
|---|---|
DSIWriter
+ |
+ beginList()
+ Start a new list and return this.
+ |
+
DSIWriter
+ |
+ beginList(int size)
+ Start a new list of the given size and return this.
+ |
+
DSIWriter
+ |
+ beginMap()
+ Start a new map and return this.
+ |
+
DSIWriter
+ |
+ beginMap(int size)
+ Start a new map of the given size and return this.
+ |
+
void |
+ close()
+ Close the stream.
+ |
+
DSIWriter
+ |
+ endList()
+ End the current list.
+ |
+
DSIWriter
+ |
+ endMap()
+ End the current map.
+ |
+
DSIWriter
+ |
+ flush()
+ Flush the stream.
+ |
+
DSIWriter
+ |
+ key(java.lang.CharSequence key)
+ Write a key in the current map.
+ |
+
int |
+ length()
+ If the writer is buffering output, this returns the size of
+ that buffer.
+
+ |
+
DSIWriter
+ |
+ reset()
+ Clears the state of the writer.
+ |
+
DSIWriter
+ |
+ value(boolean arg)
+ Write a value to the map or list.
+ |
+
DSIWriter
+ |
+ value(byte[] arg)
+ Write a value to the map or list.
+ |
+
DSIWriter
+ |
+ value(double arg)
+ Write a value to the map or list.
+ |
+
DSIWriter
+ |
+ value(DSElement arg)
+ Write a value to the map or list.
+ |
+
DSIWriter
+ |
+ value(int arg)
+ Write a value to the map or list.
+ |
+
DSIWriter
+ |
+ value(long arg)
+ Write a value to the map or list.
+ |
+
DSIWriter
+ |
+ value(java.lang.String arg)
+ Write a value to the map or list.
+ |
+
DSIWriter beginList()+
java.lang.IllegalStateException - when improperly called.DSIWriter beginList(int size)+
size - Less than zero means the size is unknown.java.lang.IllegalStateException - when improperly called.DSIWriter beginMap()+
java.lang.IllegalStateException - when improperly called.DSIWriter beginMap(int size)+
size - Less than zero means the size is unknown.java.lang.IllegalStateException - when improperly called.void close()+
close in interface java.lang.AutoCloseable
+ close in interface java.io.CloseableDSIWriter endList()+
java.lang.IllegalStateException - when improperly called.DSIWriter endMap()+
java.lang.IllegalStateException - when improperly called.DSIWriter flush()+
DSIWriter key(java.lang.CharSequence key)+
java.lang.IllegalStateException - when improperly called.int length()+
DSIWriter reset()+
DSIWriter value(DSElement arg)+
java.lang.IllegalStateException - when improperly called.DSIWriter value(boolean arg)+
java.lang.IllegalStateException - when improperly called.DSIWriter value(byte[] arg)+
java.lang.IllegalStateException - when improperly called.DSIWriter value(double arg)+
java.lang.IllegalStateException - when improperly called.DSIWriter value(int arg)+
java.lang.IllegalStateException - when improperly called.DSIWriter value(long arg)+
java.lang.IllegalStateException - when improperly called.DSIWriter value(java.lang.String arg)+
java.lang.IllegalStateException - when improperly called.public class NodeDecoder
+ public class NodeDecoder
extends java.lang.Object
-+
- This is for storing the configuration database, not for DSA interop.
NodeEncoder| Modifier and Type | -Method and Description | -
|---|---|
static DSNode |
-decode(DSIReader in)
-Reads a node tree from the given input.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitNodeEncoder
+ | Modifier and Type | +Method and Description | +
|---|---|
static DSNode
+ |
+ decode(DSIReader in)
+ Reads a node tree from the given input.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
+ wait, wait, waitpublic class NodeEncoder
+ public class NodeEncoder
extends java.lang.Object
-+
- This is for saving a configuration database, not for DSA interop.
NodeDecoder| Modifier and Type | -Method and Description | -
|---|---|
static DSIWriter |
-encode(DSIWriter out,
- DSNode node)
-Writes the node tree to the given writer.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static DSIWriter encode(DSIWriter out, - DSNode node)-
out - Where to write the node, also the return value (unclosed).node - What to encode.NodeDecoder
+ | Modifier and Type | +Method and Description | +
|---|---|
static DSIWriter |
+ encode(DSIWriter out,
+ DSNode node)
+ Writes the node tree to the given writer.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
+ wait, wait, waitpublic static DSIWriter encode(DSIWriter out, + DSNode node)+
out - Where to write the node, also the return value (unclosed).
+ node - What to encode.See: Description
+See: Description
| Interface | -Description | -
|---|---|
| DSIReader | -
- A decoder that can be used to get an entire graph in pieces, or one large group, or somewhere in
- between.
- |
-
| DSIWriter | -
- An encoder that can be used to encode large graphs with or without object instances.
- |
-
| Class | -Description | -
|---|---|
| AbstractReader | -
- Basic implementation of DSReader.
- |
-
| AbstractWriter | -
- Basic implementation of DSWriter.
- |
-
| DSBase64 | -
- Thread-safe Base64 encoder and decoder.
- |
-
| NodeDecoder | -
- Decodes a node (tree) that was encoded with NodeEncoder.
- |
-
| NodeEncoder | -
- Encodes a node tree using a compact JSON schema.
- |
-
| Enum | -Description | -
|---|---|
| DSIReader.Token | -
- Represents the state of the reader, and determines which getter should be called next.
- |
-
| Interface | +Description | +
|---|---|
| DSIReader | +
+ A decoder that can be used to get an entire graph in pieces, or one
+ large group, or somewhere in
+ between.
+
+ |
+
| DSIWriter | +
+ An encoder that can be used to encode large graphs with or without
+ object instances.
+
+ |
+
| Class | +Description | +
|---|---|
| AbstractReader | +
+ Basic implementation of DSReader.
+ |
+
| AbstractWriter | +
+ Basic implementation of DSWriter.
+ |
+
| DSBase64 | +
+ Thread-safe Base64 encoder and decoder.
+ |
+
| NodeDecoder | +
+ Decodes a node (tree) that was encoded with NodeEncoder.
+ |
+
| NodeEncoder | +
+ Encodes a node tree using a compact JSON schema.
+ |
+
| Enum | +Description | +
|---|---|
| DSIReader.Token | +
+ Represents the state of the reader, and determines which getter
+ should be called next.
+
+ |
+
public class DSBool
+ public class DSBool extends DSElement -implements DSIBoolean-
| Modifier and Type | -Field and Description | -
|---|---|
static DSBool |
-FALSE |
-
static DSBool |
-NULL |
-
static DSBool |
-TRUE |
-
| Modifier and Type | -Method and Description | -
|---|---|
boolean |
-equals(java.lang.Object arg) |
-
DSElementType |
-getElementType()
-For switch statements.
- |
-
DSValueType |
-getValueType()
-The DSA value type mapping.
- |
-
int |
-hashCode() |
-
boolean |
-isBoolean()
-Whether or not the object represents a boolean.
- |
-
boolean |
-isNull()
-Whether or not the object represents null.
- |
-
boolean |
-toBoolean()
-Attempts to return a boolean value.
- |
-
double |
-toDouble()
-0 or 1.
- |
-
float |
-toFloat()
-0 or 1.
- |
-
int |
-toInt()
-0 or 1.
- |
-
long |
-toLong()
-0 or 1.
- |
-
java.lang.String |
-toString()
-If isNull(), returns "null", otherwise returns toElement().toString()
- |
-
static DSBool |
-valueOf(boolean arg)
-Will return either TRUE or FALSE.
- |
-
DSBool |
-valueOf(DSElement arg)
-Returns the argument.
- |
-
static DSBool |
-valueOf(java.lang.String arg)
-Will return NULL, TRUE or FALSE.
- |
-
copy, isBytes, isDouble, isEqual, isFloat, isGroup, isInt, isList, isLong, isMap, isNumber, isString, make, make, make, make, make, make, makeNull, toBytes, toElement, toGroup, toList, toMapclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final DSBool TRUE-
public static final DSBool FALSE-
public static final DSBool NULL-
public boolean equals(java.lang.Object arg)-
equals in class java.lang.Objectpublic boolean isBoolean()-
DSElementpublic boolean isNull()-
DSElementpublic DSElementType getElementType()-
DSElementgetElementType in class DSElementpublic DSValueType getValueType()-
DSElementgetValueType in interface DSIValuegetValueType in class DSElementpublic int hashCode()-
hashCode in class java.lang.Objectpublic boolean toBoolean()-
DSElementtoBoolean in interface DSIBooleantoBoolean in class DSElementpublic java.lang.String toString()-
DSValuepublic static DSBool valueOf(boolean arg)-
public DSBool valueOf(DSElement arg)-
DSElementpublic static DSBool valueOf(java.lang.String arg)-
java.lang.IllegalArgumentException - If the string cannot be decoded.| Modifier and Type | +Field and Description | +
|---|---|
static DSBool
+ |
+ FALSE
+ |
+
static DSBool
+ |
+ NULL
+ |
+
static DSBool
+ |
+ TRUE
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
boolean |
+ equals(java.lang.Object arg)
+ |
+
DSElementType
+ |
+ getElementType()
+ For switch statements.
+ |
+
DSValueType
+ |
+ getValueType()
+ The DSA value type mapping.
+ |
+
int |
+ hashCode()
+ |
+
boolean |
+ isBoolean()
+ Whether or not the object represents a boolean.
+ |
+
boolean |
+ isNull()
+ Whether or not the object represents null.
+ |
+
boolean |
+ toBoolean()
+ Attempts to return a boolean value.
+ |
+
double |
+ toDouble()
+ 0 or 1.
+ |
+
float |
+ toFloat()
+ 0 or 1.
+ |
+
int |
+ toInt()
+ 0 or 1.
+ |
+
long |
+ toLong()
+ 0 or 1.
+ |
+
java.lang.String |
+ toString()
+ If isNull(), returns "null", otherwise returns
+ toElement().toString()
+
+ |
+
static DSBool
+ |
+ valueOf(boolean arg)
+ Will return either TRUE or FALSE.
+ |
+
DSBool
+ |
+ valueOf(DSElement arg)
+ Returns the argument.
+ |
+
static DSBool
+ |
+ valueOf(java.lang.String arg)
+ Will return NULL, TRUE or FALSE.
+ |
+
copy, isBytes, isDouble, isEqual,
+ isFloat, isGroup, isInt, isList, isLong, isMap, isNumber, isString, make, make, make, make, make, make,
+ makeNull, toBytes, toElement,
+ toGroup, toList, toMap
+ clone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final DSBool TRUE+
public static final DSBool FALSE+
public static final DSBool NULL+
public boolean equals(java.lang.Object arg)+
equals in class java.lang.Objectpublic boolean isBoolean()+
DSElement
+ public boolean isNull()+
DSElement
+ public DSElementType getElementType()+
DSElement
+ getElementType in
+ class DSElementpublic DSValueType getValueType()+
DSElement
+ getValueType in
+ interface DSIValue
+ getValueType in
+ class DSElementpublic int hashCode()+
hashCode in class java.lang.Objectpublic boolean toBoolean()+
DSElement
+ toBoolean in
+ interface DSIBoolean
+ toBoolean in
+ class DSElementpublic double toDouble()+
public java.lang.String toString()+
DSValue
+ public static DSBool valueOf(boolean arg)+
public DSBool valueOf(DSElement arg)+
DSElement
+ public static DSBool valueOf(java.lang.String arg)+
java.lang.IllegalArgumentException - If the string cannot be
+ decoded.
+ public class DSInfo
+ public class DSInfo extends java.lang.Object -implements ApiObject-
+
-
+
- Important things for developers to know about DSInfo are: + Important things for developers to know about DSInfo are: -
+
-
| Modifier and Type | -Method and Description | -
|---|---|
DSInfo |
-copy() |
-
void |
-decodeState(DSElement state) |
-
DSElement |
-encodeState() |
-
boolean |
-equals(java.lang.Object arg) |
-
boolean |
-equalsDefault()
-True if this proxies a default and the state and value match the default.
- |
-
boolean |
-equalsDefaultState()
-True if the state matches the default state.
- |
-
boolean |
-equalsDefaultType()
-True if this proxies a default and the value type matches the default.
- |
-
boolean |
-equalsDefaultValue()
-True if this proxies a default and the value matches the default.
- |
-
DSAction |
-getAction()
-The action, should only be called if isAction() returns true.
- |
-
java.util.Iterator<ApiObject> |
-getChildren()
-Iterator of child objects, should only be called if hasChildren() returns true.
- |
-
DSIObject |
-getDefaultObject()
-If this represents a dynamic child, this just returns the current value.
- |
-
DSElement |
-getElement()
-A convenience that casts getObject().
- |
-
void |
-getMetadata(DSMap bucket) |
-
java.lang.String |
-getName()
-The display name.
- |
-
DSNode |
-getNode()
-A convenience that casts getObject().
- |
-
DSIObject |
-getObject() |
-
DSNode |
-getParent() |
-
DSIValue |
-getValue()
-A convenience that casts getObject().
- |
-
boolean |
-hasChildren()
-True if getChildren() can be called.
- |
-
int |
-hashCode() |
-
boolean |
-hasNext()
-True if there is another info after this one.
- |
-
boolean |
-isAction()
-True if the object is an action.
- |
-
boolean |
-isAdmin()
-Whether or not this object requires configuration permission to read/write.
- |
-
boolean |
-isDefaultOnCopy()
-Whether or not the current value, or the default value is copied.
- |
-
boolean |
-isDynamic()
-Whether or not this info represents a declared default.
- |
-
boolean |
-isEqual(DSInfo arg)
-True if the flags and target object are equal (not identical if the target is a node).
- |
-
boolean |
-isHidden()
-Whether or not an object is visible to clients.
- |
-
boolean |
-isIdentical(DSInfo arg)
-True if the flags and target object are identical.
- |
-
boolean |
-isNode()
-Whether or not the object is a DSNode.
- |
-
boolean |
-isReadOnly()
-Whether or not an object can be written by a client.
- |
-
boolean |
-isTransient()
-Whether or not an object is persistent.
- |
-
boolean |
-isValue()
-True if getValue() can be called.
- |
-
DSInfo |
-next()
-The next info in the parent node.
- |
-
DSInfo |
-nextAction()
-The next DSInfo in the parent that is an action, or null.
- |
-
DSInfo |
-nextNode()
-The next DSInfo in the parent that is a node, or null.
- |
-
DSInfo |
-nextValue()
-The next DSInfo in the parent that is a value, or null.
- |
-
DSInfo |
-setAdmin(boolean admin) |
-
DSInfo |
-setHidden(boolean hidden) |
-
DSInfo |
-setReadOnly(boolean readOnly) |
-
DSInfo |
-setTransient(boolean trans) |
-
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitpublic DSInfo copy()-
public void decodeState(DSElement state)-
public DSElement encodeState()-
public boolean equals(java.lang.Object arg)-
equals in class java.lang.Objectpublic boolean equalsDefault()-
public boolean equalsDefaultState()-
public boolean equalsDefaultType()-
public boolean equalsDefaultValue()-
public DSAction getAction()-
ApiObjectpublic java.util.Iterator<ApiObject> getChildren()-
ApiObjectgetChildren in interface ApiObjectpublic DSIObject getDefaultObject()-
public DSElement getElement()-
public java.lang.String getName()-
ApiObjectpublic void getMetadata(DSMap bucket)-
getMetadata in interface ApiObjectpublic DSNode getNode()-
public DSIObject getObject()-
public DSNode getParent()-
public DSIValue getValue()-
public boolean hasChildren()-
ApiObjecthasChildren in interface ApiObjectpublic int hashCode()-
hashCode in class java.lang.Objectpublic boolean hasNext()-
public boolean isAction()-
ApiObjectpublic boolean isAdmin()-
ApiObjectpublic boolean isDefaultOnCopy()-
public boolean isDynamic()-
public boolean isEqual(DSInfo arg)-
public boolean isHidden()-
public boolean isIdentical(DSInfo arg)-
public boolean isNode()-
public boolean isReadOnly()-
isReadOnly in interface ApiObjectpublic boolean isTransient()-
public boolean isValue()-
ApiObjectpublic DSInfo next()-
public DSInfo nextAction()-
public DSInfo nextNode()-
public DSInfo nextValue()-
public DSInfo setAdmin(boolean admin)-
public DSInfo setHidden(boolean hidden)-
public DSInfo setReadOnly(boolean readOnly)-
public DSInfo setTransient(boolean trans)-
| Modifier and Type | +Method and Description | +
|---|---|
DSInfo
+ |
+ copy()
+ |
+
void |
+ decodeState(DSElement state)
+ |
+
DSElement
+ |
+ encodeState()
+ |
+
boolean |
+ equals(java.lang.Object arg)
+ |
+
boolean |
+ equalsDefault()
+ True if this proxies a default and the state and value match
+ the default.
+
+ |
+
boolean |
+ equalsDefaultState()
+ True if the state matches the default state.
+ |
+
boolean |
+ equalsDefaultType()
+ True if this proxies a default and the value type matches the
+ default.
+
+ |
+
boolean |
+ equalsDefaultValue()
+ True if this proxies a default and the value matches the
+ default.
+
+ |
+
DSAction |
+ getAction()
+ The action, should only be called if isAction() returns true.
+
+ |
+
java.util.Iterator<ApiObject> |
+ getChildren()
+ Iterator of child objects, should only be called if
+ hasChildren() returns true.
+
+ |
+
DSIObject
+ |
+ getDefaultObject()
+ If this represents a dynamic child, this just returns the
+ current value.
+
+ |
+
DSElement
+ |
+ getElement()
+ A convenience that casts getObject().
+ |
+
void |
+ getMetadata(DSMap bucket)
+ |
+
java.lang.String |
+ getName()
+ The display name.
+ |
+
DSNode
+ |
+ getNode()
+ A convenience that casts getObject().
+ |
+
DSIObject
+ |
+ getObject()
+ |
+
DSNode
+ |
+ getParent()
+ |
+
DSIValue
+ |
+ getValue()
+ A convenience that casts getObject().
+ |
+
boolean |
+ hasChildren()
+ True if getChildren() can be called.
+ |
+
int |
+ hashCode()
+ |
+
boolean |
+ hasNext()
+ True if there is another info after this one.
+ |
+
boolean |
+ isAction()
+ True if the object is an action.
+ |
+
boolean |
+ isAdmin()
+ Whether or not this object requires configuration permission to
+ read/write.
+
+ |
+
boolean |
+ isDefaultOnCopy()
+ Whether or not the current value, or the default value is
+ copied.
+
+ |
+
boolean |
+ isDynamic()
+ Whether or not this info represents a declared default.
+ |
+
boolean |
+ isEqual(DSInfo arg)
+ True if the flags and target object are equal (not identical if
+ the target is a node).
+
+ |
+
boolean |
+ isHidden()
+ Whether or not an object is visible to clients.
+ |
+
boolean |
+ isIdentical(DSInfo arg)
+ True if the flags and target object are identical.
+ |
+
boolean |
+ isNode()
+ Whether or not the object is a DSNode.
+ |
+
boolean |
+ isReadOnly()
+ Whether or not an object can be written by a client.
+ |
+
boolean |
+ isTransient()
+ Whether or not an object is persistent.
+ |
+
boolean |
+ isValue()
+ True if getValue() can be called.
+ |
+
DSInfo
+ |
+ next()
+ The next info in the parent node.
+ |
+
DSInfo
+ |
+ nextAction()
+ The next DSInfo in the parent that is an action, or null.
+ |
+
DSInfo
+ |
+ nextNode()
+ The next DSInfo in the parent that is a node, or null.
+ |
+
DSInfo
+ |
+ nextValue()
+ The next DSInfo in the parent that is a value, or null.
+ |
+
DSInfo
+ |
+ setAdmin(boolean admin)
+ |
+
DSInfo
+ |
+ setHidden(boolean hidden)
+ |
+
DSInfo
+ |
+ setReadOnly(boolean readOnly)
+ |
+
DSInfo
+ |
+ setTransient(boolean trans)
+ |
+
clone, finalize, getClass, notify, notifyAll, toString, wait, wait,
+ waitpublic DSInfo copy()+
public void decodeState(DSElement state)+
public DSElement encodeState()+
public boolean equals(java.lang.Object arg)+
equals in class java.lang.Objectpublic boolean equalsDefault()+
public boolean equalsDefaultState()+
public boolean equalsDefaultType()+
public boolean equalsDefaultValue()+
public DSAction getAction()+
ApiObject
+ public java.util.Iterator<ApiObject> getChildren()+
ApiObject
+ getChildren in
+ interface ApiObjectpublic DSIObject getDefaultObject()+
public DSElement getElement()+
public java.lang.String getName()+
ApiObject
+ public void getMetadata(DSMap bucket)+
getMetadata in
+ interface ApiObjectpublic DSNode getNode()+
public DSIObject getObject()+
public DSNode getParent()+
public DSIValue getValue()+
public boolean hasChildren()+
ApiObject
+ hasChildren in
+ interface ApiObjectpublic int hashCode()+
hashCode in class java.lang.Objectpublic boolean hasNext()+
public boolean isAction()+
ApiObject
+ public boolean isAdmin()+
ApiObject
+ public boolean isDefaultOnCopy()+
public boolean isDynamic()+
public boolean isEqual(DSInfo arg)+
public boolean isHidden()+
public boolean isIdentical(DSInfo arg)+
public boolean isNode()+
public boolean isReadOnly()+
isReadOnly in
+ interface ApiObjectpublic boolean isTransient()+
public boolean isValue()+
ApiObject
+ public DSInfo next()+
public DSInfo nextAction()+
public DSInfo nextNode()+
public DSInfo nextValue()+
public DSInfo setAdmin(boolean admin)+
public DSInfo setHidden(boolean hidden)+
public DSInfo setReadOnly(boolean readOnly)+
public DSInfo setTransient(boolean trans)+
public class DSInt
+ | Modifier and Type | -Field and Description | -
|---|---|
static DSInt |
-NULL |
-
| Modifier and Type | -Method and Description | -
|---|---|
boolean |
-equals(java.lang.Object arg)
-True if the argument is a DSINumber and the values are equal or they are both isNull.
- |
-
DSValueType |
-getValueType()
-The DSA type mapping.
- |
-
int |
-hashCode() |
-
boolean |
-isDouble()
-Whether or not the object represents a double.
- |
-
boolean |
-isEqual(java.lang.Object obj)
-Equals implementation that doesn't require hashCodes to equal, primarily intended
- so for comparing nodes.
- |
-
boolean |
-isFloat()
-Whether or not the object represents a double.
- |
-
boolean |
-isInt()
-Whether or not the object represents an int.
- |
-
boolean |
-isLong()
-Whether or not the object represents a long.
- |
-
boolean |
-isNull()
-Values should have an instance representing null.
- |
-
double |
-toDouble()
-If not a double, will cast the underlying value.
- |
-
DSElement |
-toElement()
-The current value should convert itself to an element for DSA interop such as subscription
- updates, and setting requests.
- |
-
float |
-toFloat()
-If not a float, will cast the underlying value.
- |
-
int |
-toInt()
-If not an int, will cast the underlying value.
- |
-
long |
-toLong()
-If not a long, will cast the underlying value.
- |
-
java.lang.Number |
-toNumber()
-Returns the Java primitive wrapper.
- |
-
java.lang.String |
-toString()
-If isNull(), returns "null", otherwise returns toElement().toString()
- |
-
DSInt |
-valueOf(DSElement arg)
-This should convert an element transmitted over DSA, such as subscription updates or set
- requests.
- |
-
static DSInt |
-valueOf(int arg)
-Attempts to reuse some common values before creating a new instance.
- |
-
static DSInt |
-valueOf(java.lang.String arg)
-Checks for null, then uses Float.parseFloat()
- |
-
clone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic boolean equals(java.lang.Object arg)-
equals in class java.lang.Objectpublic DSValueType getValueType()-
DSIValuegetValueType in interface DSIValuepublic int hashCode()-
hashCode in class java.lang.Objectpublic boolean isDouble()-
DSINumberpublic boolean isEqual(java.lang.Object obj)-
DSIObjectpublic boolean isFloat()-
DSINumberpublic boolean isInt()-
DSINumberpublic boolean isLong()-
DSINumberpublic boolean isNull()-
DSIValuepublic double toDouble()-
DSINumberpublic DSElement toElement()-
DSIValuepublic float toFloat()-
DSINumberpublic int toInt()-
DSINumberpublic long toLong()-
DSINumberpublic java.lang.Number toNumber()-
DSINumberpublic java.lang.String toString()-
DSValuepublic DSInt valueOf(DSElement arg)-
DSIValuepublic static DSInt valueOf(int arg)-
public static DSInt valueOf(java.lang.String arg)-
| Modifier and Type | +Field and Description | +
|---|---|
static DSInt
+ |
+ NULL
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
boolean |
+ equals(java.lang.Object arg)
+ True if the argument is a DSINumber and the values are equal or
+ they are both isNull.
+
+ |
+
DSValueType
+ |
+ getValueType()
+ The DSA type mapping.
+ |
+
int |
+ hashCode()
+ |
+
boolean |
+ isDouble()
+ Whether or not the object represents a double.
+ |
+
boolean |
+ isEqual(java.lang.Object obj)
+ Equals implementation that doesn't require hashCodes to equal,
+ primarily intended
+ so for comparing nodes.
+
+ |
+
boolean |
+ isFloat()
+ Whether or not the object represents a double.
+ |
+
boolean |
+ isInt()
+ Whether or not the object represents an int.
+ |
+
boolean |
+ isLong()
+ Whether or not the object represents a long.
+ |
+
boolean |
+ isNull()
+ Values should have an instance representing null.
+ |
+
double |
+ toDouble()
+ If not a double, will cast the underlying value.
+ |
+
DSElement
+ |
+ toElement()
+ The current value should convert itself to an element for DSA
+ interop such as subscription
+ updates, and setting requests.
+
+ |
+
float |
+ toFloat()
+ If not a float, will cast the underlying value.
+ |
+
int |
+ toInt()
+ If not an int, will cast the underlying value.
+ |
+
long |
+ toLong()
+ If not a long, will cast the underlying value.
+ |
+
java.lang.Number |
+ toNumber()
+ Returns the Java primitive wrapper.
+ |
+
java.lang.String |
+ toString()
+ If isNull(), returns "null", otherwise returns
+ toElement().toString()
+
+ |
+
DSInt
+ |
+ valueOf(DSElement arg)
+ This should convert an element transmitted over DSA, such as
+ subscription updates or set
+ requests.
+
+ |
+
static DSInt
+ |
+ valueOf(int arg)
+ Attempts to reuse some common values before creating a new
+ instance.
+
+ |
+
static DSInt
+ |
+ valueOf(java.lang.String arg)
+ Checks for null, then uses Float.parseFloat()
+ |
+
clone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic boolean equals(java.lang.Object arg)+
equals in class java.lang.Objectpublic DSValueType getValueType()+
DSIValue
+ getValueType in
+ interface DSIValue
+ public int hashCode()+
hashCode in class java.lang.Objectpublic boolean isDouble()+
DSINumber
+ public boolean isEqual(java.lang.Object obj)+
DSIObject
+ public boolean isFloat()+
DSINumber
+ public boolean isInt()+
DSINumber
+ public boolean isLong()+
DSINumber
+ public boolean isNull()+
DSIValue
+ public double toDouble()+
DSINumber
+ public DSElement toElement()+
DSIValue
+ public float toFloat()+
DSINumber
+ public int toInt()+
DSINumber
+ public long toLong()+
DSINumber
+ public java.lang.Number toNumber()+
DSINumber
+ public java.lang.String toString()+
DSValue
+ public DSInt valueOf(DSElement arg)+
DSIValue
+ public static DSInt valueOf(int arg)+
public static DSInt valueOf(java.lang.String arg)+
public class DSList
+ public class DSList extends DSGroup -implements java.lang.Iterable<DSElement>-
+
- This can be mounted in the node tree. However, the parent node will not know when it has been - modified, so the modifier is responsible for calling DSNode.childChanged(DSInfo). + This can be mounted in the node tree. However, the parent node will not know when it has + been + modified, so the modifier is responsible for calling DSNode.childChanged(DSInfo). -
+
- This is not thread safe.
| Modifier and Type | -Field and Description | -
|---|---|
protected java.util.ArrayList |
-list |
-
| Modifier and Type | -Method and Description | -
|---|---|
DSList |
-add(boolean val)
-Appends the primitive and returns this.
- |
-
DSList |
-add(double val)
-Appends the primitive and returns this.
- |
-
DSList |
-add(DSElement val)
-Adds the value and returns this.
- |
-
DSList |
-add(int val)
-Appends the primitive and returns this.
- |
-
DSList |
-add(long val)
-Appends the primitive and returns this.
- |
-
DSList |
-add(java.lang.String val)
-Appends the primitive and returns this.
- |
-
DSList |
-addAll(DSList list)
-Add all elements of the argument to this list and returns this.
- |
-
DSList |
-addList()
-Appends a new list and returns it.
- |
-
DSMap |
-addMap()
-Appends a new map and returns it.
- |
-
DSList |
-addNull()
-Appends null and returns this.
- |
-
DSList |
-clear()
-Removes all items.
- |
-
boolean |
-contains(DSElement value) |
-
DSList |
-copy()
-If an object is mutable (list or map) then this should clone it, immutable objects can simply
- return themselves.
- |
-
DSElement |
-get(int idx)
-Returns the value at the given index.
- |
-
DSElementType |
-getElementType()
-For switch statements.
- |
-
DSValueType |
-getValueType()
-The DSA value type mapping.
- |
-
boolean |
-isList()
-Returns true.
- |
-
boolean |
-isNull()
-Returns false.
- |
-
java.util.Iterator<DSElement> |
-iterator()
-Returns an iterator that does not implement remove.
- |
-
DSList |
-put(int idx,
- boolean val)
-Primitive setter, returns this.
- |
-
DSList |
-put(int idx,
- double val)
-Primitive setter, returns this.
- |
-
DSList |
-put(int idx,
- DSElement val)
-Replaces a value and returns this.
- |
-
DSList |
-put(int idx,
- int val)
-Primitive setter, returns this.
- |
-
DSList |
-put(int idx,
- long val)
-Primitive setter, returns this.
- |
-
DSList |
-put(int idx,
- java.lang.String val)
-Primitive setter, returns this.
- |
-
DSElement |
-remove(int idx)
-Removes the value at the given index and returns it.
- |
-
int |
-size()
-The number of items is the group.
- |
-
DSList |
-toElement()
-Returns this.
- |
-
DSList |
-toList()
-Lists return themselves, everything else results in an exception.
- |
-
static DSList |
-valueOf(java.lang.Double... values) |
-
static DSList |
-valueOf(DSElement... values) |
-
DSList |
-valueOf(DSElement element)
-Returns the argument.
- |
-
static DSList |
-valueOf(java.lang.Long... values) |
-
static DSList |
-valueOf(java.lang.String... values) |
-
equals, first, get, get, get, get, get, getBoolean, getDouble, getFloat, getInt, getList, getLong, getMap, getString, hashCode, indexOf, isEmpty, isGroup, isNull, last, lastIndexOf, removeFirst, removeLast, toGroup, toStringisBoolean, isBytes, isDouble, isEqual, isFloat, isInt, isLong, isMap, isNumber, isString, make, make, make, make, make, make, makeNull, toBoolean, toBytes, toDouble, toFloat, toInt, toLong, toMapclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic DSList add(DSElement val)-
val - Can be null, and can not be an already parented group.public DSList add(boolean val)-
public DSList add(double val)-
public DSList add(long val)-
public DSList add(java.lang.String val)-
public DSList add(int val)-
public DSList addAll(DSList list)-
public DSList addList()-
public DSMap addMap()-
public DSList addNull()-
public boolean contains(DSElement value)-
public DSList copy()-
DSElementpublic DSList toElement()-
DSElementpublic DSElement get(int idx)-
DSGrouppublic DSElementType getElementType()-
DSElementgetElementType in class DSElementpublic DSValueType getValueType()-
DSElementgetValueType in interface DSIValuegetValueType in class DSElementpublic boolean isNull()-
public java.util.Iterator<DSElement> iterator()-
iterator in interface java.lang.Iterable<DSElement>public DSList put(int idx, - DSElement val)-
val - Can be null.public DSList put(int idx, + This is not thread safe.
| Modifier and Type | +Field and Description | +
|---|---|
protected java.util.ArrayList |
+ list
+ |
+
| Constructor and Description | +
|---|
DSList()
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
DSList
+ |
+ add(boolean val)
+ Appends the primitive and returns this.
+ |
+
DSList
+ |
+ add(double val)
+ Appends the primitive and returns this.
+ |
+
DSList
+ |
+ add(DSElement val)
+ Adds the value and returns this.
+ |
+
DSList
+ |
+ add(int val)
+ Appends the primitive and returns this.
+ |
+
DSList
+ |
+ add(long val)
+ Appends the primitive and returns this.
+ |
+
DSList
+ |
+ add(java.lang.String val)
+ Appends the primitive and returns this.
+ |
+
DSList
+ |
+ addAll(DSList list)
+ Add all elements of the argument to this list and returns
+ this.
+
+ |
+
DSList
+ |
+ addList()
+ Appends a new list and returns it.
+ |
+
DSMap
+ |
+ addMap()
+ Appends a new map and returns it.
+ |
+
DSList
+ |
+ addNull()
+ Appends null and returns this.
+ |
+
DSList
+ |
+ clear()
+ Removes all items.
+ |
+
boolean |
+ contains(DSElement value)
+ |
+
DSList
+ |
+ copy()
+ If an object is mutable (list or map) then this should clone
+ it, immutable objects can simply
+ return themselves.
+
+ |
+
DSElement
+ |
+ get(int idx)
+ Returns the value at the given index.
+ |
+
DSElementType
+ |
+ getElementType()
+ For switch statements.
+ |
+
DSValueType
+ |
+ getValueType()
+ The DSA value type mapping.
+ |
+
boolean |
+ isList()
+ Returns true.
+ |
+
boolean |
+ isNull()
+ Returns false.
+ |
+
java.util.Iterator<DSElement> |
+ iterator()
+ Returns an iterator that does not implement remove.
+ |
+
DSList
+ |
+ put(int idx,
+ boolean val)
+ Primitive setter, returns this.
+ |
+
DSList
+ |
+ put(int idx,
+ double val)
+ Primitive setter, returns this.
+ |
+
DSList
+ |
+ put(int idx,
+ DSElement val)
+ Replaces a value and returns this.
+ |
+
DSList
+ |
+ put(int idx,
+ int val)
+ Primitive setter, returns this.
+ |
+
DSList
+ |
+ put(int idx,
+ long val)
+ Primitive setter, returns this.
+ |
+
DSList
+ |
+ put(int idx,
+ java.lang.String val)
+ Primitive setter, returns this.
+ |
+
DSElement
+ |
+ remove(int idx)
+ Removes the value at the given index and returns it.
+ |
+
int |
+ size()
+ The number of items is the group.
+ |
+
DSList
+ |
+ toElement()
+ Returns this.
+ |
+
DSList
+ |
+ toList()
+ Lists return themselves, everything else results in an
+ exception.
+
+ |
+
static DSList
+ |
+ valueOf(java.lang.Double... values)
+ |
+
static DSList
+ |
+ valueOf(DSElement... values)
+ |
+
DSList
+ |
+ valueOf(DSElement element)
+ Returns the argument.
+ |
+
static DSList
+ |
+ valueOf(java.lang.Long... values)
+ |
+
static DSList
+ |
+ valueOf(java.lang.String... values)
+ |
+
equals,
+ first, get, get, get, get, get,
+ getBoolean,
+ getDouble,
+ getFloat, getInt, getList, getLong, getMap, getString,
+ hashCode, indexOf,
+ isEmpty, isGroup, isNull, last, lastIndexOf,
+ removeFirst,
+ removeLast,
+ toGroup, toString
+ isBoolean, isBytes, isDouble, isEqual,
+ isFloat, isInt, isLong, isMap, isNumber, isString, make, make, make, make, make, make,
+ makeNull, toBoolean,
+ toBytes, toDouble, toFloat, toInt, toLong, toMap
+ clone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic DSList add(DSElement val)+
val - Can be null, and can not be an already parented group.public DSList add(boolean val)+
public DSList add(double val)+
public DSList add(long val)+
public DSList add(java.lang.String val)+
public DSList add(int val)+
public DSList addAll(DSList list)+
public DSList addList()+
public DSMap addMap()+
public DSList addNull()+
public DSList clear()+
DSGroup
+ public boolean contains(DSElement value)+
public DSList copy()+
DSElement
+ public DSList toElement()+
DSElement
+ public DSElement get(int idx)+
DSGroup
+ public DSElementType getElementType()+
DSElement
+ getElementType in
+ class DSElementpublic DSValueType getValueType()+
DSElement
+ getValueType in
+ interface DSIValue
+ getValueType in
+ class DSElementpublic boolean isList()+
public boolean isNull()+
public java.util.Iterator<DSElement> iterator()+
iterator in interface java.lang.Iterable<DSElement>public DSList put(int idx, + DSElement val)+
val - Can be null.public DSList put(int idx, boolean val)-
public DSList put(int idx, +Primitive setter, returns this.+
public DSList put(int idx, double val)-
public DSList put(int idx, +Primitive setter, returns this.+
public DSList put(int idx, int val)-
public DSList put(int idx, +Primitive setter, returns this.+
public DSList put(int idx, long val)-
public DSList put(int idx, +Primitive setter, returns this.+
public DSList put(int idx, java.lang.String val)-
public DSElement remove(int idx)-
DSGrouppublic int size()-
DSGrouppublic DSList toList()-
DSElementpublic DSList valueOf(DSElement element)-
DSElementpublic static DSList valueOf(java.lang.Double... values)-
public static DSList valueOf(java.lang.Long... values)-
public static DSList valueOf(java.lang.String... values)-
public DSElement remove(int idx)+
DSGroup
+ public int size()+
DSGroup
+ public DSList toList()+
DSElement
+ public DSList valueOf(DSElement element)+
DSElement
+ public static DSList valueOf(java.lang.Double... values)+
public static DSList valueOf(java.lang.Long... values)+
public static DSList valueOf(java.lang.String... values)+
public class DSLong
+ | Modifier and Type | -Field and Description | -
|---|---|
static DSLong |
-NULL |
-
| Modifier and Type | -Method and Description | -
|---|---|
boolean |
-equals(java.lang.Object arg)
-True if the argument is a DSINumber and the values are equal or they are both isNull.
- |
-
DSElementType |
-getElementType()
-For switch statements.
- |
-
DSValueType |
-getValueType()
-The DSA value type mapping.
- |
-
int |
-hashCode() |
-
boolean |
-isLong()
-Whether or not the object represents a long.
- |
-
boolean |
-isNull()
-Whether or not the object represents null.
- |
-
boolean |
-isNumber()
-Whether or not the object represents a number.
- |
-
boolean |
-toBoolean()
-Attempts to return a boolean value.
- |
-
double |
-toDouble()
-Attempts to return a double value.
- |
-
float |
-toFloat()
-Attempts to return a float value.
- |
-
int |
-toInt()
-Attempts to return an int value.
- |
-
long |
-toLong()
-Attempts to return a long value.
- |
-
java.lang.Number |
-toNumber()
-Returns the Java primitive wrapper.
- |
-
java.lang.String |
-toString()
-If isNull(), returns "null", otherwise returns toElement().toString()
- |
-
DSLong |
-valueOf(DSElement arg)
-Returns this.
- |
-
static DSLong |
-valueOf(long arg)
-Attempts to reuse some common values before creating a new instance.
- |
-
static DSLong |
-valueOf(java.lang.String arg)
-Checks for null, then uses Float.parseFloat()
- |
-
copy, isBoolean, isBytes, isDouble, isEqual, isFloat, isGroup, isInt, isList, isMap, isString, make, make, make, make, make, make, makeNull, toBytes, toElement, toGroup, toList, toMapclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic boolean equals(java.lang.Object arg)-
equals in class java.lang.Objectpublic DSElementType getElementType()-
DSElementgetElementType in class DSElementpublic DSValueType getValueType()-
DSElementgetValueType in interface DSIValuegetValueType in class DSElementpublic int hashCode()-
hashCode in class java.lang.Objectpublic boolean isLong()-
DSElementpublic boolean isNull()-
DSElementpublic boolean isNumber()-
DSElementpublic boolean toBoolean()-
DSElementpublic double toDouble()-
DSElementpublic float toFloat()-
DSElementpublic int toInt()-
DSElementpublic long toLong()-
DSElementpublic java.lang.Number toNumber()-
DSINumberpublic java.lang.String toString()-
DSValuepublic static DSLong valueOf(long arg)-
public static DSLong valueOf(java.lang.String arg)-
| Modifier and Type | +Field and Description | +
|---|---|
static DSLong
+ |
+ NULL
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
boolean |
+ equals(java.lang.Object arg)
+ True if the argument is a DSINumber and the values are equal or
+ they are both isNull.
+
+ |
+
DSElementType
+ |
+ getElementType()
+ For switch statements.
+ |
+
DSValueType
+ |
+ getValueType()
+ The DSA value type mapping.
+ |
+
int |
+ hashCode()
+ |
+
boolean |
+ isLong()
+ Whether or not the object represents a long.
+ |
+
boolean |
+ isNull()
+ Whether or not the object represents null.
+ |
+
boolean |
+ isNumber()
+ Whether or not the object represents a number.
+ |
+
boolean |
+ toBoolean()
+ Attempts to return a boolean value.
+ |
+
double |
+ toDouble()
+ Attempts to return a double value.
+ |
+
float |
+ toFloat()
+ Attempts to return a float value.
+ |
+
int |
+ toInt()
+ Attempts to return an int value.
+ |
+
long |
+ toLong()
+ Attempts to return a long value.
+ |
+
java.lang.Number |
+ toNumber()
+ Returns the Java primitive wrapper.
+ |
+
java.lang.String |
+ toString()
+ If isNull(), returns "null", otherwise returns
+ toElement().toString()
+
+ |
+
DSLong
+ |
+ valueOf(DSElement arg)
+ Returns this.
+ |
+
static DSLong
+ |
+ valueOf(long arg)
+ Attempts to reuse some common values before creating a new
+ instance.
+
+ |
+
static DSLong
+ |
+ valueOf(java.lang.String arg)
+ Checks for null, then uses Float.parseFloat()
+ |
+
copy, isBoolean, isBytes, isDouble, isEqual,
+ isFloat, isGroup, isInt, isList, isMap, isString, make, make, make, make, make, make,
+ makeNull, toBytes, toElement,
+ toGroup, toList, toMap
+ clone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic boolean equals(java.lang.Object arg)+
equals in class java.lang.Objectpublic DSElementType getElementType()+
DSElement
+ getElementType in
+ class DSElementpublic DSValueType getValueType()+
DSElement
+ getValueType in
+ interface DSIValue
+ getValueType in
+ class DSElementpublic int hashCode()+
hashCode in class java.lang.Objectpublic boolean isLong()+
DSElement
+ public boolean isNull()+
DSElement
+ public boolean isNumber()+
DSElement
+ public boolean toBoolean()+
DSElement
+ public double toDouble()+
DSElement
+ public float toFloat()+
DSElement
+ public int toInt()+
DSElement
+ public long toLong()+
DSElement
+ public java.lang.Number toNumber()+
DSINumber
+ public java.lang.String toString()+
DSValue
+ public static DSLong valueOf(long arg)+
public static DSLong valueOf(java.lang.String arg)+
public class DSMap
+ public class DSMap extends DSGroup-
+
- This can be mounted in the node tree. However, the parent node will not know when it has been - modified, so the modifier is responsible for calling DSNode.childChanged(DSInfo). + This can be mounted in the node tree. However, the parent node will not know when it has + been + modified, so the modifier is responsible for calling DSNode.childChanged(DSInfo). -
+
- This is not thread safe.
| Modifier and Type | -Class and Description | -
|---|---|
static class |
-DSMap.Entry
-Allows values to be accessed quickly by index in the list, rather than having to do a key
- lookup in the map.
- |
-
| Modifier and Type | -Field and Description | -
|---|---|
protected java.util.List<DSMap.Entry> |
-keys
-For preserving order.
- |
-
protected java.util.Map<java.lang.String,DSMap.Entry> |
-map |
-
| Modifier and Type | -Method and Description | -
|---|---|
DSMap |
-clear()
-Removes all items.
- |
-
boolean |
-contains(java.lang.String key) |
-
DSElement |
-copy()
-If an object is mutable (list or map) then this should clone it, immutable objects can simply
- return themselves.
- |
-
boolean |
-equals(java.lang.Object arg) |
-
DSElement |
-get(int idx)
-Returns the value at the given index.
- |
-
DSElement |
-get(java.lang.String key)
-Returns the value for the given key.
- |
-
boolean |
-get(java.lang.String key,
- boolean def)
-Optional getter, returns the provided default if the value mapped to the key is null or not
- convertible.
- |
-
double |
-get(java.lang.String key,
- double def)
-Optional getter, returns the provided default if the value mapped to the key is null.
- |
-
int |
-get(java.lang.String key,
- int def)
-Optional getter, returns the provided default if the value mapped to the key is null or not
- convertible.
- |
-
long |
-get(java.lang.String key,
- long def)
-Optional getter, returns the provided default if the value mapped to the key is null or not
- convertible.
- |
-
java.lang.String |
-get(java.lang.String key,
- java.lang.String def)
-Optional getter, returns the provided default if the value mapped to the key is null.
- |
-
boolean |
-getBoolean(java.lang.String key)
-Primitive getter.
- |
-
double |
-getDouble(java.lang.String key)
-Primitive getter.
- |
-
DSElementType |
-getElementType()
-For switch statements.
- |
-
DSMap.Entry |
-getEntry(int index) |
-
DSMap.Entry |
-getEntry(java.lang.String key) |
-
int |
-getInt(java.lang.String key)
-Primitive getter.
- |
-
java.lang.String |
-getKey(int idx)
-Returns the key at the given index.
- |
-
DSList |
-getList(java.lang.String key)
-Return the list, or null.
- |
-
long |
-getLong(java.lang.String key)
-Primitive getter.
- |
-
DSMap |
-getMap(java.lang.String key)
-Returns the map value for the given key, or null.
- |
-
java.lang.String |
-getString(java.lang.String key)
-Returns the String value for the given key, or null.
- |
-
DSValueType |
-getValueType()
-The DSA value type mapping.
- |
-
int |
-hashCode() |
-
int |
-indexOf(java.lang.String key)
-Index of the given key, or -1.
- |
-
boolean |
-isMap()
-Returns true.
- |
-
boolean |
-isNull()
-Returns false.
- |
-
boolean |
-isNull(java.lang.String key)
-Returns true if the key isn't in the map, or it's value is null.
- |
-
DSMap |
-put(java.lang.String key,
- boolean val)
-Primitive setter, returns this.
- |
-
DSMap |
-put(java.lang.String key,
- double val)
-Primitive setter, returns this.
- |
-
DSMap |
-put(java.lang.String key,
- DSElement val)
-Adds or replaces the value for the given key and returns this.
- |
-
DSMap |
-put(java.lang.String key,
- int val)
-Primitive setter, returns this.
- |
-
DSMap |
-put(java.lang.String key,
- long val)
-Primitive setter, returns this.
- |
-
DSMap |
-put(java.lang.String key,
- java.lang.String val)
-Primitive setter, returns this.
- |
-
DSMap |
-put(java.lang.String key,
- java.lang.Throwable val)
-Puts a String representing the stack trace into the map.
- |
-
DSMap |
-putAll(DSMap toAdd)
-Adds / overwrites entries in this map with those from the given.
- |
-
DSList |
-putList(java.lang.String key)
-Puts a new list for given key and returns it.
- |
-
DSMap |
-putMap(java.lang.String key)
-Puts a new map for given key and returns it.
- |
-
DSMap |
-putNull(java.lang.String key)
-Puts a null value for given key and returns this.
- |
-
DSElement |
-remove(int idx)
-Removes the value at the given index and returns it.
- |
-
DSElement |
-remove(java.lang.String key)
-Removes the key-value pair and returns the removed value.
- |
-
int |
-size()
-The number of items is the group.
- |
-
DSMap |
-toElement()
-Returns this.
- |
-
DSMap |
-toMap()
-Maps return themselves, everything else results in an exception.
- |
-
DSMap |
-valueOf(DSElement element)
-Returns the argument.
- |
-
first, get, get, get, get, get, getBoolean, getDouble, getFloat, getInt, getList, getLong, getMap, getString, indexOf, isEmpty, isGroup, isNull, last, lastIndexOf, removeFirst, removeLast, toGroup, toStringisBoolean, isBytes, isDouble, isEqual, isFloat, isInt, isList, isLong, isNumber, isString, make, make, make, make, make, make, makeNull, toBoolean, toBytes, toDouble, toFloat, toInt, toList, toLongclone, finalize, getClass, notify, notifyAll, wait, wait, waitprotected java.util.List<DSMap.Entry> keys-
protected java.util.Map<java.lang.String,DSMap.Entry> map-
public boolean contains(java.lang.String key)-
public DSElement copy()-
DSElementpublic DSElement get(int idx)-
DSGrouppublic DSElement get(java.lang.String key)-
public boolean get(java.lang.String key, + This is not thread safe.
| Modifier and Type | +Class and Description | +
|---|---|
static class |
+ DSMap.Entry
+ Allows values to be accessed quickly by index in the list,
+ rather than having to do a key
+ lookup in the map.
+
+ |
+
| Modifier and Type | +Field and Description | +
|---|---|
protected java.util.List<DSMap.Entry> |
+ keys
+ For preserving order.
+ |
+
protected java.util.Map<java.lang.String,DSMap.Entry> |
+ map
+ |
+
| Constructor and Description | +
|---|
DSMap()
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
DSMap
+ |
+ clear()
+ Removes all items.
+ |
+
boolean |
+ contains(java.lang.String key)
+ |
+
DSElement
+ |
+ copy()
+ If an object is mutable (list or map) then this should clone
+ it, immutable objects can simply
+ return themselves.
+
+ |
+
boolean |
+ equals(java.lang.Object arg)
+ |
+
DSElement
+ |
+ get(int idx)
+ Returns the value at the given index.
+ |
+
DSElement
+ |
+ get(java.lang.String key)
+ Returns the value for the given key.
+ |
+
boolean |
+ get(java.lang.String key,
+ boolean def)
+ Optional getter, returns the provided default if the value
+ mapped to the key is null or not
+ convertible.
+
+ |
+
double |
+ get(java.lang.String key,
+ double def)
+ Optional getter, returns the provided default if the value
+ mapped to the key is null.
+
+ |
+
int |
+ get(java.lang.String key,
+ int def)
+ Optional getter, returns the provided default if the value
+ mapped to the key is null or not
+ convertible.
+
+ |
+
long |
+ get(java.lang.String key,
+ long def)
+ Optional getter, returns the provided default if the value
+ mapped to the key is null or not
+ convertible.
+
+ |
+
java.lang.String |
+ get(java.lang.String key,
+ java.lang.String def)
+ Optional getter, returns the provided default if the value
+ mapped to the key is null.
+
+ |
+
boolean |
+ getBoolean(java.lang.String key)
+ Primitive getter.
+ |
+
double |
+ getDouble(java.lang.String key)
+ Primitive getter.
+ |
+
DSElementType
+ |
+ getElementType()
+ For switch statements.
+ |
+
DSMap.Entry
+ |
+ getEntry(int index)
+ |
+
DSMap.Entry
+ |
+ getEntry(java.lang.String key)
+ |
+
int |
+ getInt(java.lang.String key)
+ Primitive getter.
+ |
+
java.lang.String |
+ getKey(int idx)
+ Returns the key at the given index.
+ |
+
DSList
+ |
+ getList(java.lang.String key)
+ Return the list, or null.
+ |
+
long |
+ getLong(java.lang.String key)
+ Primitive getter.
+ |
+
DSMap
+ |
+ getMap(java.lang.String key)
+ Returns the map value for the given key, or null.
+ |
+
java.lang.String |
+ getString(java.lang.String key)
+ Returns the String value for the given key, or null.
+ |
+
DSValueType
+ |
+ getValueType()
+ The DSA value type mapping.
+ |
+
int |
+ hashCode()
+ |
+
int |
+ indexOf(java.lang.String key)
+ Index of the given key, or -1.
+ |
+
boolean |
+ isMap()
+ Returns true.
+ |
+
boolean |
+ isNull()
+ Returns false.
+ |
+
boolean |
+ isNull(java.lang.String key)
+ Returns true if the key isn't in the map, or it's value is
+ null.
+
+ |
+
DSMap
+ |
+ put(java.lang.String key,
+ boolean val)
+ Primitive setter, returns this.
+ |
+
DSMap
+ |
+ put(java.lang.String key,
+ double val)
+ Primitive setter, returns this.
+ |
+
DSMap
+ |
+ put(java.lang.String key,
+ DSElement val)
+ Adds or replaces the value for the given key and returns
+ this.
+
+ |
+
DSMap
+ |
+ put(java.lang.String key,
+ int val)
+ Primitive setter, returns this.
+ |
+
DSMap
+ |
+ put(java.lang.String key,
+ long val)
+ Primitive setter, returns this.
+ |
+
DSMap
+ |
+ put(java.lang.String key,
+ java.lang.String val)
+ Primitive setter, returns this.
+ |
+
DSMap
+ |
+ put(java.lang.String key,
+ java.lang.Throwable val)
+ Puts a String representing the stack trace into the map.
+ |
+
DSMap
+ |
+ putAll(DSMap toAdd)
+ Adds / overwrites entries in this map with those from the
+ given.
+
+ |
+
DSList
+ |
+ putList(java.lang.String key)
+ Puts a new list for given key and returns it.
+ |
+
DSMap
+ |
+ putMap(java.lang.String key)
+ Puts a new map for given key and returns it.
+ |
+
DSMap
+ |
+ putNull(java.lang.String key)
+ Puts a null value for given key and returns this.
+ |
+
DSElement
+ |
+ remove(int idx)
+ Removes the value at the given index and returns it.
+ |
+
DSElement
+ |
+ remove(java.lang.String key)
+ Removes the key-value pair and returns the removed value.
+ |
+
int |
+ size()
+ The number of items is the group.
+ |
+
DSMap
+ |
+ toElement()
+ Returns this.
+ |
+
DSMap
+ |
+ toMap()
+ Maps return themselves, everything else results in an
+ exception.
+
+ |
+
DSMap
+ |
+ valueOf(DSElement element)
+ Returns the argument.
+ |
+
first, get, get, get, get, get,
+ getBoolean,
+ getDouble,
+ getFloat, getInt, getList, getLong, getMap, getString,
+ indexOf,
+ isEmpty, isGroup, isNull, last, lastIndexOf,
+ removeFirst,
+ removeLast,
+ toGroup, toString
+ isBoolean, isBytes, isDouble, isEqual,
+ isFloat, isInt, isList, isLong, isNumber, isString, make, make, make, make, make, make,
+ makeNull, toBoolean,
+ toBytes, toDouble, toFloat, toInt, toList, toLong
+ clone, finalize, getClass, notify, notifyAll, wait, wait, waitprotected java.util.List<DSMap.Entry> keys+
protected java.util.Map<java.lang.String,DSMap.Entry> map+
public DSMap clear()+
DSGroup
+ public boolean contains(java.lang.String key)+
public DSElement copy()+
DSElement
+ public boolean equals(java.lang.Object arg)+ +
public DSElement get(int idx)+
DSGroup
+ public DSElement get(java.lang.String key)+
public boolean get(java.lang.String key,
boolean def)
-public double get(java.lang.String key, +Optional getter, returns the provided default if the value mapped + to the key is null or not + convertible. ++
public double get(java.lang.String key,
double def)
-public int get(java.lang.String key, +Optional getter, returns the provided default if the value mapped + to the key is null. ++
public int get(java.lang.String key,
int def)
-public long get(java.lang.String key, +Optional getter, returns the provided default if the value mapped + to the key is null or not + convertible. ++
public long get(java.lang.String key,
long def)
-public java.lang.String get(java.lang.String key, +Optional getter, returns the provided default if the value mapped + to the key is null or not + convertible. ++
public java.lang.String get(java.lang.String key,
java.lang.String def)
-public boolean getBoolean(java.lang.String key)-
public double getDouble(java.lang.String key)-
public DSElementType getElementType()-
DSElementgetElementType in class DSElementpublic DSMap.Entry getEntry(int index)-
public DSMap.Entry getEntry(java.lang.String key)-
public DSList getList(java.lang.String key)-
public long getLong(java.lang.String key)-
public int getInt(java.lang.String key)-
public java.lang.String getKey(int idx)-
public DSMap getMap(java.lang.String key)-
public java.lang.String getString(java.lang.String key)-
public DSValueType getValueType()-
DSElementgetValueType in interface DSIValuegetValueType in class DSElementpublic boolean isNull()-
public boolean isNull(java.lang.String key)-
public int indexOf(java.lang.String key)-
public DSMap put(java.lang.String key, - DSElement val)-
key - Must not be null.val - Can be null, and can not be an already parented group.public DSMap put(java.lang.String key, +Optional getter, returns the provided default if the value mapped + to the key is null. ++
public boolean getBoolean(java.lang.String key)+
public double getDouble(java.lang.String key)+
public DSElementType getElementType()+
DSElement
+ getElementType in
+ class DSElementpublic DSMap.Entry getEntry(int index)+
public DSMap.Entry getEntry(java.lang.String key)+
public DSList getList(java.lang.String key)+
public long getLong(java.lang.String key)+
public int getInt(java.lang.String key)+
public java.lang.String getKey(int idx)+
public DSMap getMap(java.lang.String key)+
public java.lang.String getString(java.lang.String key)+
public DSValueType getValueType()+
DSElement
+ getValueType in
+ interface DSIValue
+ getValueType in
+ class DSElementpublic boolean isMap()+
public boolean isNull()+
public boolean isNull(java.lang.String key)+
public int indexOf(java.lang.String key)+
public DSMap put(java.lang.String key, + DSElement val)+
key - Must not be null.val - Can be null, and can not be an already parented group.public DSMap put(java.lang.String key, boolean val)-
public DSMap put(java.lang.String key, +Primitive setter, returns this.+
public DSMap put(java.lang.String key, double val)-
public DSMap put(java.lang.String key, +Primitive setter, returns this.+
public DSMap put(java.lang.String key, int val)-
public DSMap put(java.lang.String key, +Primitive setter, returns this.+
public DSMap put(java.lang.String key, long val)-
public DSMap put(java.lang.String key, +Primitive setter, returns this.+
public DSMap put(java.lang.String key, java.lang.String val)-
public DSMap put(java.lang.String key, +Primitive setter, returns this.+
public DSMap put(java.lang.String key, java.lang.Throwable val)-
public DSMap putAll(DSMap toAdd)-
public DSList putList(java.lang.String key)-
public DSMap putMap(java.lang.String key)-
public DSMap putNull(java.lang.String key)-
public DSElement remove(int idx)-
DSGrouppublic DSElement remove(java.lang.String key)-
public int size()-
DSGrouppublic DSMap toElement()-
DSElementpublic DSMap toMap()-
DSElementpublic DSMap putAll(DSMap toAdd)+
public DSList putList(java.lang.String key)+
public DSMap putMap(java.lang.String key)+
public DSMap putNull(java.lang.String key)+
public DSElement remove(int idx)+
DSGroup
+ public DSElement remove(java.lang.String key)+
public int size()+
DSGroup
+ public DSMap toElement()+
DSElement
+ public DSMap toMap()+
DSElement
+ public class DSNode -extends DSLogger -implements DSIObject, java.lang.Iterable<DSInfo>-
- To create a node subclass, you should understand the following concepts: -
-
-
- DSNode sub-classes must support the public no-arg constructor. This is how they will be - instantiated when deserializing the configuration database. -
-
- Every subtype of DSNode has a private default instance, all other instances of any particular - type are copies of the default instance. You should never perform application logic unless your - node is running (started or stable) because of this. -
- If a DSNode subtype needs to have specific child nodes or values (most will), it should override - the declareDefaults method. The method should: -
-
- During node serialization (configuration database, not DSA interop), children that match their - declared default are omitted. This has two benefits: -
-
-
- It is important to know the node lifecycle. Your nodes should not execute any application logic - unless they are running (started or stable). -
- Stopped -
- A node is instantiated in the stopped state. If a node tree has been persisted, will be be fully - restored in the stopped state. DSNode.onStopped will not be called, it is only called when nodes - transition from running to stopped. -
- When nodes are removed from a running parent node, they will be stopped. DSNode.onStopped will - be called after all child nodes have been stopped. -
- When a link is stopped, an attempt to stop the tree will be made, but it cannot be guaranteed. -
- Started -
- After the node tree is fully deserialized it will be started. A node's onStart method will be - called after all of its child nodes have been started. The only guarantee is that all child - nodes have been started. -
- Nodes will also started when they are added to an already running parent node. -
- Stable -
- Stable is called after the entire tree has been started. The first time the node tree is loaded, - there is a stable delay of 5 seconds. This is configurable as stableDelay in - slink.json. -
- Nodes added to an already stable parent will have onStart and onStable called immediately. -
- When in doubt of whether to use onStarted or onStable, use onStable. -
- Other Callbacks -
- When a node is stable, there are several other callbacks for various state changes. All - callbacks begin with **on** such as onChildAdded(). -
-
- Nodes should suspend, or minimize activity when nothing is interested in them. For example, if - nothing is interested in a point, it is best to not poll the point on the foreign system. -
- To do this you use the following APIs: -
-
-
- Values mostly represent leaf members of the node tree. There are two types of values: -
-
- Many values are singleton instances. This is for efficiency, the same value instance (e.g. - DSBoolean.TRUE) can be stored in many nodes. Singleton values must be immutable. -
- Whenever possible, values should also have NULL instance. Rather than storing a generic null, - this helps the system decode the proper type such as when a requester is attempting to set a - value. -
-
- Add actions to your node to allow requester invocation using org.iot.dsa.node.action.DSAction. -
- Override DSNode.onInvoke to handle invocations. The reason for this is complicated but it is - possible to subclass DSAction, just carefully read the javadoc if you do. Be sure to call - super.onInvoke() when overriding that method. -
-
- All node children have corresponding DSInfo instances. This type serves two purposes: -
-
- Important things for developers to know about DSInfo are: -
-
| Modifier and Type | -Field and Description | -
|---|---|
static DSTopic |
-INFO_TOPIC |
-
static DSTopic |
-VALUE_TOPIC |
-
| Modifier and Type | -Method and Description | -
|---|---|
DSInfo |
-add(java.lang.String name,
- DSIObject object)
-Adds the named child only if the name is not already in use.
- |
-
int |
-childCount()
-The number of children.
- |
-
DSNode |
-clear()
-Removes non-permanent children.
- |
-
boolean |
-contains(java.lang.String key)
-Whether or not this node has a child with the given name.
- |
-
DSNode |
-copy()
-Returns a clone of this node and its subtree.
- |
-
protected DSInfo |
-declareDefault(java.lang.String name,
- DSIObject value)
-Use this in the declareDefaults method to create a non-removable child.
- |
-
protected void |
-declareDefaults()
-The is only called once for each class.
- |
-
protected void |
-fire(DSTopic topic,
- DSIEvent event,
- DSInfo child)
-Notifies subscribers of the event.
- |
-
protected void |
-fire(DSTopic topic,
- DSIEvent event,
- DSInfo child,
- java.lang.Object... params)
-Notifies subscribers of the event.
- |
-
DSIObject |
-get(java.lang.String name)
-Returns the child value with the given name, or null.
- |
-
DSElement |
-getElement(java.lang.String name)
-A convenience for (DSElement) get(name).
- |
-
DSIObject |
-getFirst()
-The first child, or null.
- |
-
DSInfo |
-getFirstInfo()
-The first child info, or null.
- |
-
DSInfo |
-getFirstNodeInfo()
-The info for the first child node, or null.
- |
-
DSInfo |
-getInfo()
-DSInfo for this node in its parent, or null if un-parented.
- |
-
DSInfo |
-getInfo(java.lang.String name)
-Returns the info for the child with the given name, or null.
- |
-
DSIObject |
-getLast()
-The last child, or null.
- |
-
DSInfo |
-getLastInfo()
-The last child info, or null.
- |
-
java.util.logging.Logger |
-getLogger()
-Ascends the tree until a logger is found.
- |
-
void |
-getMetadata(DSInfo info,
- DSMap bucket)
-Override point, add any meta data for the given info to the provided bucket.
- |
-
java.lang.String |
-getName()
-Returns the name of this node in its parent, or null if un-parented.
- |
-
DSNode |
-getNode(java.lang.String name)
-A convenience for (DSNode) get(name).
- |
-
DSNode |
-getParent()
-Returns the parent node, or null.
- |
-
java.lang.String |
-getPath()
-The DSA path, properly encoded.
- |
-
DSIValue |
-getValue(java.lang.String name)
-A convenience for (DSIValue) get(name).
- |
-
protected boolean |
-isDefaultInstance()
-True if this is the default instance for the type.
- |
-
boolean |
-isEqual(java.lang.Object arg)
-True if the argument is a node with the same children, although their order can be
- different.
- |
-
boolean |
-isIdentical(java.lang.Object arg)
-True if the argument is a node with the same children in the exact same order.
- |
-
protected static boolean |
-isNode(java.lang.Object obj)
-Convenience for instanceof DSNode.
- |
-
boolean |
-isNull()
-Returns false.
- |
-
boolean |
-isRunning()
-A convenience for !isStopped().
- |
-
boolean |
-isStable()
-True after stable is called, children are stable before their parents.
- |
-
boolean |
-isStarted()
-True after start is called, children are started before their parents.
- |
-
boolean |
-isStopped()
-True after stop is called, children are stopped before their parents.
- |
-
boolean |
-isSubscribed()
-True if there are any subscribers.
- |
-
boolean |
-isSubscribed(DSInfo child,
- DSTopic topic)
-True if there are any subscriptions with the matching child and topic.
- |
-
boolean |
-isSubscribed(DSTopic topic)
-True if there any subscriptions for the given topic.
- |
-
java.util.Iterator<DSInfo> |
-iterateNodes()
-Returns an info iterator of child DSNodes.
- |
-
java.util.Iterator<DSInfo> |
-iterateValues()
-Returns an info iterator of child DSIValues.
- |
-
java.util.Iterator<DSInfo> |
-iterator()
-Returns an info iterator of all children.
- |
-
protected void |
-onChildAdded(DSInfo info)
-Called when the given child is added and in the stable state.
- |
-
protected void |
-onChildChanged(DSInfo info)
-Called when the given child is changed and in the stable state.
- |
-
protected void |
-onChildRemoved(DSInfo info)
-Called when the given child is removed and in the stable state.
- |
-
protected void |
-onInfoChanged(DSInfo info)
-Called when the given info is modified and in the stable state.
- |
-
ActionResult |
-onInvoke(DSInfo actionInfo,
- ActionInvocation invocation)
-Override point, called by the default implementation of DSAction.invoke.
- |
-
void |
-onSet(DSInfo info,
- DSIValue value)
-Override point, called when a value being set.
- |
-
void |
-onSet(DSIValue value)
-Override point, called only when a DSNode subclass implements DSIValue is being set.
- |
-
protected void |
-onStable()
-Called once this node is stable, but before stable is called on children.
- |
-
protected void |
-onStarted()
-Called once this node and its entire subtree is started.
- |
-
protected void |
-onStopped()
-Called once this node and its entire subtree is stopped.
- |
-
protected void |
-onSubscribe(DSTopic topic,
- DSInfo child,
- DSISubscriber subscriber)
-Called for every subscription.
- |
-
protected void |
-onSubscribed()
-Called when this node transitions from having no subscriptions to having a subscription of
- any kind.
- |
-
protected void |
-onSubscribed(DSTopic topic,
- DSInfo child)
-Called when the child and topic pair transitions from having no subscriptions to have a
- subscription.
- |
-
protected void |
-onUnsubscribe(DSTopic topic,
- DSInfo child,
- DSISubscriber subscriber)
-Called for every unsubscribe.
- |
-
protected void |
-onUnsubscribed()
-Called when this node transitions to having no subscriptions of any kind.
- |
-
protected void |
-onUnsubscribed(DSTopic topic,
- DSInfo child)
-Called when the child and topic pair transitions to having no subscriptions.
- |
-
DSNode |
-put(DSInfo info,
- DSIObject object)
-Replaces the child.
- |
-
DSInfo |
-put(java.lang.String name,
- boolean arg)
-A convenience for put(String, DSIObject)
- |
-
DSInfo |
-put(java.lang.String name,
- double arg)
-A convenience for put(String, DSIObject)
- |
-
DSInfo |
-put(java.lang.String name,
- DSIObject object)
-Adds or replaces the named child.
- |
-
DSInfo |
-put(java.lang.String name,
- float arg)
-A convenience for put(String, DSIObject)
- |
-
DSInfo |
-put(java.lang.String name,
- int arg)
-A convenience for put(String, DSIObject)
- |
-
DSInfo |
-put(java.lang.String name,
- long arg)
-A convenience for put(String, DSIObject)
- |
-
DSInfo |
-put(java.lang.String name,
- java.lang.String arg)
-A convenience for put(String, DSIObject)
- |
-
DSNode |
-remove(DSInfo info)
-Removes the child.
- |
-
DSInfo |
-remove(java.lang.String name)
-Remove the named child if it is contained.
- |
-
void |
-stable()
-Called after the entire subtree is started.
- |
-
void |
-start()
-Sets the state to starting.
- |
-
void |
-stop()
-Sets the state to stopped.
- |
-
void |
-subscribe(DSTopic topic,
- DSInfo child,
- DSISubscriber subscriber)
-Subscribes the child and topic.
- |
-
protected static DSNode |
-toNode(java.lang.Object obj)
-A convenience that casts the argument to a node.
- |
-
void |
-unsubscribe(DSTopic topic,
- DSInfo child,
- DSISubscriber subscriber)
-Unsubscribes the tuple.
- |
-
protected void |
-validateChild(DSIObject obj)
-Override point, throw a meaningful IllegalArgumentException if the child is not allowed
- |
-
protected void |
-validateParent(DSNode node)
-Override point, throw a meaningful IllegalArgumentException if the parent is not allowed
- |
-
config, config, fine, fine, fine, finer, finer, finer, finest, finest, finest, info, info, info, severe, severe, severe, warn, warn, warnclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic static final DSTopic INFO_TOPIC-
public static final DSTopic VALUE_TOPIC-
public DSInfo add(java.lang.String name, - DSIObject object)-
name - The name must not currently be in use.object - The object to add, nodes must not already be parented.java.lang.IllegalArgumentException - If the name is in use or the value is a node that is already
- parented.public int childCount()-
public DSNode clear()-
public boolean contains(java.lang.String key)-
public DSNode copy()-
protected DSInfo declareDefault(java.lang.String name, - DSIObject value)-
declareDefaults()protected void declareDefaults()-
To create non-removable children.protected void fire(DSTopic topic, - DSIEvent event, - DSInfo child)-
topic - Must not be null.event - Must not be null.child - Can be null.protected void fire(DSTopic topic, - DSIEvent event, - DSInfo child, +
public class DSNode +extends DSLogger +implements DSIObject, java.lang.Iterable<DSInfo>+
+ To create a node subclass, you should understand the following concepts: +
+
+
+ DSNode sub-classes must support the public no-arg constructor. This is how they will be + instantiated when deserializing the configuration database. +
+
+ Every subtype of DSNode has a private default instance, all other instances of any + particular + type are copies of the default instance. You should never perform application logic + unless your + node is running (started or stable) because of this. +
+ If a DSNode subtype needs to have specific child nodes or values (most will), it should + override + the declareDefaults method. The method should: +
+
+ During node serialization (configuration database, not DSA interop), children that match + their + declared default are omitted. This has two benefits: +
+
+
+ It is important to know the node lifecycle. Your nodes should not execute any + application logic + unless they are running (started or stable). +
+ Stopped +
+ A node is instantiated in the stopped state. If a node tree has been persisted, will be + be fully + restored in the stopped state. DSNode.onStopped will not be called, it is only called + when nodes + transition from running to stopped. +
+ When nodes are removed from a running parent node, they will be stopped. + DSNode.onStopped will + be called after all child nodes have been stopped. +
+ When a link is stopped, an attempt to stop the tree will be made, but it cannot be + guaranteed. +
+ Started +
+ After the node tree is fully deserialized it will be started. A node's onStart method + will be + called after all of its child nodes have been started. The only guarantee is that all + child + nodes have been started. +
+ Nodes will also started when they are added to an already running parent node. +
+ Stable +
+ Stable is called after the entire tree has been started. The first time the node tree is + loaded, + there is a stable delay of 5 seconds. This is configurable as stableDelay in + slink.json. +
+ Nodes added to an already stable parent will have onStart and onStable called + immediately. +
+ When in doubt of whether to use onStarted or onStable, use onStable. +
+ Other Callbacks +
+ When a node is stable, there are several other callbacks for various state changes. All + callbacks begin with **on** such as onChildAdded(). +
+
+ Nodes should suspend, or minimize activity when nothing is interested in them. For + example, if + nothing is interested in a point, it is best to not poll the point on the foreign + system. +
+ To do this you use the following APIs: +
+
+
+ Values mostly represent leaf members of the node tree. There are two types of values: +
+
+ Many values are singleton instances. This is for efficiency, the same value instance + (e.g. + DSBoolean.TRUE) can be stored in many nodes. Singleton values must be immutable. +
+ Whenever possible, values should also have NULL instance. Rather than storing a generic + null, + this helps the system decode the proper type such as when a requester is attempting to + set a + value. +
+
+ Add actions to your node to allow requester invocation using + org.iot.dsa.node.action.DSAction. +
+ Override DSNode.onInvoke to handle invocations. The reason for this is complicated but + it is + possible to subclass DSAction, just carefully read the javadoc if you do. Be sure to + call + super.onInvoke() when overriding that method. +
+
+ All node children have corresponding DSInfo instances. This type serves two purposes: +
+
+ Important things for developers to know about DSInfo are: +
+
| Modifier and Type | +Field and Description | +
|---|---|
static DSTopic |
+ INFO_TOPIC
+ |
+
static DSTopic |
+ VALUE_TOPIC
+ |
+
| Constructor and Description | +
|---|
DSNode()
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
DSInfo
+ |
+ add(java.lang.String name,
+ DSIObject object)
+ Adds the named child only if the name is not already in use.
+
+ |
+
int |
+ childCount()
+ The number of children.
+ |
+
DSNode
+ |
+ clear()
+ Removes non-permanent children.
+ |
+
boolean |
+ contains(java.lang.String key)
+ Whether or not this node has a child with the given name.
+ |
+
DSNode
+ |
+ copy()
+ Returns a clone of this node and its subtree.
+ |
+
protected DSInfo |
+ declareDefault(java.lang.String name,
+ DSIObject value)
+ Use this in the declareDefaults method to create a
+ non-removable child.
+
+ |
+
protected void |
+ declareDefaults()
+ The is only called once for each class.
+ |
+
protected void |
+ fire(DSTopic topic,
+ DSIEvent event,
+ DSInfo child)
+ Notifies subscribers of the event.
+ |
+
protected void |
+ fire(DSTopic topic,
+ DSIEvent event,
+ DSInfo child,
+ java.lang.Object... params)
+ Notifies subscribers of the event.
+ |
+
DSIObject
+ |
+ get(java.lang.String name)
+ Returns the child value with the given name, or null.
+ |
+
DSElement
+ |
+ getElement(java.lang.String name)
+ A convenience for (DSElement) get(name).
+ |
+
DSIObject
+ |
+ getFirst()
+ The first child, or null.
+ |
+
DSInfo
+ |
+ getFirstInfo()
+ The first child info, or null.
+ |
+
DSInfo
+ |
+ getFirstNodeInfo()
+ The info for the first child node, or null.
+ |
+
DSInfo
+ |
+ getInfo()
+ DSInfo for this node in its parent, or null if un-parented.
+
+ |
+
DSInfo
+ |
+ getInfo(java.lang.String name)
+ Returns the info for the child with the given name, or null.
+
+ |
+
DSIObject
+ |
+ getLast()
+ The last child, or null.
+ |
+
DSInfo
+ |
+ getLastInfo()
+ The last child info, or null.
+ |
+
java.util.logging.Logger |
+ getLogger()
+ Ascends the tree until a logger is found.
+ |
+
void |
+ getMetadata(DSInfo info,
+ DSMap bucket)
+ Override point, add any meta data for the given info to the
+ provided bucket.
+
+ |
+
java.lang.String |
+ getName()
+ Returns the name of this node in its parent, or null if
+ un-parented.
+
+ |
+
DSNode
+ |
+ getNode(java.lang.String name)
+ A convenience for (DSNode) get(name).
+ |
+
DSNode
+ |
+ getParent()
+ Returns the parent node, or null.
+ |
+
java.lang.String |
+ getPath()
+ The DSA path, properly encoded.
+ |
+
DSIValue
+ |
+ getValue(java.lang.String name)
+ A convenience for (DSIValue) get(name).
+ |
+
protected boolean |
+ isDefaultInstance()
+ True if this is the default instance for the type.
+ |
+
boolean |
+ isEqual(java.lang.Object arg)
+ True if the argument is a node with the same children, although
+ their order can be
+ different.
+
+ |
+
boolean |
+ isIdentical(java.lang.Object arg)
+ True if the argument is a node with the same children in the
+ exact same order.
+
+ |
+
protected static boolean |
+ isNode(java.lang.Object obj)
+ Convenience for instanceof DSNode.
+ |
+
boolean |
+ isNull()
+ Returns false.
+ |
+
boolean |
+ isRunning()
+ A convenience for !isStopped().
+ |
+
boolean |
+ isStable()
+ True after stable is called, children are stable before their
+ parents.
+
+ |
+
boolean |
+ isStarted()
+ True after start is called, children are started before their
+ parents.
+
+ |
+
boolean |
+ isStopped()
+ True after stop is called, children are stopped before their
+ parents.
+
+ |
+
boolean |
+ isSubscribed()
+ True if there are any subscribers.
+ |
+
boolean |
+ isSubscribed(DSInfo child,
+ DSTopic topic)
+ True if there are any subscriptions with the matching child and
+ topic.
+
+ |
+
boolean |
+ isSubscribed(DSTopic topic)
+ True if there any subscriptions for the given topic.
+ |
+
java.util.Iterator<DSInfo> |
+ iterateNodes()
+ Returns an info iterator of child DSNodes.
+ |
+
java.util.Iterator<DSInfo> |
+ iterateValues()
+ Returns an info iterator of child DSIValues.
+ |
+
java.util.Iterator<DSInfo> |
+ iterator()
+ Returns an info iterator of all children.
+ |
+
protected void |
+ onChildAdded(DSInfo info)
+ Called when the given child is added and in the stable state.
+
+ |
+
protected void |
+ onChildChanged(DSInfo info)
+ Called when the given child is changed and in the stable
+ state.
+
+ |
+
protected void |
+ onChildRemoved(DSInfo info)
+ Called when the given child is removed and in the stable
+ state.
+
+ |
+
protected void |
+ onInfoChanged(DSInfo info)
+ Called when the given info is modified and in the stable
+ state.
+
+ |
+
ActionResult |
+ onInvoke(DSInfo actionInfo,
+ ActionInvocation invocation)
+ Override point, called by the default implementation of
+ DSAction.invoke.
+
+ |
+
void |
+ onSet(DSInfo info,
+ DSIValue value)
+ Override point, called when a value being set.
+ |
+
void |
+ onSet(DSIValue value)
+ Override point, called only when a DSNode subclass implements
+ DSIValue is being set.
+
+ |
+
protected void |
+ onStable()
+ Called once this node is stable, but before stable is called on
+ children.
+
+ |
+
protected void |
+ onStarted()
+ Called once this node and its entire subtree is started.
+ |
+
protected void |
+ onStopped()
+ Called once this node and its entire subtree is stopped.
+ |
+
protected void |
+ onSubscribe(DSTopic topic,
+ DSInfo child,
+ DSISubscriber subscriber)
+ Called for every subscription.
+ |
+
protected void |
+ onSubscribed()
+ Called when this node transitions from having no subscriptions
+ to having a subscription of
+ any kind.
+
+ |
+
protected void |
+ onSubscribed(DSTopic topic,
+ DSInfo child)
+ Called when the child and topic pair transitions from having no
+ subscriptions to have a
+ subscription.
+
+ |
+
protected void |
+ onUnsubscribe(DSTopic topic,
+ DSInfo child,
+ DSISubscriber subscriber)
+ Called for every unsubscribe.
+ |
+
protected void |
+ onUnsubscribed()
+ Called when this node transitions to having no subscriptions of
+ any kind.
+
+ |
+
protected void |
+ onUnsubscribed(DSTopic topic,
+ DSInfo child)
+ Called when the child and topic pair transitions to having no
+ subscriptions.
+
+ |
+
DSNode
+ |
+ put(DSInfo info,
+ DSIObject object)
+ Replaces the child.
+ |
+
DSInfo
+ |
+ put(java.lang.String name,
+ boolean arg)
+ A convenience for put(String, DSIObject)
+ |
+
DSInfo
+ |
+ put(java.lang.String name,
+ double arg)
+ A convenience for put(String, DSIObject)
+ |
+
DSInfo
+ |
+ put(java.lang.String name,
+ DSIObject object)
+ Adds or replaces the named child.
+ |
+
DSInfo
+ |
+ put(java.lang.String name,
+ float arg)
+ A convenience for put(String, DSIObject)
+ |
+
DSInfo
+ |
+ put(java.lang.String name,
+ int arg)
+ A convenience for put(String, DSIObject)
+ |
+
DSInfo
+ |
+ put(java.lang.String name,
+ long arg)
+ A convenience for put(String, DSIObject)
+ |
+
DSInfo
+ |
+ put(java.lang.String name,
+ java.lang.String arg)
+ A convenience for put(String, DSIObject)
+ |
+
DSNode
+ |
+ remove(DSInfo info)
+ Removes the child.
+ |
+
DSInfo
+ |
+ remove(java.lang.String name)
+ Remove the named child if it is contained.
+ |
+
void |
+ stable()
+ Called after the entire subtree is started.
+ |
+
void |
+ start()
+ Sets the state to starting.
+ |
+
void |
+ stop()
+ Sets the state to stopped.
+ |
+
void |
+ subscribe(DSTopic topic,
+ DSInfo child,
+ DSISubscriber subscriber)
+ Subscribes the child and topic.
+ |
+
protected static DSNode |
+ toNode(java.lang.Object obj)
+ A convenience that casts the argument to a node.
+ |
+
void |
+ unsubscribe(DSTopic topic,
+ DSInfo child,
+ DSISubscriber subscriber)
+ Unsubscribes the tuple.
+ |
+
protected void |
+ validateChild(DSIObject obj)
+ Override point, throw a meaningful IllegalArgumentException if
+ the child is not allowed
+
+ |
+
protected void |
+ validateParent(DSNode node)
+ Override point, throw a meaningful IllegalArgumentException if
+ the parent is not allowed
+
+ |
+
config,
+ config,
+ fine, fine,
+ fine,
+ finer, finer,
+ finer,
+ finest, finest,
+ finest,
+ info, info,
+ info,
+ severe, severe,
+ severe,
+ warn, warn,
+ warn
+ clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
+ wait, wait, waitforEach, spliteratorpublic static final DSTopic INFO_TOPIC+
public static final DSTopic VALUE_TOPIC+
public DSInfo add(java.lang.String name, + DSIObject object)+
name - The name must not currently be in use.object - The object to add, nodes must not already be parented.
+ java.lang.IllegalArgumentException - If the name is in use or the
+ value is a node that is already
+ parented.
+ public int childCount()+
public DSNode clear()+
public boolean contains(java.lang.String key)+
public DSNode copy()+
protected DSInfo declareDefault(java.lang.String name, + DSIObject value)+
declareDefaults()
+ protected void declareDefaults()+
To
+ create non-removable children.protected void fire(DSTopic topic, + DSIEvent event, + DSInfo child)+
topic - Must not be null.event - Must not be null.child - Can be null.protected void fire(DSTopic topic, + DSIEvent event, + DSInfo child, java.lang.Object... params)-
topic - Must not be null.event - Must not be null.child - Can be null.params - Optionalpublic DSIObject get(java.lang.String name)-
public DSElement getElement(java.lang.String name)-
public DSInfo getInfo()-
public DSInfo getInfo(java.lang.String name)-
public DSIObject getFirst()-
public DSInfo getFirstInfo()-
public DSInfo getFirstNodeInfo()-
public DSIObject getLast()-
public DSInfo getLastInfo()-
public java.util.logging.Logger getLogger()-
public void getMetadata(DSInfo info, - DSMap bucket)-
public java.lang.String getName()-
public DSNode getNode(java.lang.String name)-
public DSNode getParent()-
public java.lang.String getPath()-
public DSIValue getValue(java.lang.String name)-
protected final boolean isDefaultInstance()-
public boolean isEqual(java.lang.Object arg)-
public boolean isIdentical(java.lang.Object arg)-
protected static final boolean isNode(java.lang.Object obj)-
public boolean isNull()-
public boolean isRunning()-
public boolean isStable()-
public boolean isStarted()-
public boolean isStopped()-
public boolean isSubscribed()-
public boolean isSubscribed(DSInfo child, - DSTopic topic)-
child - Can be null.topic - Can be null.public boolean isSubscribed(DSTopic topic)-
public java.util.Iterator<DSInfo> iterateNodes()-
public java.util.Iterator<DSInfo> iterateValues()-
public java.util.Iterator<DSInfo> iterator()-
iterator in interface java.lang.Iterable<DSInfo>protected void onChildAdded(DSInfo info)-
protected void onChildChanged(DSInfo info)-
protected void onChildRemoved(DSInfo info)-
protected void onInfoChanged(DSInfo info)-
public ActionResult onInvoke(DSInfo actionInfo, - ActionInvocation invocation)-
actionInfo - Child info for the action, you can declare a field for the action info for
- quick instance comparison.invocation - Details about the incoming invoke as well as the mechanism to send updates
- over an open stream.java.lang.IllegalStateException - If the nothing handles an incoming invocation.DSAction.invoke(DSInfo, ActionInvocation)public void onSet(DSInfo info, - DSIValue value)-
info - The child being changed.value - The new value.DSIResponder.onSet(InboundSetRequest)public void onSet(DSIValue value)-
value - The new value.DSIResponder.onSet(InboundSetRequest),
-DSValueNodeprotected void onSubscribe(DSTopic topic, - DSInfo child, - DSISubscriber subscriber)-
topic - Will not be null.child - Can be null.subscriber - Will not be null.protected void onSubscribed()-
protected void onSubscribed(DSTopic topic, - DSInfo child)-
child - Can be null, which indicates node subscriptions.protected void onStable()-
protected void onStarted()-
protected void onStopped()-
protected void onUnsubscribe(DSTopic topic, - DSInfo child, - DSISubscriber subscriber)-
topic - Will not be null.child - Can be null.subscriber - Will not be null.protected void onUnsubscribed()-
protected void onUnsubscribed(DSTopic topic, - DSInfo child)-
topic - Can not be null.child - Can be null.public DSInfo put(java.lang.String name, - DSIObject object)-
public DSInfo put(java.lang.String name, +Notifies subscribers of the event.+
topic - Must not be null.event - Must not be null.child - Can be null.params - Optionalpublic DSIObject get(java.lang.String name)+
public DSElement getElement(java.lang.String name)+
public DSInfo getInfo()+
public DSInfo getInfo(java.lang.String name)+
public DSIObject getFirst()+
public DSInfo getFirstInfo()+
public DSInfo getFirstNodeInfo()+
public DSIObject getLast()+
public DSInfo getLastInfo()+
public java.util.logging.Logger getLogger()+
public void getMetadata(DSInfo info, + DSMap bucket)+
public java.lang.String getName()+
public DSNode getNode(java.lang.String name)+
public DSNode getParent()+
public java.lang.String getPath()+
public DSIValue getValue(java.lang.String name)+
protected final boolean isDefaultInstance()+
public boolean isEqual(java.lang.Object arg)+
public boolean isIdentical(java.lang.Object arg)+
protected static final boolean isNode(java.lang.Object obj)+
public boolean isNull()+
public boolean isRunning()+
public boolean isStable()+
public boolean isStarted()+
public boolean isStopped()+
public boolean isSubscribed()+
public boolean isSubscribed(DSInfo child, + DSTopic topic)+
child - Can be null.topic - Can be null.public boolean isSubscribed(DSTopic topic)+
public java.util.Iterator<DSInfo> iterateNodes()+
public java.util.Iterator<DSInfo> iterateValues()+
public java.util.Iterator<DSInfo> iterator()+
iterator in interface java.lang.Iterable<DSInfo>protected void onChildAdded(DSInfo info)+
protected void onChildChanged(DSInfo info)+
protected void onChildRemoved(DSInfo info)+
protected void onInfoChanged(DSInfo info)+
public ActionResult onInvoke(DSInfo actionInfo, + ActionInvocation invocation)+
actionInfo - Child info for the action, you can declare a field
+ for the action info for
+ quick instance comparison.
+ invocation - Details about the incoming invoke as well as the
+ mechanism to send updates
+ over an open stream.
+ java.lang.IllegalStateException - If the nothing handles an
+ incoming invocation.
+ DSAction.invoke(DSInfo,
+ ActionInvocation)public void onSet(DSInfo info, + DSIValue value)+
info - The child being changed.value - The new value.DSIResponder.onSet(InboundSetRequest)
+ public void onSet(DSIValue value)+
value - The new value.DSIResponder.onSet(InboundSetRequest),
+ DSValueNodeprotected void onSubscribe(DSTopic topic, + DSInfo child, + DSISubscriber subscriber)+
topic - Will not be null.child - Can be null.subscriber - Will not be null.protected void onSubscribed()+
protected void onSubscribed(DSTopic topic, + DSInfo child)+
child - Can be null, which indicates node subscriptions.protected void onStable()+
protected void onStarted()+
protected void onStopped()+
protected void onUnsubscribe(DSTopic topic, + DSInfo child, + DSISubscriber subscriber)+
topic - Will not be null.child - Can be null.subscriber - Will not be null.protected void onUnsubscribed()+
protected void onUnsubscribed(DSTopic topic, + DSInfo child)+
topic - Can not be null.child - Can be null.public DSInfo put(java.lang.String name, + DSIObject object)+
public DSInfo put(java.lang.String name, boolean arg)-
public DSInfo put(java.lang.String name, +A convenience for put(String, DSIObject)+
public DSInfo put(java.lang.String name, double arg)-
public DSInfo put(java.lang.String name, +A convenience for put(String, DSIObject)+
public DSInfo put(java.lang.String name, float arg)-
public DSInfo put(java.lang.String name, +A convenience for put(String, DSIObject)+
public DSInfo put(java.lang.String name, int arg)-
public DSInfo put(java.lang.String name, +A convenience for put(String, DSIObject)+
public DSInfo put(java.lang.String name, long arg)-
public DSInfo put(java.lang.String name, +A convenience for put(String, DSIObject)+
public DSInfo put(java.lang.String name, java.lang.String arg)-
public DSNode put(DSInfo info, - DSIObject object)-
public DSNode remove(DSInfo info)-
java.lang.IllegalStateException - If the info is permanent or not a child of this node.public DSInfo remove(java.lang.String name)-
java.lang.IllegalStateException - If the info says its not removable.public final void stable()-
public final void start()-
public final void stop()-
public void subscribe(DSTopic topic, - DSInfo child, - DSISubscriber subscriber)-
topic - Can not be null.child - Can be null, and cannot be a child node.subscriber - Can not be null.protected static DSNode toNode(java.lang.Object obj)-
public void unsubscribe(DSTopic topic, - DSInfo child, - DSISubscriber subscriber)-
topic - Can not be null.child - Can be null.subscriber - Can not be null.protected void validateChild(DSIObject obj)-
protected void validateParent(DSNode node)-
public DSNode put(DSInfo info, + DSIObject object)+
public DSNode remove(DSInfo info)+
java.lang.IllegalStateException - If the info is permanent or not
+ a child of this node.
+ public DSInfo remove(java.lang.String name)+
java.lang.IllegalStateException - If the info says its not
+ removable.
+ public final void stable()+
public final void start()+
public final void stop()+
public void subscribe(DSTopic topic, + DSInfo child, + DSISubscriber subscriber)+
topic - Can not be null.child - Can be null, and cannot be a child node.subscriber - Can not be null.protected static DSNode toNode(java.lang.Object obj)+
public void unsubscribe(DSTopic topic, + DSInfo child, + DSISubscriber subscriber)+
topic - Can not be null.child - Can be null.subscriber - Can not be null.protected void validateChild(DSIObject obj)+
protected void validateParent(DSNode node)+
public class DSNull
+ | Modifier and Type | -Field and Description | -
|---|---|
static DSNull |
-NULL |
-
| Modifier and Type | -Method and Description | -
|---|---|
DSNull |
-copy()
-Returns this.
- |
-
boolean |
-equals(java.lang.Object arg)
-True of the arg == this.
- |
-
DSElementType |
-getElementType()
-For switch statements.
- |
-
DSValueType |
-getValueType()
-The DSA value type mapping.
- |
-
boolean |
-isNull()
-True
- |
-
DSNull |
-toElement()
-Returns this.
- |
-
java.lang.String |
-toString()
-If isNull(), returns "null", otherwise returns toElement().toString()
- |
-
DSNull |
-valueOf(DSElement arg)
-Returns this.
- |
-
isBoolean, isBytes, isDouble, isEqual, isFloat, isGroup, isInt, isList, isLong, isMap, isNumber, isString, make, make, make, make, make, make, makeNull, toBoolean, toBytes, toDouble, toFloat, toGroup, toInt, toList, toLong, toMapclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic DSNull copy()-
public DSNull toElement()-
public boolean equals(java.lang.Object arg)-
equals in class java.lang.Objectpublic DSValueType getValueType()-
DSElementgetValueType in interface DSIValuegetValueType in class DSElementpublic boolean isNull()-
public DSElementType getElementType()-
DSElementgetElementType in class DSElement| Modifier and Type | +Field and Description | +
|---|---|
static DSNull
+ |
+ NULL
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
DSNull
+ |
+ copy()
+ Returns this.
+ |
+
boolean |
+ equals(java.lang.Object arg)
+ True of the arg == this.
+ |
+
DSElementType
+ |
+ getElementType()
+ For switch statements.
+ |
+
DSValueType
+ |
+ getValueType()
+ The DSA value type mapping.
+ |
+
boolean |
+ isNull()
+ True
+ |
+
DSNull
+ |
+ toElement()
+ Returns this.
+ |
+
java.lang.String |
+ toString()
+ If isNull(), returns "null", otherwise returns
+ toElement().toString()
+
+ |
+
DSNull
+ |
+ valueOf(DSElement arg)
+ Returns this.
+ |
+
isBoolean, isBytes, isDouble, isEqual,
+ isFloat, isGroup, isInt, isList, isLong, isMap, isNumber, isString, make, make, make, make, make, make,
+ makeNull, toBoolean,
+ toBytes, toDouble, toFloat, toGroup, toInt, toList, toLong, toMap
+ clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait,
+ waitpublic DSNull copy()+
public DSNull toElement()+
public boolean equals(java.lang.Object arg)+
equals in class java.lang.Objectpublic DSValueType getValueType()+
DSElement
+ getValueType in
+ interface DSIValue
+ getValueType in
+ class DSElementpublic boolean isNull()+
public DSElementType getElementType()+
DSElement
+ getElementType in
+ class DSElementSee: Description
+See: Description
| Class | -Description | -
|---|---|
| DSRuntime | -
- DSA thread pool and timers.
- |
-
| DSRuntime.Timer | -
- Can be used to inspect and cancel tasks passed to the run methods in DSRuntime.
- |
-
| Class | +Description | +
|---|---|
| DSRuntime | +
+ DSA thread pool and timers.
+ |
+
| DSRuntime.Timer | +
+ Can be used to inspect and cancel tasks passed to the run methods in
+ DSRuntime.
+
+ |
+
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 @@ - + - -
| Package | -Description | -
|---|---|
| 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 | -- |
| Package | +Description | +
|---|---|
| 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 | ++ |
java.lang.String detail-
java.lang.Throwable inner-
java.lang.String detail+
java.lang.Throwable inner+