@Override protected CapabilityScope createIncludedContext(String name) { return new ProfileChildCapabilityScope(name); } }
@Override public int compareTo(CapabilityRegistration o) { return id.compareTo(o.id); } }
/** * Simple utility method to register a * {@link org.jboss.as.controller.capability.RuntimeCapability RuntimeCapability<?>} for each of the given * capability. They will be registered against {@link CapabilityScope#GLOBAL} and with the root resource and no * specific attribute as their {@link org.jboss.as.controller.capability.registry.RegistrationPoint}. * * @param capabilityRegistry registry to use * @param capabilities the capabilities. */ public static void registerCapabilities(RuntimeCapabilityRegistry capabilityRegistry, RuntimeCapability<?>... capabilities) { for (final RuntimeCapability<?> capability : capabilities) { capabilityRegistry.registerCapability(new RuntimeCapabilityRegistration(capability, CapabilityScope.GLOBAL, new RegistrationPoint(PathAddress.EMPTY_ADDRESS, null))); } }
private RuntimeCapabilityRegistration createCapabilityRegistration(RuntimeCapability capability, Step step, String attribute) { CapabilityScope context = createCapabilityContext(step.address); RegistrationPoint rp = new RegistrationPoint(step.address, attribute); return new RuntimeCapabilityRegistration(capability, context, rp); }
private CapabilityRegistration<?> getCapability(CapabilityId capabilityId) { CapabilityRegistration<?> capReg = this.capabilityRegistry.getCapability(capabilityId); if (capReg == null) { for (CapabilityRegistration<?> reg : this.capabilityRegistry.getPossibleCapabilities()) { if (reg.getCapabilityId().getName().equals(capabilityId.getName())) { capReg = reg; break; } } } return capReg; }
private RuntimeRequirementRegistration createRequirementRegistration(String required, String dependent, boolean runtimeOnly, Step step, String attribute) { CapabilityScope context = createCapabilityContext(step.address); RegistrationPoint rp = new RegistrationPoint(step.address, attribute); return new RuntimeRequirementRegistration(required, dependent, context, rp, runtimeOnly); }
@Override protected CapabilityScope createIncludedContext(String name) { return new SocketBindingGroupChildScope(name); } }
/** * Gets the scope in which the capability is registered. * * @return the capability scope. Will not return {@code null} */ public CapabilityScope getCapabilityScope() { return id.getScope(); }
private void copy(ResolutionContextImpl source) { super.copy(source); rootResource = source.rootResource; resolutionComplete = source.resolutionComplete; }
/** * Construct a new simple attachment key. * * @param valueClass the value class * @param <T> the attachment type * * @return the new instance */ @SuppressWarnings("unchecked") public static <T> AttachmentKey<T> create(final Class<? super T> valueClass) { return new AttachmentKey(valueClass); } }
/** * Creates a new requirement registration. * * @param requiredName the name of the required capability * @param dependentName the name of the capability that requires {@code requiredName} * @param dependentContext context in which the dependent capability exists * @param registrationPoint point in the configuration model that triggered the requirement */ protected RequirementRegistration(String requiredName, String dependentName, CapabilityScope dependentContext, RegistrationPoint registrationPoint) { this(requiredName, dependentName, dependentContext); putRegistrationPoint(registrationPoint); }
@Override public int hashCode() { return id.hashCode(); }
/** * Simple utility method to register a * {@link org.jboss.as.controller.capability.RuntimeCapability RuntimeCapability<?>} for each of the given * capability. They will be registered against {@link CapabilityScope#GLOBAL} and with the root resource and no * specific attribute as their {@link org.jboss.as.controller.capability.registry.RegistrationPoint}. * * @param capabilityRegistry registry to use * @param capabilities the capabilities. */ public static void registerCapabilities(RuntimeCapabilityRegistry capabilityRegistry, RuntimeCapability<?>... capabilities) { for (final RuntimeCapability<?> capability : capabilities) { capabilityRegistry.registerCapability(new RuntimeCapabilityRegistration(capability, CapabilityScope.GLOBAL, new RegistrationPoint(PathAddress.EMPTY_ADDRESS, null))); } }
private CapabilityRegistration<?> getCapability(CapabilityId capabilityId) { CapabilityRegistration<?> capReg = this.capabilityRegistry.getCapability(capabilityId); if (capReg == null) { for (CapabilityRegistration<?> reg : this.capabilityRegistry.getPossibleCapabilities()) { if (reg.getCapabilityId().getName().equals(capabilityId.getName())) { capReg = reg; break; } } } return capReg; }
@Override protected CapabilityScope createIncludedContext(String name) { return new ProfileChildCapabilityScope(name); } }
@Override public int compareTo(CapabilityRegistration o) { return id.compareTo(o.id); } }
@Override protected CapabilityScope createIncludedContext(String name) { return new SocketBindingGroupChildScope(name); } }
/** * Gets the scope in which the capability is registered. * * @return the capability scope. Will not return {@code null} */ public CapabilityScope getCapabilityScope() { return id.getScope(); }