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 boolean
addRegistrationPoint(RegistrationPoint toAdd)
int
compareTo(CapabilityRegistration o)
boolean
equals(Object o)
C
getCapability()
Gets the capability.CapabilityId
getCapabilityId()
String
getCapabilityName()
CapabilityScope
getCapabilityScope()
Gets the scope in which the capability is registered.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.int
hashCode()
boolean
removeRegistrationPoint(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
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 toAdd)
-
getRegistrationPointCount
public int getRegistrationPointCount()
-
compareTo
public int compareTo(CapabilityRegistration o)
- Specified by:
compareTo
in interfaceComparable<C extends Capability>
-
-