@Override public void handleCompleted() { trackerService.unregisterTracker(processor); } });
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { final ServiceName endpointName = RemotingServices.SUBSYSTEM_ENDPOINT; // Remove management Channel ManagementRemotingServices.removeManagementChannelServices(context, endpointName, ManagementRemotingServices.MANAGEMENT_CHANNEL); }
@Override public synchronized void start(StartContext context) throws StartException { trackerService.reset(); }
static synchronized void installRemotingServicesIfNotInstalled(final ServiceTarget serviceTarget, final String hostName, final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> newControllers, final ServiceRegistry serviceContainer) { if (serviceContainer.getService(ManagementRemotingServices.MANAGEMENT_ENDPOINT) == null) { ManagementChannelRegistryService.addService(serviceTarget, ManagementRemotingServices.MANAGEMENT_ENDPOINT); ManagementRemotingServices.installRemotingManagementEndpoint(serviceTarget, ManagementRemotingServices.MANAGEMENT_ENDPOINT, hostName, EndpointService.EndpointType.MANAGEMENT, OPTIONS, verificationHandler, newControllers); ManagementRemotingServices.installManagementChannelServices(serviceTarget, ManagementRemotingServices.MANAGEMENT_ENDPOINT, new ModelControllerClientOperationHandlerFactoryService(), Services.JBOSS_SERVER_CONTROLLER, ManagementRemotingServices.MANAGEMENT_CHANNEL, Services.JBOSS_SERVER_EXECUTOR, verificationHandler, newControllers); } } }
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) { final ServiceTarget serviceTarget = context.getServiceTarget(); final ServiceName endpointName = RemotingServices.SUBSYSTEM_ENDPOINT; ManagementChannelRegistryService.addService(serviceTarget, endpointName); ManagementRemotingServices.installManagementChannelServices(serviceTarget, endpointName, new ModelControllerClientOperationHandlerFactoryService(), Services.JBOSS_SERVER_CONTROLLER, ManagementRemotingServices.MANAGEMENT_CHANNEL, verificationHandler, newControllers); }
@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 public synchronized void start(StartContext context) throws StartException { // Register the http request processor on the mgmt request tracker final ManagementHttpRequestProcessor processor = processorValue.getValue(); trackerService = mgmtChannelRegistry.getValue().getTrackerService(); trackerService.registerTracker(processor); processor.addShutdownListener(new ManagementHttpRequestProcessor.ShutdownListener() { @Override public void handleCompleted() { trackerService.unregisterTracker(processor); } }); }
public static void removeManagementChannelServices(final OperationContext context, final ServiceName endpointName, final String channelName) { removeManagementChannelOpenListenerService(context, endpointName, channelName); final ServiceName operationHandlerName = endpointName.append(channelName).append(ModelControllerClientOperationHandlerFactoryService.OPERATION_HANDLER_NAME_SUFFIX); context.removeService(operationHandlerName); } }
public static void addService(final ServiceTarget serviceTarget, final ServiceName endpointName) { final ServiceBuilder sb = serviceTarget.addService(SERVICE_NAME, new ManagementChannelRegistryService()); // Make sure the endpoint service does not close all connections sb.requires(endpointName); sb.install(); }
@Override public void run() { try { // Wait for all mgmt requests to complete trackerService.awaitShutdown(SHUTDOWN_TIMEOUT, TIME_UNIT); } catch (InterruptedException e) { // } finally { context.complete(); } } });
@Override public synchronized void stop(final StopContext context) { this.trackerService.stop(); final ArrayList<Registration> registrations = this.registrations; for(final Registration registration : registrations) { registration.close(); } registrations.clear(); }
static synchronized void installRemotingServicesIfNotInstalled(final ServiceTarget serviceTarget, final String hostName, final ServiceRegistry serviceContainer) { if (serviceContainer.getService(ManagementRemotingServices.MANAGEMENT_ENDPOINT) == null) { ManagementChannelRegistryService.addService(serviceTarget, ManagementRemotingServices.MANAGEMENT_ENDPOINT); ManagementRemotingServices.installRemotingManagementEndpoint(serviceTarget, ManagementRemotingServices.MANAGEMENT_ENDPOINT, hostName, EndpointService.EndpointType.MANAGEMENT, OPTIONS); ManagementRemotingServices.installManagementChannelServices(serviceTarget, ManagementRemotingServices.MANAGEMENT_ENDPOINT, new ModelControllerClientOperationHandlerFactoryService(), Services.JBOSS_SERVER_CONTROLLER, ManagementRemotingServices.MANAGEMENT_CHANNEL, ServerService.EXECUTOR_CAPABILITY.getCapabilityServiceName(), ServerService.JBOSS_SERVER_SCHEDULED_EXECUTOR); } } }
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) { final ServiceTarget serviceTarget = context.getServiceTarget(); final ServiceName endpointName = RemotingServices.SUBSYSTEM_ENDPOINT; ManagementChannelRegistryService.addService(serviceTarget, endpointName); ManagementRemotingServices.installManagementChannelServices(serviceTarget, endpointName, new ModelControllerClientOperationHandlerFactoryService(), Services.JBOSS_SERVER_CONTROLLER, ManagementRemotingServices.MANAGEMENT_CHANNEL, Services.JBOSS_SERVER_EXECUTOR, verificationHandler, newControllers); }
@Override public synchronized void start(StartContext context) throws StartException { // Register the http request processor on the mgmt request tracker final ManagementHttpRequestProcessor processor = processorValue.getValue(); trackerService = mgmtChannelRegistry.getValue().getTrackerService(); trackerService.registerTracker(processor); processor.addShutdownListener(new ManagementHttpRequestProcessor.ShutdownListener() { @Override public void handleCompleted() { trackerService.unregisterTracker(processor); } }); }
@Override public void handleCompleted() { trackerService.unregisterTracker(processor); } });
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { final ServiceName endpointName = RemotingServices.SUBSYSTEM_ENDPOINT; // Remove management Channel ManagementRemotingServices.removeManagementChannelServices(context, endpointName, ManagementRemotingServices.MANAGEMENT_CHANNEL); }
public static void removeManagementChannelServices(final OperationContext context, final ServiceName endpointName, final String channelName) { removeManagementChannelOpenListenerService(context, endpointName, channelName); final ServiceName operationHandlerName = endpointName.append(channelName).append(ModelControllerClientOperationHandlerFactoryService.OPERATION_HANDLER_NAME_SUFFIX); context.removeService(operationHandlerName); }
public static void addService(final ServiceTarget serviceTarget, final ServiceName endpointName) { serviceTarget.addService(SERVICE_NAME, new ManagementChannelRegistryService()) // Make sure the endpoint service does not close all connections .addDependency(endpointName) .setInitialMode(ServiceController.Mode.ACTIVE) .install(); }
@Override public void run() { try { // Wait for all mgmt requests to complete trackerService.awaitShutdown(SHUTDOWN_TIMEOUT, TIME_UNIT); } catch (InterruptedException e) { // } finally { context.complete(); } } });
static synchronized void installRemotingServicesIfNotInstalled(final ServiceTarget serviceTarget, final String hostName, final ServiceRegistry serviceContainer) { if (serviceContainer.getService(ManagementRemotingServices.MANAGEMENT_ENDPOINT) == null) { ManagementChannelRegistryService.addService(serviceTarget, ManagementRemotingServices.MANAGEMENT_ENDPOINT); ManagementRemotingServices.installRemotingManagementEndpoint(serviceTarget, ManagementRemotingServices.MANAGEMENT_ENDPOINT, hostName, EndpointService.EndpointType.MANAGEMENT, OPTIONS); ManagementRemotingServices.installManagementChannelServices(serviceTarget, ManagementRemotingServices.MANAGEMENT_ENDPOINT, new ModelControllerClientOperationHandlerFactoryService(), Services.JBOSS_SERVER_CONTROLLER, ManagementRemotingServices.MANAGEMENT_CHANNEL, ServerService.EXECUTOR_CAPABILITY.getCapabilityServiceName(), ServerService.JBOSS_SERVER_SCHEDULED_EXECUTOR); } } }