TorqueBox 3.1.2

org.torquebox.core.injection.analysis
Class PredeterminedInjectableHandler

java.lang.Object
  extended by org.torquebox.core.injection.analysis.AbstractInjectableHandler
      extended by org.torquebox.core.injection.analysis.PredeterminedInjectableHandler
All Implemented Interfaces:
org.jboss.msc.service.Service<InjectableHandler>, org.jboss.msc.value.Value<InjectableHandler>, InjectableHandler
Direct Known Subclasses:
CorePredeterminedInjectableHandler, MessagingPredeterminedInjectableHandler, StompPredeterminedInjectableHandler

public class PredeterminedInjectableHandler
extends AbstractInjectableHandler

Injectable-handler which can provide injectables to all deployments regardless of specific configuration.

Predetermined injectables are injectables that may be assumed to be globally available for all deployments. Examples include AS-global items, such as connection-managers, or deployment-global items, such as an MSC ServiceTarget for the deployment.

Author:
Bob McWhirter

Field Summary
 
Fields inherited from interface org.torquebox.core.injection.analysis.InjectableHandler
RECOGNITION_PRIORITY
 
Fields inherited from interface org.jboss.msc.service.Service
NULL, NULL_VALUE
 
Constructor Summary
PredeterminedInjectableHandler(String subsystemName)
          Construct for a subsystem.
 
Method Summary
protected  void addInjectable(String name, Injectable injectable)
          Add a predetermined injectable.
 Collection<Injectable> getInjectables()
           
 Injectable handle(Object injection, boolean generic)
          Handle injection for an argument.
 boolean recognizes(Object injection)
          Determine if this handler recognizes the argument.
 
Methods inherited from class org.torquebox.core.injection.analysis.AbstractInjectableHandler
getJavaClassName, getRecognitionPriority, getString, getType, getValue, setRecognitionPriority, setType, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PredeterminedInjectableHandler

public PredeterminedInjectableHandler(String subsystemName)
Construct for a subsystem.

Parameters:
subsystemName - The subsystem name.
Method Detail

addInjectable

protected void addInjectable(String name,
                             Injectable injectable)
Add a predetermined injectable.

Typically this method would be called one-or-more times from the constructor of a subclass, or immediately after constructing an instance of this class, before registering it with the InjectableHandlerRegistry.

Parameters:
name - The name of the injectable.
injectable - The injectable itself.

handle

public Injectable handle(Object injection,
                         boolean generic)
Description copied from interface: InjectableHandler
Handle injection for an argument.

generic - Denotes if this is a generic or explicit injection of this type. (Unused?)
Returns:
The resulting injectable.

recognizes

public boolean recognizes(Object injection)
Description copied from interface: InjectableHandler
Determine if this handler recognizes the argument.

Parameters:
injection - The injection object.
Returns:
true if this handler recognizes the argument, otherwise false.

getInjectables

public Collection<Injectable> getInjectables()

TorqueBox 3.1.2

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.