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

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


                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


        serverProvider.addDataDisplay(serverList);

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

                if(selectedHost!=null)
                {
                    if(!preventRefreshServerList)
                        presenter.loadServer(selectedHost.getName());
                }
                else if(selectedHost==null)
                {
                    serverProvider.setList(Collections.EMPTY_LIST);
                }



            }
        });

        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<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

                    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 = 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

            @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

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.