src/main/java/com/kaazing/staf_aeron/YAMLTestCase.java
// hosts in the master host list (staticHosts) are active for use when starting stand alone media drivers.
hosts in the master host list (staticHosts) are active for use when starting stand alone media drivers.
hosts in the master host list ( staticHosts ) are active for use when starting stand alone media drivers .
public void loadHosts(STAFHosts staticHosts){
        if((hosts.size() != properties.size()) && (hosts.size() != options.size())) {
            System.out.println("OH NO we didnt produce same size arrays for hosts options and properties!");
        }
        stafHosts = new ArrayList<STAFHost>();
        int count = 0;
        for (String s : hosts){
            for (STAFHost h : staticHosts.getHosts()){
                if(h.getHostName().equalsIgnoreCase(s)){
                    STAFHost testHost = new STAFHost(h);
                    testHost.setProperties(this.properties.get(count));
                    testHost.setOptions(this.options.get(count));
                    switch(testHost.getOS().toLowerCase()){
                        case "linux":
                            testHost.setPathSeperator("/");
                            break;
                        case "windows":
                            testHost.setPathSeperator("\\");
                            break;
                        default:
                            testHost.setPathSeperator("/");
                            break;
                    }
                    count++;
                    stafHosts.add(testHost);
                    h.setActive(true);
                    break;
                }
            }
        }
        System.out.println(stafHosts.toString());
    }
public void loadHosts ( STAFHosts staticHosts ) { if ( ( hosts . size ( ) != properties . size ( ) ) && ( hosts . size ( ) != options . size ( ) ) ) { System . out . println ( "OH NO we didnt produce same size arrays for hosts options and properties!" ) ; } stafHosts = new ArrayList < STAFHost > ( ) ; int count = 0 ; for ( String s : hosts ) { for ( STAFHost h : staticHosts . getHosts ( ) ) { if ( h . getHostName ( ) . equalsIgnoreCase ( s ) ) { STAFHost testHost = new STAFHost ( h ) ; testHost . setProperties ( this . properties . get ( count ) ) ; testHost . setOptions ( this . options . get ( count ) ) ; switch ( testHost . getOS ( ) . toLowerCase ( ) ) { case "linux" : testHost . setPathSeperator ( "/" ) ; break ; case "windows" : testHost . setPathSeperator ( "\\" ) ; break ; default : testHost . setPathSeperator ( "/" ) ; break ; } count ++ ; stafHosts . add ( testHost ) ; h . setActive ( true ) ; break ; } } } System . out . println ( stafHosts . toString ( ) ) ; }
hosts in the master host list (staticHosts) are active for use when starting stand alone media drivers.
hosts in the master host list ( staticHosts ) are active for use when starting stand alone media drivers .