1 package org.simantics.document.server.state;
3 import java.util.function.Function;
5 import org.simantics.simulator.toolkit.StandardNodeManager;
6 import org.simantics.simulator.toolkit.StandardRealm;
7 import org.slf4j.Logger;
8 import org.slf4j.LoggerFactory;
10 public class StateRealm extends StandardRealm<StateNode, StateNodeManagerSupport> {
12 private static final Logger LOGGER = LoggerFactory.getLogger(StateRealm.class);
14 protected StateRealm(StateNodeManagerSupport engine, String id) {
19 public Logger getLogger() {
24 protected StandardNodeManager<StateNode, StateNodeManagerSupport> createManager() {
25 return new StateNodeManager(this, new StateRootNode());
29 public void asyncExec(Function fun) {
32 } catch (InterruptedException e) {
33 LOGGER.error("Execution interrupted.", e);
38 public void asyncExec(Runnable runnable) {
41 } catch (InterruptedException e) {
42 LOGGER.error("Execution interrupted.", e);