@Override protected Set<ManagementResourceRegistration> initializeLegacyModel(ExtensionContext context) { SubsystemRegistration subsystemRegistration = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION); subsystemRegistration.registerXMLElementWriter(JAXRSubsystemWriter.INSTANCE); ManagementResourceRegistration subsystemRoot = subsystemRegistration.registerSubsystemModel(new JAXRSubsystemRootResource()); return Collections.singleton(subsystemRoot); }
@Override public void initialize(ExtensionContext context) { SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, MANAGEMENT_API_MAJOR_VERSION, MANAGEMENT_API_MINOR_VERSION, MANAGEMENT_API_MICRO_VERSION); ManagementResourceRegistration registration = subsystem.registerSubsystemModel(new JAXRSubsystemRootResource(config)); registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE); // JAXR Properties registration.registerSubModel(new JAXRPropertyDefinition(config)); subsystem.registerXMLElementWriter(JAXRSubsystemWriter.INSTANCE); JAXRSubsystemRootResource.registerTransformerers(subsystem); } }