Class FixedInjectionSource

java.lang.Object
org.jboss.as.ee.component.InjectionSource
org.jboss.as.ee.component.FixedInjectionSource

public final class FixedInjectionSource extends InjectionSource
An injection of a fixed value.
Author:
David M. Lloyd
  • Constructor Details

    • FixedInjectionSource

      public FixedInjectionSource(ManagedReferenceFactory factory, Object value)
      Construct a new instance.
      Parameters:
      factory - The managed reference factory to inject
      value - the value to use for equality comparison
  • Method Details

    • getResourceValue

      public void getResourceValue(InjectionSource.ResolutionContext resolutionContext, org.jboss.msc.service.ServiceBuilder<?> serviceBuilder, org.jboss.as.server.deployment.DeploymentPhaseContext phaseContext, org.jboss.msc.inject.Injector<ManagedReferenceFactory> injector)
      Get the value to use as the injection source. The value will be yield an injectable which is dereferenced once for every time the reference source is injected. The given binder service builder may be used to apply any dependencies for this binding (i.e. the source for the binding's value).
      Specified by:
      getResourceValue in class InjectionSource
      Parameters:
      resolutionContext - the resolution context to use
      serviceBuilder - the builder for the binder service
      phaseContext - the deployment phase context
      injector - the injector into which the value should be placed
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object