public void initialize(ExtensionContext context) { // Register the subsystem and operation handlers SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, BPM_PLATFORM_SUBSYSTEM_MAJOR_VERSION, BPM_PLATFORM_SUBSYSTEM_MINOR_VERSION); subsystem.registerXMLElementWriter(parser); // build resource definitions ResourceBuilder processEnginesResource = ResourceBuilder.Factory.create(PROCESS_ENGINES_PATH, getResourceDescriptionResolver(ModelConstants.PROCESS_ENGINES)) .setAddOperation(ProcessEngineAdd.INSTANCE) .setRemoveOperation(ProcessEngineRemove.INSTANCE); ResourceBuilder jobAcquisitionResource = ResourceBuilder.Factory.create(JOB_ACQUISTIONS_PATH, getResourceDescriptionResolver(ModelConstants.JOB_ACQUISITIONS)) .setAddOperation(JobAcquisitionAdd.INSTANCE) .setRemoveOperation(JobAcquisitionRemove.INSTANCE); ResourceBuilder jobExecutorResource = ResourceBuilder.Factory.create(JOB_EXECUTOR_PATH, getResourceDescriptionResolver(ModelConstants.JOB_EXECUTOR)) .setAddOperation(JobExecutorAdd.INSTANCE) .setRemoveOperation(JobExecutorRemove.INSTANCE) .pushChild(jobAcquisitionResource).pop(); ResourceDefinition subsystemResource = ResourceBuilder.Factory.createSubsystemRoot(SUBSYSTEM_PATH, getResourceDescriptionResolver(SUBSYSTEM_NAME), BpmPlatformSubsystemAdd.INSTANCE, BpmPlatformSubsystemRemove.INSTANCE) .pushChild(processEnginesResource).pop() .pushChild(jobExecutorResource).pop() .build(); subsystem.registerSubsystemModel(subsystemResource); }
.setRemoveOperation(HandlerChainRemove.INSTANCE) .addReadWriteAttribute(Attributes.PROTOCOL_BINDINGS, null, new ReloadRequiredWriteAttributeHandler(Attributes.PROTOCOL_BINDINGS)) .pushChild(handlerBuilder).pop(); .setRemoveOperation(HandlerChainRemove.INSTANCE) .addReadWriteAttribute(Attributes.PROTOCOL_BINDINGS, null, new ReloadRequiredWriteAttributeHandler(Attributes.PROTOCOL_BINDINGS)) .pushChild(handlerBuilder).pop(); .addReadWriteAttribute(Attributes.WSDL_SECURE_PORT, null, new WSSubsystemAttributeChangeHandler(Attributes.WSDL_SECURE_PORT)) .addReadWriteAttribute(Attributes.MODIFY_WSDL_ADDRESS, null, new WSSubsystemAttributeChangeHandler(Attributes.MODIFY_WSDL_ADDRESS)) .pushChild(ENDPOINT_CONFIG_PATH, EndpointConfigAdd.INSTANCE, EndpointConfigRemove.INSTANCE) .pushChild(propertyResource).pop() .pushChild(preHandler).pop() .pushChild(postHandler).pop() .pop() .pushChild(CLIENT_CONFIG_PATH, ClientConfigAdd.INSTANCE, ClientConfigRemove.INSTANCE) .pushChild(propertyResource).pop() .pushChild(preHandler).pop() .pushChild(postHandler).pop() .pop() .build(); .pushChild(ENDPOINT_PATH) .addMetrics(WSEndpointMetrics.INSTANCE, WSEndpointMetrics.ATTRIBUTES).build());
.setRemoveOperation(ReloadRequiredRemoveStepHandler.INSTANCE) .addReadWriteAttribute(Attributes.PROTOCOL_BINDINGS, null, new ReloadRequiredWriteAttributeHandler(Attributes.PROTOCOL_BINDINGS)) .pushChild(handlerBuilder).pop(); .setRemoveOperation(ReloadRequiredRemoveStepHandler.INSTANCE) .addReadWriteAttribute(Attributes.PROTOCOL_BINDINGS, null, new ReloadRequiredWriteAttributeHandler(Attributes.PROTOCOL_BINDINGS)) .pushChild(handlerBuilder).pop(); .pushChild(propertyResource).pop() .pushChild(preHandler).pop() .pushChild(postHandler).pop() .build(); .setAddOperation(ClientConfigAdd.INSTANCE) .setRemoveOperation(ReloadRequiredRemoveStepHandler.INSTANCE) .pushChild(propertyResource).pop() .pushChild(preHandler).pop() .pushChild(postHandler).pop() .build(); subsystem.registerDeploymentModel(ResourceBuilder.Factory.create(SUBSYSTEM_PATH, getResourceDescriptionResolver("deployment")) .noFeature() .pushChild(ENDPOINT_PATH) .addMetrics(WSEndpointMetrics.INSTANCE, WSEndpointMetrics.ATTRIBUTES) .addReadOnlyAttribute(ENDPOINT_CLASS)
.setRemoveOperation(ReloadRequiredRemoveStepHandler.INSTANCE) .addReadWriteAttribute(Attributes.PROTOCOL_BINDINGS, null, new ReloadRequiredWriteAttributeHandler(Attributes.PROTOCOL_BINDINGS)) .pushChild(handlerBuilder).pop(); .setRemoveOperation(ReloadRequiredRemoveStepHandler.INSTANCE) .addReadWriteAttribute(Attributes.PROTOCOL_BINDINGS, null, new ReloadRequiredWriteAttributeHandler(Attributes.PROTOCOL_BINDINGS)) .pushChild(handlerBuilder).pop(); .pushChild(propertyResource).pop() .pushChild(preHandler).pop() .pushChild(postHandler).pop() .build(); .setAddOperation(ClientConfigAdd.INSTANCE) .setRemoveOperation(ReloadRequiredRemoveStepHandler.INSTANCE) .pushChild(propertyResource).pop() .pushChild(preHandler).pop() .pushChild(postHandler).pop() .build(); subsystem.registerDeploymentModel(ResourceBuilder.Factory.create(SUBSYSTEM_PATH, getResourceDescriptionResolver("deployment")) .noFeature() .pushChild(ENDPOINT_PATH) .addMetrics(WSEndpointMetrics.INSTANCE, WSEndpointMetrics.ATTRIBUTES) .addReadOnlyAttribute(ENDPOINT_CLASS)
.addOperation(Operations.START_GATEWAY, SwitchYardSubsystemStartGateway.INSTANCE) .addOperation(Operations.UPDATE_THROTTLING, SwitchYardSubsystemUpdateThrottling.INSTANCE) .pushChild(securityConfigsResource).pop() .pushChild(modulesResource).pop() .pushChild(extensionsResource).pop() .build(); subsystem.registerSubsystemModel(subsystemResource);
.addOperation(Operations.START_GATEWAY, SwitchYardSubsystemStartGateway.INSTANCE) .addOperation(Operations.UPDATE_THROTTLING, SwitchYardSubsystemUpdateThrottling.INSTANCE) .pushChild(securityConfigsResource).pop() .pushChild(modulesResource).pop() .pushChild(extensionsResource).pop() .build(); subsystem.registerSubsystemModel(subsystemResource);