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)
protected
RequirementRegistration(String requiredName, String dependentName, CapabilityScope dependentContext, RegistrationPoint registrationPoint)
Creates a new requirement registration.protected
RequirementRegistration(String requiredName, CapabilityId dependentId)
RequirementRegistration(RuntimeRequirementRegistration toCopy)
Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addRegistrationPoint(RegistrationPoint toAdd)
boolean
equals(Object o)
CapabilityScope
getDependentContext()
CapabilityId
getDependentId()
String
getDependentName()
RegistrationPoint
getOldestRegistrationPoint()
Gets the registration point that been associated with the registration for the longest period.int
getRegistrationPointCount()
Set<RegistrationPoint>
getRegistrationPoints()
Get all registration points associated with this registration.String
getRequiredName()
int
hashCode()
boolean
removeRegistrationPoint(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 requiresrequiredName
dependentContext
- 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
null
if 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
null
but may be empty
-
addRegistrationPoint
public boolean addRegistrationPoint(RegistrationPoint toAdd)
-
removeRegistrationPoint
public boolean removeRegistrationPoint(RegistrationPoint toRemove)
-
getRegistrationPointCount
public int getRegistrationPointCount()
-
-