public NativeManagementResourceDefinition(final LocalHostControllerInfoImpl hostControllerInfo) { super(RESOURCE_PATH, HostModelUtil.getResourceDescriptionResolver("core","management","native-interface"), new NativeManagementAddHandler(hostControllerInfo), null, OperationEntry.Flag.RESTART_NONE, null); this.hostControllerInfo = hostControllerInfo; }
@Override protected void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model, final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> newControllers) throws OperationFailedException { populateHostControllerInfo(hostControllerInfo, context, model); final ServiceTarget serviceTarget = context.getServiceTarget(); ManagementChannelRegistryService.addService(serviceTarget, ManagementRemotingServices.MANAGEMENT_ENDPOINT); ManagementRemotingServices.installRemotingEndpoint(serviceTarget, ManagementRemotingServices.MANAGEMENT_ENDPOINT, hostControllerInfo.getLocalHostName(), EndpointService.EndpointType.MANAGEMENT, CONNECTION_OPTIONS, null, null); final boolean onDemand = context.isBooting(); installNativeManagementServices(serviceTarget, hostControllerInfo, verificationHandler, newControllers, onDemand); }
@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); }
public NativeManagementResourceDefinition(final LocalHostControllerInfoImpl hostControllerInfo) { super(new Parameters(RESOURCE_PATH, HostModelUtil.getResourceDescriptionResolver("core","management","native-interface")) .setAddHandler(new NativeManagementAddHandler(hostControllerInfo)) .setRemoveHandler(NativeManagementRemoveHandler.INSTANCE)); }
public NativeManagementResourceDefinition(final LocalHostControllerInfoImpl hostControllerInfo) { super(new Parameters(RESOURCE_PATH, HostModelUtil.getResourceDescriptionResolver("core","management","native-interface")) .setAddHandler(new NativeManagementAddHandler(hostControllerInfo)) .setRemoveHandler(NativeManagementRemoveHandler.INSTANCE)); }