Package org.jboss.as.controller
Interface ResourceDefinition
-
- All Superinterfaces:
Feature,ResourceRegistration
- All Known Implementing Classes:
AbstractSocketBindingGroupResourceDefinition,AbstractSocketBindingResourceDefinition,BaseHttpInterfaceResourceDefinition,BaseNativeInterfaceResourceDefinition,DelegatingResourceDefinition,ExtensionResourceDefinition,ExtensionSubsystemResourceDefinition,InterfaceDefinition,LegacyResourceDefinition,ModelOnlyResourceDefinition,PathResourceDefinition,PersistentResourceDefinition,ResourceDefinition.MinimalResourceDefinition,SimpleResourceDefinition
public interface ResourceDefinition extends ResourceRegistration
Provides essential information defining a management resource.- Author:
- Brian Stansberry (c) 2011 Red Hat Inc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classResourceDefinition.AbstractConfigurator<C extends ResourceDefinition.Configurator<C>>Configures the basic characteristics of aResourceDefinition.static interfaceResourceDefinition.BuilderBuilder of a minimalResourceDefinition.static interfaceResourceDefinition.Configurator<C extends ResourceDefinition.Configurator<C>>Configures the basic characteristics of aResourceDefinition.static classResourceDefinition.MinimalBuilderMinimal builder of aResourceDefinition.static classResourceDefinition.MinimalResourceDefinitionA minimalResourceDefinitionimplementation whose internal registration will be performed separately.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static ResourceDefinition.Builderbuilder(ResourceRegistration registration, DescriptionProvider descriptionProvider)Creates aResourceDefinitionbuilder using the specified registration and description resolverstatic ResourceDefinition.Builderbuilder(ResourceRegistration registration, ResourceDescriptionResolver descriptionResolver)Creates a minimalResourceDefinitionbuilder using the specified registration and description resolver.static ResourceDefinition.Builderbuilder(ResourceRegistration registration, ResourceDescriptionResolver descriptionResolver, SubsystemModel deprecation)Creates a minimalResourceDefinitionbuilder using the specified registration and description resolver, deprecated as of the version of the specified model.List<AccessConstraintDefinition>getAccessConstraints()Get the definition of any access constraints associated with the resource.DescriptionProvidergetDescriptionProvider(ImmutableManagementResourceRegistration resourceRegistration)Gets aDescriptionProviderfor the given resource.default intgetMaxOccurs()Gets the maximum number of times a resource of the type described by this definition can occur under its parent resource (or, for a root resource, the minimum number of times it can occur at all.)default intgetMinOccurs()Gets the minimum number of times a resource of the type described by this definition can occur under its parent resource (or, for a root resource, the number of times it can occur at all.)default booleanisFeature()booleanisOrderedChild()Whether this is an ordered child or notbooleanisRuntime()default voidregisterAdditionalRuntimePackages(ManagementResourceRegistration resourceRegistration)Register "additional" Galleon packages that must be installed in order for this Resource to function.voidregisterAttributes(ManagementResourceRegistration resourceRegistration)Register operations associated with this resource.default voidregisterCapabilities(ManagementResourceRegistration resourceRegistration)Register capabilities associated with this resource.voidregisterChildren(ManagementResourceRegistration resourceRegistration)Register child resources associated with this resource.voidregisterNotifications(ManagementResourceRegistration resourceRegistration)Register notifications associated with this resource.voidregisterOperations(ManagementResourceRegistration resourceRegistration)Register operations associated with this resource.-
Methods inherited from interface org.jboss.as.controller.Feature
getStability
-
Methods inherited from interface org.jboss.as.controller.ResourceRegistration
getPathElement
-
-
-
-
Method Detail
-
getDescriptionProvider
DescriptionProvider getDescriptionProvider(ImmutableManagementResourceRegistration resourceRegistration)
Gets aDescriptionProviderfor the given resource.- Parameters:
resourceRegistration- the resource. Cannot benull- Returns:
- the description provider. Will not be
null
-
registerOperations
void registerOperations(ManagementResourceRegistration resourceRegistration)
Register operations associated with this resource.- Parameters:
resourceRegistration- aManagementResourceRegistrationcreated from this definition
-
registerAttributes
void registerAttributes(ManagementResourceRegistration resourceRegistration)
Register operations associated with this resource.- Parameters:
resourceRegistration- aManagementResourceRegistrationcreated from this definition
-
registerNotifications
void registerNotifications(ManagementResourceRegistration resourceRegistration)
Register notifications associated with this resource.- Parameters:
resourceRegistration- aManagementResourceRegistrationcreated from this definition
-
registerChildren
void registerChildren(ManagementResourceRegistration resourceRegistration)
Register child resources associated with this resource.- Parameters:
resourceRegistration- aManagementResourceRegistrationcreated from this definition
-
registerCapabilities
default void registerCapabilities(ManagementResourceRegistration resourceRegistration)
Register capabilities associated with this resource.- Parameters:
resourceRegistration- aManagementResourceRegistrationcreated from this definition
-
registerAdditionalRuntimePackages
default void registerAdditionalRuntimePackages(ManagementResourceRegistration resourceRegistration)
Register "additional" Galleon packages that must be installed in order for this Resource to function. NB: the packages need to be visible from the feature pack that contains the ResourceDefinition. It can't be any package from any feature pack. The purpose of providing this information is to make it available to the Galleon tooling that produces Galleon feature-specs, in order to allow the tooling to include the package information in the relevant spec.A package is "additional" if it is not one of the "standard" packages that must be installed. The names of "standard" packages should not be registered. The "standard" packages are:
- The root package for the process type; i.e. the package that provides the main module whose name is passed to JBoss Modules when the process is launched.
- The package that installs the module that provides the extension in which the resource is defined.
- Any package that is non-optionally directly or transitively required by one of the other types of standard packages.
-
Packages that install required modules injected into Deployment Unit can be registered as
required
RuntimePackageDependency. -
Packages that install optional modules injected into Deployment Unit can be registered as
optional
RuntimePackageDependency. -
Packages that install modules that are only required if the resource associated to this
definition is instantiated are to be registered as required
RuntimePackageDependency. -
Packages that install modules that are only required by this feature in order to interact with other features
are to be registered as passive
RuntimePackageDependency. A passive dependency is provisioned only if its own required dependencies are present.
- Parameters:
resourceRegistration- aManagementResourceRegistrationcreated from this definition
-
getAccessConstraints
List<AccessConstraintDefinition> getAccessConstraints()
Get the definition of any access constraints associated with the resource.- Returns:
- the access constraints or an empty list; will not return
null.
-
isRuntime
boolean isRuntime()
- Returns:
- true if resource is runtime
- Since:
- WildFly Core 1.0, WildFly 9.0
-
isOrderedChild
boolean isOrderedChild()
Whether this is an ordered child or not- Returns:
trueif this child is ordered within the parent, false otherwise
-
getMaxOccurs
default int getMaxOccurs()
Gets the maximum number of times a resource of the type described by this definition can occur under its parent resource (or, for a root resource, the minimum number of times it can occur at all.)- Returns:
- the minimum number of occurrences
-
getMinOccurs
default int getMinOccurs()
Gets the minimum number of times a resource of the type described by this definition can occur under its parent resource (or, for a root resource, the number of times it can occur at all.)- Returns:
- the minimum number of occurrences
-
isFeature
default boolean isFeature()
-
builder
static ResourceDefinition.Builder builder(ResourceRegistration registration, ResourceDescriptionResolver descriptionResolver)
Creates a minimalResourceDefinitionbuilder using the specified registration and description resolver.- Parameters:
registration- the resource registrationdescriptionResolver- the resource description resolver- Returns:
- a builder instance
-
builder
static ResourceDefinition.Builder builder(ResourceRegistration registration, ResourceDescriptionResolver descriptionResolver, SubsystemModel deprecation)
Creates a minimalResourceDefinitionbuilder using the specified registration and description resolver, deprecated as of the version of the specified model.- Parameters:
registration- the resource registrationdescriptionResolver- a resolver of model descriptions for this resourcedeprecation- the model that deprecates this resource- Returns:
- a builder instance
-
builder
static ResourceDefinition.Builder builder(ResourceRegistration registration, DescriptionProvider descriptionProvider)
Creates aResourceDefinitionbuilder using the specified registration and description resolver- Parameters:
registration- the resource registrationdescriptionProvider- provides model descriptions for this resource- Returns:
- a builder instance
-
-