private void createClusterManagerElement() { ConfigElementFactory factory = new ConfigElementFactory(mBroker.getRepository().getAllLatest()); ConfigElement cluster_manager = factory.create("Sample Cluster", "cluster_manager"); for (Enumeration e = mNodesListModel.elements(); e.hasMoreElements(); ) { cluster_manager.addProperty("cluster_node", (String) e.nextElement()); } cluster_manager.addProperty("plugin_path", "${VJ_BASE_DIR}/lib/gadgeteer/plugins/"); cluster_manager.addProperty("plugin", "RemoteInputManager"); cluster_manager.addProperty("plugin", "ApplicationDataManager"); mBroker.add(mContext, cluster_manager); }
public void init(Map whiteboard) { mWhiteBoard = whiteboard; // Get handle to broker mBroker = new ConfigBrokerProxy(); // Create a context mContext = (ConfigContext) mWhiteBoard.get("context"); mNodesListModel = new ConfigPtrListModel(mContext); mNodesListModel.addElementType(CLUSTER_NODE_TYPE); mBroker.addConfigListener(mNodesListModel); lstNodes.setModel(mNodesListModel); mHostnameField.setText(""); }