Class CapabilityRegistration<C extends Capability>
- java.lang.Object
-
- org.jboss.as.controller.capability.registry.CapabilityRegistration<C>
-
- Type Parameters:
C- the specific type of capability associated with this registration
- All Implemented Interfaces:
Comparable<CapabilityRegistration<C>>
- Direct Known Subclasses:
RuntimeCapabilityRegistration
public class CapabilityRegistration<C extends Capability> extends Object implements Comparable<CapabilityRegistration<C>>
Encapsulates the registration information for acapability.- Author:
- Brian Stansberry (c) 2014 Red Hat Inc.
-
-
Constructor Summary
Constructors Constructor Description CapabilityRegistration(C capability, CapabilityScope scope)CapabilityRegistration(C capability, CapabilityScope scope, RegistrationPoint registrationPoint)CapabilityRegistration(CapabilityRegistration<C> toCopy)Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddRegistrationPoint(RegistrationPoint toAdd)intcompareTo(CapabilityRegistration o)booleanequals(Object o)CgetCapability()Gets the capability.CapabilityIdgetCapabilityId()StringgetCapabilityName()CapabilityScopegetCapabilityScope()Gets the scope in which the capability is registered.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.inthashCode()booleanremoveRegistrationPoint(RegistrationPoint toAdd)
-
-
-
Constructor Detail
-
CapabilityRegistration
public CapabilityRegistration(C capability, CapabilityScope scope)
-
CapabilityRegistration
public CapabilityRegistration(C capability, CapabilityScope scope, RegistrationPoint registrationPoint)
-
CapabilityRegistration
public CapabilityRegistration(CapabilityRegistration<C> toCopy)
Copy constructor.- Parameters:
toCopy- the registration to copy. Cannot benull
-
-
Method Detail
-
getCapability
public C getCapability()
Gets the capability.- Returns:
- the capability. Will not return
null
-
getCapabilityScope
public CapabilityScope getCapabilityScope()
Gets the scope in which the capability is registered.- Returns:
- the capability scope. Will not return
null
-
getCapabilityName
public String getCapabilityName()
-
getCapabilityId
public CapabilityId getCapabilityId()
-
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 toAdd)
-
getRegistrationPointCount
public int getRegistrationPointCount()
-
compareTo
public int compareTo(CapabilityRegistration o)
- Specified by:
compareToin interfaceComparable<C extends Capability>
-
-