LOGGER.error("Setting state was interrupted.", e);
}
}
+ private class PropertyRunnable implements Runnable {
+ String key;
+ StatePropertyNode propertyNode;
+
+ public PropertyRunnable(String key) {
+ this.key = key;
+ }
+
+ @Override
+ public void run() {
+ StateRootNode rootNode = (StateRootNode) getRoot();
+ propertyNode = rootNode.getProperty(key);
+ }
+ }
+
+ public StatePropertyNode getState(String key) {
+ try {
+ PropertyRunnable r = new PropertyRunnable(key);
+ getRealm().syncExec(r);
+ return r.propertyNode;
+ } catch (InterruptedException e) {
+ LOGGER.error("Getting state was interrupted.", e);
+ return null;
+ }
+ }
public byte[] serialize() {
final byte [][] result = new byte[1][];