Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * JBoss, Home of Professional Open Source.
   * Copyright 2011, Red Hat, Inc., and individual contributors
   * as indicated by the @author tags. See the copyright.txt file in the
   * distribution for a full listing of individual contributors.
   *
   * This is free software; you can redistribute it and/or modify it
   * under the terms of the GNU Lesser General Public License as
   * published by the Free Software Foundation; either version 2.1 of
  * the License, or (at your option) any later version.
  *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
 
 package org.jboss.as.host.controller.operations;
 
 import java.util.List;
 

Author(s):
Emanuel Muckenhuber
Darran Lofthouse
 
 
     public static final String OPERATION_NAME = .;
 
 
 
 
     public NativeManagementAddHandler(final LocalHostControllerInfoImpl hostControllerInfo) {
         this. = hostControllerInfo;
     }
 
     protected void populateModel(ModelNode operationModelNode modelthrows OperationFailedException {
 
             attr.validateAndSet(operationmodel);
         }
     }
 
     @Override
     protected boolean requiresRuntime(OperationContext context) {
         return true;
     }
 
     @Override
     protected void performRuntime(final OperationContext contextfinal ModelNode operationfinal ModelNode model,
                                   final ServiceVerificationHandler verificationHandler,
                                   final List<ServiceController<?>> newControllersthrows OperationFailedException {
 
         populateHostControllerInfo(contextmodel);
         final ServiceTarget serviceTarget = context.getServiceTarget();
 
         final boolean onDemand = context.isBooting();
         NativeManagementServices.installRemotingServicesIfNotInstalled(serviceTarget.getLocalHostName(), verificationHandlernewControllerscontext.getServiceRegistry(false), onDemand);
 
         installNativeManagementServices(serviceTargetverificationHandlernewControllersonDemand);
     }
 
     static void populateHostControllerInfo(LocalHostControllerInfoImpl hostControllerInfoOperationContext contextModelNode modelthrows OperationFailedException {
         final ModelNode portNode = ..resolveModelAttribute(contextmodel);
         hostControllerInfo.setNativeManagementPort(portNode.isDefined() ? portNode.asInt() : -1);
         final ModelNode realmNode = ..resolveModelAttribute(contextmodel);
         hostControllerInfo.setNativeManagementSecurityRealm(realmNode.isDefined() ? realmNode.asString() : null);
     }
 
     public static void installNativeManagementServices(final ServiceTarget serviceTargetfinal LocalHostControllerInfo hostControllerInfo,
                                                        final ServiceVerificationHandler verificationHandler,
                                                        final List<ServiceController<?>> newControllers,
                                                        final boolean onDemand) {
 
         String nativeSecurityRealm = hostControllerInfo.getNativeManagementSecurityRealm();
 
         final ServiceName nativeManagementInterfaceBinding =
                ..append(hostControllerInfo.getNativeManagementInterface());
        ManagementRemotingServices.installDomainConnectorServices(serviceTarget.,
                nativeManagementInterfaceBindinghostControllerInfo.getNativeManagementPort(), nativeSecurityRealm.verificationHandlernewControllers);
    }
New to GrepCode? Check out our FAQ X