Package org.jboss.as.connector.subsystems.resourceadapters

Examples of org.jboss.as.connector.subsystems.resourceadapters.WorkManagerRuntimeAttributeReadHandler


                                            final Resource dwmResource = new IronJacamarResource.IronJacamarRuntimeResource();

                                            if (!raResource.hasChild(peDistributedWm))
                                                raResource.registerChild(peDistributedWm, dwmResource);

                                            OperationStepHandler metricsHandler = new WorkManagerRuntimeAttributeReadHandler(wm, ((DistributedWorkManager)wm).getDistributedStatistics(), false);
                                            for (SimpleAttributeDefinition metric : Constants.WORKMANAGER_METRICS) {
                                                dwmSubRegistration.registerMetric(metric, metricsHandler);
                                            }

                                            OperationStepHandler readHandler = new WorkManagerRuntimeAttributeReadHandler(wm, ((DistributedWorkManager)wm).getDistributedStatistics(), true);
                                            OperationStepHandler writeHandler = new WorkManagerRuntimeAttributeWriteHandler(wm, true, Constants.DISTRIBUTED_WORKMANAGER_RW_ATTRIBUTES);
                                            for (SimpleAttributeDefinition attribute : Constants.DISTRIBUTED_WORKMANAGER_RW_ATTRIBUTES) {
                                                dwmSubRegistration.registerReadWriteAttribute(attribute, readHandler, writeHandler);
                                            }

                                            dwmSubRegistration.registerOperationHandler(ClearWorkManagerStatisticsHandler.DEFINITION, new ClearWorkManagerStatisticsHandler(wm));
                                        }
                                        if (raRegistration.getSubModel(PathAddress.pathAddress(peWm)) == null) {
                                            ResourceBuilder resourceBuilder = ResourceBuilder.Factory.create(peWm,
                                                    new StandardResourceDescriptionResolver(Constants.STATISTICS_NAME + "." + Constants.WORKMANAGER_NAME, CommonAttributes.RESOURCE_NAME, CommonAttributes.class.getClassLoader()));

                                            ManagementResourceRegistration wmSubRegistration = raRegistration.registerSubModel(resourceBuilder.build());
                                            final Resource wmResource = new IronJacamarResource.IronJacamarRuntimeResource();

                                            if (!raResource.hasChild(peWm))
                                                raResource.registerChild(peWm, wmResource);

                                            OperationStepHandler metricHandler = new WorkManagerRuntimeAttributeReadHandler(wm, wm.getStatistics(), false);
                                            for (SimpleAttributeDefinition metric : Constants.WORKMANAGER_METRICS) {
                                                wmSubRegistration.registerMetric(metric, metricHandler);
                                            }

                                            OperationStepHandler readHandler = new WorkManagerRuntimeAttributeReadHandler(wm, wm.getStatistics(), false);
                                            OperationStepHandler writeHandler = new WorkManagerRuntimeAttributeWriteHandler(wm, false, Constants.WORKMANAGER_RW_ATTRIBUTES);
                                            for (SimpleAttributeDefinition attribute : Constants.WORKMANAGER_RW_ATTRIBUTES) {
                                                wmSubRegistration.registerReadWriteAttribute(attribute, readHandler, writeHandler);
                                            }
View Full Code Here

TOP

Related Classes of org.jboss.as.connector.subsystems.resourceadapters.WorkManagerRuntimeAttributeReadHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.