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

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


                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


    }

    public void setHosts(List<Host> hosts) {


        Host previousHost = serverSelection.getSelectedHost();

        serverSelection.setHosts(hosts);

        if(null==previousHost)
        {
View Full Code Here

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

                List<Host> records = new LinkedList<Host>();
                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

            @Override
            public void onSelectionChange(SelectionChangeEvent event) {

                serverProvider.setList(Collections.EMPTY_LIST);

                Host selectedHost = getSelectedHost();

                if(selectedHost!=null)
                {
                    Console.MODULES.getEventBus().fireEvent(
                            new GlobalHostSelection(selectedHost.getName())
                    );

                    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 getHosts(final AsyncCallback<HostList> callback) {
        hostInfo.getHosts(new SimpleCallback<List<Host>>() {
            @Override
            public void onSuccess(List<Host> hosts) {
                Host host = null;
                try {
                    host = getSelectedHost(hosts);
                    callback.onSuccess(new HostList(host, hosts));
                } catch (RuntimeException e) {
                    callback.onFailure(e);
View Full Code Here

    private Host getSelectedHost(List<Host> hosts) {

        if(hosts.isEmpty()) throw new NoHostsAvailable();

        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

                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

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.