Package org.jayasoft.woj.common.services.internal

Examples of org.jayasoft.woj.common.services.internal.ClusterMasterTargetServerProvider


public class ClusterTargetServerProvider extends TestCase {
    public void test() throws Exception {
        Server server1 = new Server(new URL("http://127.0.0.1:8080/woj-server"));
        Server server2 = new Server(new URL("http://127.0.0.1:8080/woj-server2"));
        Server server3 = new Server(new URL("http://127.0.0.1:8080/"));
        ClusterMasterTargetServerProvider tsp = new ClusterMasterTargetServerProvider(new WOJCluster(Arrays.asList(new Server[] {
                server1,
                server2,
                server3})));
        assertTrue(server1 == tsp.getFirstTargetServer());
        assertTrue(tsp.hasNext());
        assertTrue(server1 == tsp.getNextTargetServer());
        assertTrue(tsp.hasNext());
        assertTrue(server2 == tsp.getNextTargetServer());
        assertTrue(tsp.hasNext());
        assertTrue(server3 == tsp.getNextTargetServer());
        assertFalse(tsp.hasNext());
    }
View Full Code Here


    private TargetServerProvider _masterServerProvider;
   
    public BasicServerServicesProvider(WOJCluster server) {
        _server = server;
        _currentServerProvider = new ClusterCurrentTargetServerProvider(_server);
        _masterServerProvider = new ClusterMasterTargetServerProvider(_server);
    }
View Full Code Here

TOP

Related Classes of org.jayasoft.woj.common.services.internal.ClusterMasterTargetServerProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.