Search in sources :

Example 1 with BrokerMonitorPartHelper

use of com.cubrid.cubridmanager.ui.mondashboard.editor.parts.helper.BrokerMonitorPartHelper in project cubrid-manager by CUBRID.

the class BrokerDataProvider method setDefaultValue.

/**
	 * 
	 * Set default value
	 * 
	 */
private void setDefaultValue() {
    isExecGetBrokerTask = false;
    errorMsg = "";
    if (brokerNodeList == null || brokerNodeList.isEmpty()) {
        return;
    }
    BrokerNode brokerNode = null;
    for (BrokerNode node : brokerNodeList) {
        if (node.getParent().isConnected()) {
            brokerNode = node;
            break;
        }
    }
    if (brokerNode == null) {
        return;
    }
    HostNode hostNode = brokerNode.getParent();
    if (hostNode != null && hostNode.isConnected()) {
        List<DataUpdateListener> listenerList = generator.getListeners();
        for (DataUpdateListener listener : listenerList) {
            if (listener instanceof BrokerMonitorPartHelper || listener instanceof BrokerDashboardViewPart) {
                isExecGetBrokerTask = true;
                break;
            }
        }
        serverInfo = hostNode.getServerInfo();
    }
    StringBuffer strBuff = new StringBuffer();
    for (BrokerNode node : brokerNodeList) {
        strBuff.append(node.getBrokerName());
        strBuff.append(",");
    }
    strBuff = strBuff.deleteCharAt(strBuff.length() - 1);
    allBrokersStr = strBuff.toString();
}
Also used : BrokerNode(com.cubrid.cubridmanager.ui.mondashboard.editor.model.BrokerNode) BrokerDashboardViewPart(com.cubrid.cubridmanager.ui.mondashboard.editor.BrokerDashboardViewPart) HostNode(com.cubrid.cubridmanager.ui.mondashboard.editor.model.HostNode) BrokerMonitorPartHelper(com.cubrid.cubridmanager.ui.mondashboard.editor.parts.helper.BrokerMonitorPartHelper)

Aggregations

BrokerDashboardViewPart (com.cubrid.cubridmanager.ui.mondashboard.editor.BrokerDashboardViewPart)1 BrokerNode (com.cubrid.cubridmanager.ui.mondashboard.editor.model.BrokerNode)1 HostNode (com.cubrid.cubridmanager.ui.mondashboard.editor.model.HostNode)1 BrokerMonitorPartHelper (com.cubrid.cubridmanager.ui.mondashboard.editor.parts.helper.BrokerMonitorPartHelper)1