public static void installNativeManagementServices(final ServiceTarget serviceTarget, final LocalHostControllerInfo hostControllerInfo, final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> newControllers, final boolean onDemand) { ServiceName realmSvcName = null; String nativeSecurityRealm = hostControllerInfo.getNativeManagementSecurityRealm(); if (nativeSecurityRealm != null) { realmSvcName = SecurityRealmService.BASE_SERVICE_NAME.append(nativeSecurityRealm); } final ServiceName nativeManagementInterfaceBinding = NetworkInterfaceService.JBOSS_NETWORK_INTERFACE.append(hostControllerInfo.getNativeManagementInterface()); ManagementRemotingServices.installDomainConnectorServices(serviceTarget, ManagementRemotingServices.MANAGEMENT_ENDPOINT, nativeManagementInterfaceBinding, hostControllerInfo.getNativeManagementPort(), realmSvcName, CONNECTION_OPTIONS, verificationHandler, newControllers); ManagementRemotingServices.installManagementChannelOpenListenerService(serviceTarget, ManagementRemotingServices.MANAGEMENT_ENDPOINT, ManagementRemotingServices.SERVER_CHANNEL, ServerToHostOperationHandlerFactoryService.SERVICE_NAME, SERVICE_OPTIONS, verificationHandler, newControllers, onDemand); ManagementRemotingServices.installManagementChannelServices(serviceTarget, ManagementRemotingServices.MANAGEMENT_ENDPOINT, new ModelControllerClientOperationHandlerFactoryService(), DomainModelControllerService.SERVICE_NAME, ManagementRemotingServices.MANAGEMENT_CHANNEL, verificationHandler, newControllers); RemotingConnectorService.addService(serviceTarget, verificationHandler); }
@Override protected List<ServiceName> installServices(OperationContext context, NativeInterfaceCommonPolicy commonPolicy, ModelNode model) throws OperationFailedException { populateHostControllerInfo(hostControllerInfo, context, model); final ServiceTarget serviceTarget = context.getServiceTarget(); final boolean onDemand = context.isBooting(); NativeManagementServices.installRemotingServicesIfNotInstalled(serviceTarget, hostControllerInfo.getLocalHostName(), context.getServiceRegistry(false), onDemand); OptionMap options = createConnectorOptions(commonPolicy); final ServiceName nativeManagementInterfaceBinding = context.getCapabilityServiceName("org.wildfly.network.interface", hostControllerInfo.getNativeManagementInterface(), NetworkInterfaceBinding.class); final String securityRealm = commonPolicy.getSecurityRealm(); final String saslAuthenticationFactory = commonPolicy.getSaslAuthenticationFactory(); if (saslAuthenticationFactory == null && securityRealm == null) { ROOT_LOGGER.nativeManagementInterfaceIsUnsecured(); } ServiceName securityRealmName = securityRealm != null ? SecurityRealm.ServiceUtil.createServiceName(securityRealm) : null; ServiceName saslAuthenticationFactoryName = saslAuthenticationFactory != null ? context.getCapabilityServiceName( SASL_AUTHENTICATION_FACTORY_CAPABILITY, saslAuthenticationFactory, SaslAuthenticationFactory.class) : null; String sslContext = commonPolicy.getSSLContext(); ServiceName sslContextName = sslContext != null ? context.getCapabilityServiceName(SSL_CONTEXT_CAPABILITY, sslContext, SSLContext.class) : null; NativeManagementServices.installManagementWorkerService(serviceTarget, context.getServiceRegistry(false)); ManagementRemotingServices.installDomainConnectorServices(context, serviceTarget, ManagementRemotingServices.MANAGEMENT_ENDPOINT, nativeManagementInterfaceBinding, hostControllerInfo.getNativeManagementPort(), options, securityRealmName, saslAuthenticationFactoryName, sslContextName); return Arrays.asList(REMOTING_BASE.append("server", MANAGEMENT_CONNECTOR), nativeManagementInterfaceBinding); }
@Override protected List<ServiceName> installServices(OperationContext context, NativeInterfaceCommonPolicy commonPolicy, ModelNode model) throws OperationFailedException { populateHostControllerInfo(hostControllerInfo, context, model); final ServiceTarget serviceTarget = context.getServiceTarget(); final boolean onDemand = context.isBooting(); NativeManagementServices.installRemotingServicesIfNotInstalled(serviceTarget, hostControllerInfo.getLocalHostName(), context.getServiceRegistry(false), onDemand); OptionMap options = createConnectorOptions(commonPolicy); final ServiceName nativeManagementInterfaceBinding = context.getCapabilityServiceName("org.wildfly.network.interface", hostControllerInfo.getNativeManagementInterface(), NetworkInterfaceBinding.class); final String securityRealm = commonPolicy.getSecurityRealm(); final String saslAuthenticationFactory = commonPolicy.getSaslAuthenticationFactory(); if (saslAuthenticationFactory == null && securityRealm == null) { ROOT_LOGGER.nativeManagementInterfaceIsUnsecured(); } ServiceName securityRealmName = securityRealm != null ? SecurityRealm.ServiceUtil.createServiceName(securityRealm) : null; ServiceName saslAuthenticationFactoryName = saslAuthenticationFactory != null ? context.getCapabilityServiceName( SASL_AUTHENTICATION_FACTORY_CAPABILITY, saslAuthenticationFactory, SaslAuthenticationFactory.class) : null; String sslContext = commonPolicy.getSSLContext(); ServiceName sslContextName = sslContext != null ? context.getCapabilityServiceName(SSL_CONTEXT_CAPABILITY, sslContext, SSLContext.class) : null; NativeManagementServices.installManagementWorkerService(serviceTarget, context.getServiceRegistry(false)); ManagementRemotingServices.installDomainConnectorServices(context, serviceTarget, ManagementRemotingServices.MANAGEMENT_ENDPOINT, nativeManagementInterfaceBinding, hostControllerInfo.getNativeManagementPort(), options, securityRealmName, saslAuthenticationFactoryName, sslContextName); return Arrays.asList(REMOTING_BASE.append("server", MANAGEMENT_CONNECTOR), nativeManagementInterfaceBinding); }