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

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


        });

        serverList.getSelectionModel().addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
            @Override
            public void onSelectionChange(SelectionChangeEvent event) {
                ServerInstance server = getSelectedServer();
                presenter.onServerSelected(getSelectedHost(), getSelectedServer());
                updateDisplay();
            }
        });


        HorizontalPanel millerHeader = new HorizontalPanel();
        Label host = new Label("Host");
        millerHeader.add(host);
        Label server = new Label("Server");

        millerHeader.add(server);
        millerHeader.getElement().setAttribute("style", "width:100%;border-bottom:1px solid #A7ABB4");

        host.getElement().getParentElement().setAttribute("width", "50%");
        server.getElement().getParentElement().setAttribute("width", "50%");


        layout.add(millerHeader);

        millerHeader.getElement().addClassName("cellTableHeader");
View Full Code Here


                        public void onSuccess(DMRResponse result) {

                            ModelNode statusResponse = ModelNode.fromBase64(result.getResponseText());
                            ModelNode payload = statusResponse.get("result");

                            ServerInstance instance = factory.serverInstance().as();
                            instance.setName(handle.getName());
                            instance.setRunning(payload.asString().equals("STARTED"));
                            instance.setServer(handle.getName());
                            instance.setGroup(handle.getGroup());

                            instanceList.add(instance);

                            if(instanceList.size() == serverNames.size())
                                callback.onSuccess(instanceList);
View Full Code Here

                        if(!serverSelection.hasSetServer())
                        {
                            if(!server.isEmpty())
                            {
                                final ServerInstance serverInstance = server.get(0);
                                Console.info("Default server selection: " + serverInstance.getName());

                                Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
                                    @Override
                                    public void execute() {
View Full Code Here

                        @Override
                        public void onFailure(Throwable caught) {
                            numResponses++;

                            ServerInstance instance = createInstanceModel(handle);
                            instance.setRunning(false);
                            instanceList.add(instance);

                            checkComplete(instanceList, callback);
                        }

                        @Override
                        public void onSuccess(DMRResponse result) {

                            numResponses++;

                            ModelNode statusResponse = result.get();
                            ModelNode payload = statusResponse.get(RESULT);

                            ServerInstance instance = createInstanceModel(handle);
                            instanceList.add(instance);

                            if(statusResponse.isFailure())
                            {
                                instance.setRunning(false);
                            }
                            else
                            {
                                instance.setRunning(handle.isStarted());

                                if(payload.hasDefined("server-state"))
                                {
                                    String state = payload.get("server-state").asString();
                                    if(state.equals("reload-required"))
                                    {
                                        instance.setFlag(ServerFlag.RELOAD_REQUIRED);
                                    }
                                    else if (state.equals("restart-required"))
                                    {
                                        instance.setFlag(ServerFlag.RESTART_REQUIRED);
                                    }
                                }

                            }
View Full Code Here

            callback.onSuccess(instanceList);
        }
    }

    private ServerInstance createInstanceModel(Server handle) {
        ServerInstance instance = factory.serverInstance().as();
        instance.setName(handle.getName());
        instance.setServer(handle.getName());
        instance.setGroup(handle.getGroup());
        return instance;
    }
View Full Code Here

        List<Server> servers = serverModel.get(host);
        return servers != null ? servers : new ArrayList<Server>();
    }

    public ServerInstance getServerInstance(String name) {
        ServerInstance match = null;
        for(ServerInstance server : instanceModel.get(hostStore.getSelectedHost()))
        {
            if(server.getName().equals(name))
            {
                match = server;
View Full Code Here

        final Function<FunctionContext> f2 = new Function<FunctionContext>() {
            @Override
            public void execute(final Control<FunctionContext> control) {
                final String serverSelection = hostStore.getSelectedServer();
                ServerInstance server = serverStore.getServerInstance(serverSelection);
                serverGroupStore.loadServerGroup(server.getGroup(), new PushFlowCallback<ServerGroupRecord>(control));
            }
        };
        final Function<FunctionContext> f3 = new Function<FunctionContext>() {
            @Override
            public void execute(final Control<FunctionContext> control) {
View Full Code Here

            hostInfoStore.loadServerInstances(currentServerGroup.getName(), new SimpleCallback<List<ServerInstance>>()
            {
                @Override
                public void onSuccess(final List<ServerInstance> result)
                {
                    ServerInstance hit = null;
                    for (Iterator<ServerInstance> iterator = result.iterator(); iterator.hasNext() && hit == null; )
                    {
                        hit = matchingServer(iterator.next());
                    }
                    if (hit != null)
                    {
                        // Try to get real deployment data from this server
                        final ServerInstance finalHit = hit;
                        deploymentStore.loadDeployments(finalHit, new SimpleCallback<List<DeploymentRecord>>()
                        {
                            @Override
                            public void onSuccess(final List<DeploymentRecord> result)
                            {
                                deploymentBrowser.updateDeployments(result);
                                if (!result.isEmpty())
                                {
                                    description.setText(
                                            "Deployments assigned to this server group (Reference server: " + finalHit
                                                    .getName() + ").");
                                }
                            }
                        });
                    }
View Full Code Here

        @Override
        public void execute(final Control<FunctionContext> control) {
            List<HostInfo> hosts = control.getContext().get(TopologyFunctions.HOSTS_KEY);
            for (HostInfo host : hosts) {
                for (Iterator<ServerInstance> iterator = host.getServerInstances().iterator(); iterator.hasNext(); ) {
                    ServerInstance serverInstance = iterator.next();
                    if (!profile.equals(serverInstance.getProfile())) {
                        iterator.remove();
                    }
                }
            }
            for (Iterator<HostInfo> iterator = hosts.iterator(); iterator.hasNext(); ) {
View Full Code Here

            for (Iterator<HostInfo> hIterator = hosts.iterator(); hIterator.hasNext() && !runningServer; ) {
                HostInfo host = hIterator.next();
                List<ServerInstance> serverInstances = host.getServerInstances();
                for (Iterator<ServerInstance> siIterator = serverInstances.iterator();
                        siIterator.hasNext() && !runningServer; ) {
                    ServerInstance serverInstance = siIterator.next();
                    runningServer = serverInstance.isRunning();
                }
            }
            if (runningServer) {
                control.proceed();
            } else {
View Full Code Here

TOP

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

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.