Package org.jboss.as.domain.controller

Examples of org.jboss.as.domain.controller.SlaveRegistrationException


            if(result != null && ! result.isOK()) {
                switch (result.getCode()) {
                    case HOST_ALREADY_EXISTS:
                        throw new HostAlreadyExistsException(result.getMessage());
                    default:
                        throw new IOException(new SlaveRegistrationException(result.getCode(), result.getMessage()).marshal());
                }
            }
        }
        if(connected) {
            // Setup the transaction protocol handler
View Full Code Here


            if(result != null && ! result.isOK()) {
                switch (result.getCode()) {
                    case HOST_ALREADY_EXISTS:
                        throw new HostAlreadyExistsException(result.getMessage());
                    default:
                        throw new IOException(new SlaveRegistrationException(result.getCode(), result.getMessage()).marshal());
                }
            }
        }
        if(connected) {
            // Setup the transaction protocol handler
View Full Code Here

            if(result != null && ! result.isOK()) {
                switch (result.getCode()) {
                    case HOST_ALREADY_EXISTS:
                        throw new HostAlreadyExistsException(result.getMessage());
                    default:
                        throw new IOException(new SlaveRegistrationException(result.getCode(), result.getMessage()).marshal());
                }
            }
        }
        if(connected) {
            // Setup the transaction protocol handler
View Full Code Here

             byte param = input.readByte();
             // If it failed
             if(param != DomainControllerProtocol.PARAM_OK) {
                 final byte errorCode = input.readByte();
                 final String message =  input.readUTF();
                 resultHandler.failed(new SlaveRegistrationException(SlaveRegistrationException.ErrorCode.parseCode(errorCode), message));
                 return;
             }
             final ModelNode extensions = new ModelNode();
             extensions.readExternal(input);
             context.executeAsync(new ManagementRequestContext.AsyncTask<Void>() {
View Full Code Here

             byte param = input.readByte();
             // If it failed
             if(param != DomainControllerProtocol.PARAM_OK) {
                 final byte errorCode = input.readByte();
                 final String message =  input.readUTF();
                 resultHandler.failed(new SlaveRegistrationException(SlaveRegistrationException.ErrorCode.parseCode(errorCode), message));
                 return;
             }
             final ModelNode domainModel = new ModelNode();
             domainModel.readExternal(input);
             context.executeAsync(new ManagementRequestContext.AsyncTask<Void>() {
                 @Override
                 public void execute(ManagementRequestContext<Void> voidManagementRequestContext) throws Exception {
                     // Apply the domain model
                     final boolean success = applyDomainModel(domainModel);
                     if(success) {
                         channelHandler.executeRequest(context.getOperationId(), new CompleteRegistrationRequest(DomainControllerProtocol.PARAM_OK));
                     } else {
                         channelHandler.executeRequest(context.getOperationId(), new CompleteRegistrationRequest(DomainControllerProtocol.PARAM_ERROR));
                         resultHandler.failed(new SlaveRegistrationException(SlaveRegistrationException.ErrorCode.UNKNOWN, ""));
                     }
                 }
             });
         }
View Full Code Here

             final byte param = input.readByte();
             // If it failed
             if(param != DomainControllerProtocol.PARAM_OK) {
                 final byte errorCode = input.readByte();
                 final String message =  input.readUTF();
                 resultHandler.failed(new SlaveRegistrationException(SlaveRegistrationException.ErrorCode.parseCode(errorCode), message));
                 return;
             }
             resultHandler.done(null);
         }
View Full Code Here

        } catch (IOException e) {
            ROOT_LOGGER.cannotConnect(host.getHostAddress(), port);
            throw new IllegalStateException(e);
        }

        SlaveRegistrationException error = null;
        try {
            error = new RegisterModelControllerRequest().executeForResult(handler, channel, null);
        } catch (Exception e) {
            ROOT_LOGGER.errorRetrievingDomainModel(host.getHostAddress(), port, e.getLocalizedMessage());
            throw new IllegalStateException(e);
        }

        if (error != null) {
            if (error.getErrorCode() == ErrorCode.HOST_ALREADY_EXISTS) {
                throw new HostAlreadyExistsException(error.getErrorMessage());
            }
            throw new IllegalStateException(error.getErrorMessage());
        }

    }
View Full Code Here

TOP

Related Classes of org.jboss.as.domain.controller.SlaveRegistrationException

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.