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 a capability.
Author:
Brian Stansberry (c) 2014 Red Hat Inc.
  • Constructor Details

    • 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 be null
  • Method Details

    • 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()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • 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 interface Comparable<C extends Capability>