Class RequirementRegistration
- java.lang.Object
-
- org.jboss.as.controller.capability.registry.RequirementRegistration
-
- Direct Known Subclasses:
RuntimeRequirementRegistration
public class RequirementRegistration extends Object
Encapsulates the registration information for a requirement for a capability.- Author:
- Brian Stansberry (c) 2014 Red Hat Inc.
-
-
Constructor Summary
Constructors Modifier Constructor Description RequirementRegistration(String requiredName, String dependentName, CapabilityScope dependentContext)protectedRequirementRegistration(String requiredName, String dependentName, CapabilityScope dependentContext, RegistrationPoint registrationPoint)Creates a new requirement registration.protectedRequirementRegistration(String requiredName, CapabilityId dependentId)RequirementRegistration(RuntimeRequirementRegistration toCopy)Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddRegistrationPoint(RegistrationPoint toAdd)booleanequals(Object o)CapabilityScopegetDependentContext()CapabilityIdgetDependentId()StringgetDependentName()RegistrationPointgetOldestRegistrationPoint()Gets the registration point that been associated with the registration for the longest period.intgetRegistrationPointCount()Set<RegistrationPoint>getRegistrationPoints()Get all registration points associated with this registration.StringgetRequiredName()inthashCode()booleanremoveRegistrationPoint(RegistrationPoint toRemove)
-
-
-
Constructor Detail
-
RequirementRegistration
public RequirementRegistration(String requiredName, String dependentName, CapabilityScope dependentContext)
-
RequirementRegistration
protected RequirementRegistration(String requiredName, CapabilityId dependentId)
-
RequirementRegistration
protected RequirementRegistration(String requiredName, String dependentName, CapabilityScope dependentContext, RegistrationPoint registrationPoint)
Creates a new requirement registration.- Parameters:
requiredName- the name of the required capabilitydependentName- the name of the capability that requiresrequiredNamedependentContext- context in which the dependent capability existsregistrationPoint- point in the configuration model that triggered the requirement
-
RequirementRegistration
public RequirementRegistration(RuntimeRequirementRegistration toCopy)
Copy constructor.- Parameters:
toCopy- the registration to copy.
-
-
Method Detail
-
getRequiredName
public String getRequiredName()
-
getDependentName
public String getDependentName()
-
getDependentContext
public CapabilityScope getDependentContext()
-
getDependentId
public CapabilityId getDependentId()
-
getOldestRegistrationPoint
public RegistrationPoint getOldestRegistrationPoint()
Gets the registration point that been associated with the registration for the longest period.- Returns:
- the initial registration point, or
nullif there are no longer any registration points
-
getRegistrationPoints
public Set<RegistrationPoint> getRegistrationPoints()
Get all registration points associated with this registration.- Returns:
- all registration points. Will not be
nullbut may be empty
-
addRegistrationPoint
public boolean addRegistrationPoint(RegistrationPoint toAdd)
-
removeRegistrationPoint
public boolean removeRegistrationPoint(RegistrationPoint toRemove)
-
getRegistrationPointCount
public int getRegistrationPointCount()
-
-