Package org.jayasoft.woj.common.model

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


            WOJServer.getInstance().updateMasterState();
        }
    }

    public Server getMaster() {
        Server master = getCurrentMaster();
        if (master == null) {
            LOGGER.debug("master server is not known, triggering election");
            election();
            // we wait for the election to finish
            synchronized (this) {
View Full Code Here


        }
    }
   
    public synchronized void reset() {
        _todo.clear();
        Server firstTargetServer = getFirstTargetServer();
        _todo.add(firstTargetServer);
        List servers = _cluster.getServers();
        for (Iterator iter = servers.iterator(); iter.hasNext();) {
            Server server = (Server)iter.next();
            if (!firstTargetServer.equals(server)) {
                _todo.add(server);
            }
        }
    }
View Full Code Here

public class DispatchServiceImpl extends AbstractDispatchService implements DispatchService {
    private final static Logger LOGGER = LoggingManager.getLogger(DispatchServiceImpl.class.getName());   

    protected ContentReference dispatch(UAK uak, String visibility, String org, String mod, String rev, String path) {
        String request = getRequest(uak, visibility, org, mod, rev, path);
        Server master = WOJServer.getInstance().getServerManagementService().getCurrentMaster();
        if (master == null) {
            LOGGER.info("impossible to forward "+request+" to master, we don't know who it is");
            throw new IllegalStateException("master is not known for the moment, impossible to forward a request");
        } else {
            LOGGER.info("forwarding "+request+" to master: "+master);
View Full Code Here

    public WojConsole(WojToolsSettings settings) throws MalformedURLException {
        super("WOJ Crude Module Builder");
       
        _settings = settings;       
        UnifiedAuthentificationService.getInstance().setLoginInfo(_settings.getUserName(), _settings.getPassword(), getVersion());
    UnifiedAuthentificationService.getInstance().setAuthentificationServer(new Server(new URL(_settings.getServer())));
   
        _dlexplorer = new DLExplorer(_settings.getDLDir().getPath(), _settings.getDescriptorsDir().getPath());
        _moduleBuilder = new FromDLModuleBuilder(_dlexplorer, ClientServerServicesProvider.get(_settings.getServer()).getModuleManagementService(), _settings.getModulesDir());
        _analyzer = new DLAnalyzer(_dlexplorer);
    setLayout(new BorderLayout());
View Full Code Here

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

    }
   
    public static ServerServicesProvider get(String serverUrlString) {
        try {
            URL serverFullURL = new URL(serverUrlString);
            return get(new Server(serverFullURL.getHost(), serverFullURL.getPort(), serverFullURL.getPath()));
        } catch (MalformedURLException e) {
            throw new IllegalArgumentException("MalformedURL :"+serverUrlString+" unable to obtain woj server service");
        }
    }
View Full Code Here

        LOGGER.info("syncing with master");
        syncWith(WOJServer.getInstance().getMaster(), false);
    }

    public void syncServers() {
        Server master = WOJServer.getInstance().getMaster();
        syncPrivateKey(master, false);
        syncServers(master, false);
    }
View Full Code Here

        syncPrivateKey(master, false);
        syncServers(master, false);
    }

    public void syncPrivateKey() {
        Server master = WOJServer.getInstance().getMaster();
        syncServers(master, false);
    }
View Full Code Here

        Server master = WOJServer.getInstance().getMaster();
        syncServers(master, false);
    }
   
    public void syncModules() {
        Server master = WOJServer.getInstance().getMaster();
        syncModuleDescriptors(master, false);
    }
View Full Code Here

TOP

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

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.