See: Description
Interface | Description |
---|---|
ConfigurationDelta |
Interface for the configuration delta object
|
ConfigurationDeltaFactory |
Interface for the delta factory
|
DeltaType |
Interface of delta type object
|
Class | Description |
---|---|
AddedItemsDeltaType |
Field with this delta type adds new items (
DeltaType implementation) |
DefaultConfigurationDelta |
Default
ConfigurationDelta implementation |
DefaultConfigurationDeltaFactory |
Default
ConfigurationDeltaFactory implementation |
DefaultDeltaType |
Field with this delta type uses the default value (
DeltaType implementation) |
DeltaHandlerId |
Unique id is used to identify delta objects and subscribe for their updates.
|
EmptyDeltaType |
Empty
DeltaType implementation |
RemovedItemsDeltaType |
Field with this delta type removes items by their handler ids (
DeltaType implementation) |
ResetDeltaType |
Field with this delta type resets its array container (
DeltaType implementation) |
ValueDeltaType |
Field with this delta type set the new value (
DeltaType implementation) |
Assume, received root delta looks as follows:
{
"schemaName": "testT",
"schemaNamespace": "org.kaa.config",
"testField1": "abc",
"testField2": {
"schemaName": "testRecordT",
"schemaNamespace": "org.kaa.config",
"testField3": 456,
"__uuid": {
"schemaName": "uuidT",
"schemaNamespace": "org.kaaproject.configuration",
"value": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]
}
},
"__uuid": {
"schemaName": "uuidT",
"schemaNamespace": "org.kaaproject.configuration",
"value": [1,2,3,4,5,6,7,1,1,1,11,1,1,14,15,16]
}
}
In order to access to the received data, do following:
ConfigurationDelta rootDelta = // obtained from a delta receiver;
if (rootDelta.hasChanged("testField1")) {
DeltaType dt = rootDelta.getDeltaType("testField1");
String testField1 = (String)dt.getNewValue();
System.out.println("testField1: " + testField1);
}
DeltaType subrecordDT = rootDelta.getDeltaType("testField2");
if (subrecordDT != null) {
ConfigurationDelta testField2 = (ConfigurationDelta)subrecordDT.getNewValue();
if (testField2 != null) {
Integer testField3 = (Integer)testField2.getDeltaType("testField3").getNewValue();
System.out.println("testField3: " + testField3);
}
}
ConfigurationDelta
,
DeltaType
,
DeltaManager
,
DeltaReceiver
Copyright © 2015. All rights reserved.