Package org.jboss.as.controller

Examples of org.jboss.as.controller.ProxyController


    ProxyController getProxyController(final ListIterator<PathElement> iterator, final String child) {

        final RegistrySearchControl searchControl = new RegistrySearchControl(iterator, child);

        // First search the non-wildcard child; if not found, search the wildcard child
        ProxyController result = null;

        if (searchControl.getSpecifiedRegistry() != null) {
            result = searchControl.getSpecifiedRegistry().getProxyController(searchControl.getIterator());
        }
View Full Code Here


                    remoteHosts.addAll(hostProxies.keySet());
                }

                Map<String, ProxyController> remoteProxies = new HashMap<String, ProxyController>();
                for (String host : remoteHosts) {
                    ProxyController proxy = hostProxies.get(host);
                    if (proxy != null) {
                        remoteProxies.put(host, proxy);
                    } else if (!global) {
                        throw MESSAGES.invalidOperationTargetHost(host);
                    }
View Full Code Here

                    if(!task.finalizeTransaction(!rollback)) {
                        try {
                            // Replace the original proxyTask with the requireReloadTask
                            final ServerIdentity identity = entry.getKey();
                            final ModelNode result = task.getUncommittedResult();
                            final ProxyController proxy = task.getProxyController();
                            final Future<ModelNode> future = executorService.submit(new ServerRequireRestartTask(identity, proxy, result));
                            // replace the existing future
                            futures.put(entry.getKey(), future);
                        } catch (Exception ignore) {
                            // getUncommittedResult() won't fail here
View Full Code Here

                HOST_CONTROLLER_LOGGER.tracef("Rollout plan is %s", rolloutPlan);
            }
            final ServerOperationExecutor operationExecutor = new ServerOperationExecutor() {
                @Override
                public ModelNode executeServerOperation(ServerIdentity server, ModelNode operation) {
                    ProxyController proxy = hostProxies.get(server.getHostName());
                    if (proxy == null) {
                        if (localHostName.equals(server.getHostName())) {
                            // Use our server proxies
                            proxy = serverProxies.get(server.getServerName());
                            if (proxy == null) {
View Full Code Here

        op.get(OPERATION_HEADERS, "execute-for-coordinator").set(true);
        op.get(OP_ADDR).setEmptyList();
        op.get(DOMAIN_MODEL).set(modelDescription);

        //TODO get this from somewhere
        final ProxyController proxy = registry.popChannelAndCreateProxy(hostName);

        final AtomicReference<ModelNode> failedRef = new AtomicReference<ModelNode>();
        final AtomicReference<ModelNode> preparedRef = new AtomicReference<ModelNode>();
        final AtomicReference<OperationTransaction> txRef = new AtomicReference<OperationTransaction>();
        ProxyController.ProxyOperationControl control = new ProxyController.ProxyOperationControl() {

            @Override
            public void operationFailed(ModelNode response) {
                failedRef.set(response);
            }

            @Override
            public void operationPrepared(OperationTransaction transaction, ModelNode result) {
                txRef.set(transaction);
                preparedRef.set(result);
            }

            @Override
            public void operationCompleted(ModelNode response) {
            }
        };
        proxy.execute(op, OperationMessageHandler.logging, control, null);

        if (failedRef.get() != null) {
            final ModelNode failed = failedRef.get();
            context.getResult().set(failed.get(RESULT));
            context.getFailureDescription().set(failed.get(FAILURE_DESCRIPTION));
View Full Code Here

    }

    @Override
    public void registerRunningServer(String serverName, Connection connection) {
        final PathElement element = PathElement.pathElement(RUNNING_SERVER, serverName);
        final ProxyController serverController = RemoteProxyController.create(connection, PathAddress.pathAddress(PathElement.pathElement(HOST, name), element));
        registry.registerProxyController(element, serverController);
        model.get(element.getKey(), element.getValue());
    }
View Full Code Here

    ProxyController getProxyController(final ListIterator<PathElement> iterator, final String child) {

        final RegistrySearchControl searchControl = new RegistrySearchControl(iterator, child);

        // First search the non-wildcard child; if not found, search the wildcard child
        ProxyController result = null;

        if (searchControl.getSpecifiedRegistry() != null) {
            result = searchControl.getSpecifiedRegistry().getProxyController(searchControl.getIterator());
        }
View Full Code Here

                HOST_CONTROLLER_LOGGER.tracef("Rollout plan is %s", rolloutPlan);
            }
            final ServerOperationExecutor operationExecutor = new ServerOperationExecutor() {
                @Override
                public ModelNode executeServerOperation(ServerIdentity server, ModelNode operation) {
                    ProxyController proxy = hostProxies.get(server.getHostName());
                    if (proxy == null) {
                        if (localHostName.equals(server.getHostName())) {
                            // Use our server proxies
                            proxy = serverProxies.get(server.getServerName());
                            if (proxy == null) {
View Full Code Here

                PrepareStepHandler.log.trace("Rollout plan is " + rolloutPlan);
            }
            final NewServerOperationExecutor operationExecutor = new NewServerOperationExecutor() {
                @Override
                public ModelNode executeServerOperation(ServerIdentity server, ModelNode operation) {
                    ProxyController proxy = hostProxies.get(server.getHostName());
                    if (proxy == null) {
                        if (localHostName.equals(server.getHostName())) {
                            // Use our server proxies
                            proxy = serverProxies.get(server.getServerName());
                            if (proxy == null) {
View Full Code Here

    private Map<String, ProxyController> getServerProxies(OperationContext context) {
        final Set<String> serverNames = context.readResource(PathAddress.pathAddress(PathElement.pathElement(HOST, localHostInfo.getLocalHostName()))).getChildrenNames(SERVER_CONFIG);
        final Map<String, ProxyController> proxies = new HashMap<String, ProxyController>();
        for(String serverName : serverNames) {
            final PathAddress serverAddress = PathAddress.pathAddress(PathElement.pathElement(HOST, localHostInfo.getLocalHostName()), PathElement.pathElement(SERVER, serverName));
            final ProxyController proxyController = context.getResourceRegistration().getProxyController(serverAddress);
            if(proxyController != null) {
                proxies.put(serverName, proxyController);
            }
        }
        return proxies;
View Full Code Here

TOP

Related Classes of org.jboss.as.controller.ProxyController

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.