Package org.jayasoft.woj.common.model

Examples of org.jayasoft.woj.common.model.WOJCluster


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());
View Full Code Here


   
    public void execute() throws BuildException {
        checkAttributes();
        log("connecting to woj");

        WOJCluster cluster = WOJClusterHelper.buildCluster(3);
        log("using cluster "+cluster+" to access WOJ", Project.MSG_VERBOSE);
        ClientServerServicesProvider ssp = ClientServerServicesProvider.get(cluster);
        UnifiedAuthentificationService.getInstance().setAuthentificationCluster(cluster);
        UnifiedAuthentificationService.getInstance().setLoginInfo(getUser(), getPasswd(), WojAntPlugin.getPluginVersion());
        Authentification auth;
View Full Code Here

        initWojConnectivity();
        addModuleToWoj(buildZip());
    }
   
    private void initWojConnectivity() {
        WOJCluster cluster = WOJClusterHelper.buildCluster(3);
        log("using cluster "+cluster+" to access WOJ", Project.MSG_VERBOSE);
        ClientServerServicesProvider ssp = ClientServerServicesProvider.get(cluster);
        UnifiedAuthentificationService.getInstance().setAuthentificationCluster(cluster);
        UnifiedAuthentificationService.getInstance().setLoginInfo(getUser(), getPasswd(), WojAntPlugin.getPluginVersion());
        _mms = ssp.getModuleManagementService();
View Full Code Here

    private ClientServerServicesProvider _serverServicesProvider;
    private Preferences _preferences = null;
   
    private WojServicesAccess() {
        _cluster = WOJClusterHelper.buildCluster(3);
        _authCluster = new WOJCluster((WOJCluster)_cluster);
        // If we are not in dev mode we ensure that the first used server to login is http://login.worldofjava.org
        //MM removed since it not compatible with WOJ EE
//        if (!WojUtil.isDevMode()) {
//            try {
//                _authCluster.setCurrent(new Server(new URL(LOGIN_SERVER_ADRESS)));
View Full Code Here

    public static ClientServerServicesProvider get(WOJCluster cluster) {
        return new ClientServerServicesProvider(cluster);
    }
   
    public static ClientServerServicesProvider get(Server server) {
        return get(new WOJCluster(Collections.singletonList(server)));
    }
View Full Code Here

    public WOJCluster getAuthentificationCluster() {
        return _authentificationCluster;
    }

    public void setAuthentificationServer(Server authentificationServer) {
        _authentificationCluster = authentificationServer == null ? null : new WOJCluster(Collections.singletonList(authentificationServer));
    }
View Full Code Here

                return uakProvider.getUAK();
            }
        }

        private UAKProvider getCurrentUAKProvider() {
            WOJCluster authentificationCluster = getAuthentificationCluster();
            if (authentificationCluster != null) {
                if (_ssp.getCluster().equals(authentificationCluster)) {
                    return _ssp.getAuthentificationService();
                } else {
                    return new BasicServerServicesProvider(authentificationCluster).getAuthentificationService();
View Full Code Here

    public static ServerServicesProvider get(WOJCluster cluster) {
        return new ServerServicesProvider(cluster);
    }
   
    public static ServerServicesProvider get(Server server) {
        return get(new WOJCluster(Collections.singletonList(server)));
    }
View Full Code Here

TOP

Related Classes of org.jayasoft.woj.common.model.WOJCluster

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.