Example usage for weka.gui.beans BeanInstance getBean

List of usage examples for weka.gui.beans BeanInstance getBean

Introduction

In this page you can find the example usage for weka.gui.beans BeanInstance getBean.

Prototype

public Object getBean() 

Source Link

Document

Gets the bean encapsulated in this instance

Usage

From source file:org.pentaho.dm.plugins.kf.KettleInject.java

License:Open Source License

public void waitWhileFlowBusy(Vector flow) {
    // poll the beans periodically to see if there are any
    // that are still busy
    while (true) {
        boolean busy = false;
        for (int i = 0; i < flow.size(); i++) {
            BeanInstance bi = (BeanInstance) flow.elementAt(i);
            if (bi.getBean() instanceof BeanCommon) {
                if (((BeanCommon) bi.getBean()).isBusy()) {
                    busy = true;/*  w  w  w  . ja va 2  s.  com*/
                    break; // for
                }
            }
        }
        if (busy) {
            // wait a bit...
            try {
                Thread.sleep(3000);
            } catch (InterruptedException ex) {
                // ignore.
            }
        } else {
            break; // while
        }
    }
}