Package org.jboss.as.console.client.domain.model

Examples of org.jboss.as.console.client.domain.model.Host


    public void defaultHostSelection() {

        if(hostProvider.getList().size()>0)
        {
            Host defaultHost = hostList.getVisibleItem(0);
            Log.debug("Select default host: "+defaultHost.getName());
            selectHost(defaultHost);
        }
    }
View Full Code Here


    public void getHosts(final AsyncCallback<HostList> callback) {
        hostInfo.getHosts(new SimpleCallback<List<Host>>() {
            @Override
            public void onSuccess(List<Host> hosts) {
                Host host = getSelectedHost(hosts);
                callback.onSuccess(new HostList(host, hosts));
            }
        });
    }
View Full Code Here

    }

    private Host getSelectedHost(List<Host> hosts) {
        assert !hosts.isEmpty();

        Host matched = null;

        // match by preselection
        for(Host host : hosts)
        {
            if(host.getName().equals(selectedHost))
            {
                matched = host;
                break;
            }
        }

        // fallback match
        if(null==matched)
            matched = hosts.get(0);

        selectedHost = matched.getName();

        return matched;
    }
View Full Code Here

                List<Property> hostModels = response.get("result").asPropertyList();

                List<Host> records = new LinkedList<Host>();
                for(Property hostModel : hostModels)
                {
                    Host record = factory.host().as();
                    record.setName(hostModel.getName());

                    // controller
                    ModelNode hostValues = hostModel.getValue();
                    boolean isController = hostValues.get("domain-controller").hasDefined("local");
                    record.setController(isController);
                    records.add(record);
                }

                callback.onSuccess(records);
            }
View Full Code Here

            @Override
            public void onSelectionChange(SelectionChangeEvent event) {

                serverProvider.setList(Collections.EMPTY_LIST);

                Host selectedHost = getSelectedHost();

                Console.MODULES.getEventBus().fireEvent(
                        new GlobalHostSelection(selectedHost.getName())
                );

                if(selectedHost!=null)
                {
                    presenter.loadServer(selectedHost.getName());
                }

            }
        });

        serverList.getSelectionModel().addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
            @Override
            public void onSelectionChange(SelectionChangeEvent event) {
                ServerInstance server = getSelectedServer();
                Host selectedHost = getSelectedHost();

                if(selectedHost!=null &server!=null)
                {
                    presenter.onServerSelected(selectedHost, server);
                    updateDisplay();
View Full Code Here

    public void defaultHostSelection() {

        if(hostProvider.getList().size()>0)
        {
            Host defaultHost = hostList.getVisibleItem(0);
            Log.debug("Select default host: "+defaultHost.getName());
            selectHost(defaultHost);
        }
    }
View Full Code Here

                List<ModelNode> payload = response.get("result").asList();

                List<Host> records = new ArrayList<Host>(payload.size());
                for(int i=0; i<payload.size(); i++)
                {
                    Host record = factory.host().as();
                    record.setName(payload.get(i).asString());
                    records.add(record);
                }

                callback.onSuccess(records);
            }
View Full Code Here

                List<Property> hostModels = response.get("result").asPropertyList();

                List<Host> records = new LinkedList<Host>();
                for(Property hostModel : hostModels)
                {
                    Host record = factory.host().as();
                    record.setName(hostModel.getName());

                    // controller
                    ModelNode hostValues = hostModel.getValue();
                    boolean isController = hostValues.get("domain-controller").hasDefined("local");
                    record.setController(isController);
                    records.add(record);
                }

                callback.onSuccess(records);
            }
View Full Code Here

    public void getHosts(final AsyncCallback<HostList> callback) {
        hostInfo.getHosts(new SimpleCallback<List<Host>>() {
            @Override
            public void onSuccess(List<Host> hosts) {
                Host host = getSelectedHost(hosts);
                callback.onSuccess(new HostList(host, hosts));
            }
        });
    }
View Full Code Here

    }

    private Host getSelectedHost(List<Host> hosts) {
        assert !hosts.isEmpty();

        Host matched = null;

        // match by preselection
        for(Host host : hosts)
        {
            if(host.getName().equals(selectedHost))
            {
                matched = host;
                break;
            }
        }

        // fallback match
        if(null==matched)
            matched = hosts.get(0);

        selectedHost = matched.getName();

        return matched;
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.console.client.domain.model.Host

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.