|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.webbeans.manager.WebBeansContainer
public class WebBeansContainer
The web beans container for a given environment.
| Method Summary | ||
|---|---|---|
void |
addComponent(ComponentImpl comp)
|
|
void |
addComponentByName(java.lang.String name,
ComponentImpl comp)
|
|
void |
addComponentByType(java.lang.reflect.Type type,
ComponentImpl comp)
Adds a component by the interface type |
|
void |
addContext(java.lang.Class<java.lang.annotation.Annotation> scopeType,
Context context)
|
|
void |
addEnabledInterceptor(java.lang.Class cl)
|
|
void |
addObserver(ObserverImpl observer)
|
|
void |
addSingleton(java.lang.Object object)
|
|
void |
addSingleton(java.lang.Object object,
java.lang.String name)
|
|
void |
addSingleton(java.lang.Object object,
java.lang.String name,
java.lang.Class componentType)
|
|
void |
addSingletonByName(java.lang.Object object,
java.lang.String name)
Adds a singleton only to the name map |
|
void |
bind()
Starts the bind phase |
|
ComponentImpl |
bind(java.lang.String location,
java.lang.reflect.Type type)
Returns the web beans component corresponding to the return type. |
|
ComponentImpl |
bind(java.lang.String location,
java.lang.reflect.Type type,
java.lang.annotation.Annotation[] paramAnn)
Returns the web beans component corresponding to a method parameter. |
|
ComponentImpl |
bind(java.lang.String location,
java.lang.reflect.Type type,
java.util.ArrayList<java.lang.annotation.Annotation> bindingList)
Returns the web beans component with a given binding list. |
|
ComponentImpl |
bind(java.lang.String location,
java.lang.reflect.Type type,
java.lang.String name)
Returns the web beans component corresponding to a method and a @Named value |
|
ComponentImpl |
bindByBindings(java.lang.String location,
java.lang.reflect.Type type,
java.util.ArrayList<Binding> bindingList)
Returns the web beans component with a given binding list. |
|
void |
classMatchEvent(EnvironmentClassLoader loader,
Path root,
java.lang.String className)
Callback to note the class matches |
|
static WebBeansContainer |
create()
Returns the current active container. |
|
static WebBeansContainer |
create(java.lang.ClassLoader loader)
Returns the current active container. |
|
WbComponentType |
createComponentType(java.lang.Class cl)
|
|
Conversation |
createConversation()
|
|
|
createFactory(java.lang.Class<T> type,
java.lang.String name)
Returns a new instance for a class, but does not register the component with webbeans. |
|
ComponentFactory |
createFactory(java.lang.Class type,
java.lang.annotation.Annotation... ann)
Returns a new instance for a class, but does not register the component with webbeans. |
|
void |
createProgram(java.util.ArrayList<ConfigProgram> injectList,
java.lang.reflect.Field field,
boolean isOptional)
Creates an injection program for the given field |
|
void |
createProgram(java.util.ArrayList<ConfigProgram> injectList,
java.lang.reflect.Method method)
Creates an injection program for the given method |
|
|
createTransient(java.lang.Class<T> type)
Returns a ComponentFactory for a class, but does not register the component with webbeans. |
|
|
createTransientObject(java.lang.Class<T> type)
Creates an object, but does not register the component with webbeans. |
|
|
createTransientObjectNoInit(java.lang.Class<T> type)
Creates an object, but does not register the component with webbeans. |
|
void |
environmentBind(EnvironmentClassLoader loader)
Handles the case the environment config phase |
|
void |
environmentConfigure(EnvironmentClassLoader loader)
Handles the case the environment config phase |
|
void |
environmentStart(EnvironmentClassLoader loader)
Handles the case where the environment is starting (after init). |
|
void |
environmentStop(EnvironmentClassLoader loader)
Handles the case where the environment is stopping |
|
static ConfigException |
error(java.lang.reflect.Method method,
java.lang.String msg)
|
|
ComponentImpl |
findByName(java.lang.String name)
Finds a component by its component name. |
|
java.util.ArrayList<java.lang.Class> |
findInterceptors(java.util.ArrayList<java.lang.annotation.Annotation> annList)
|
|
java.util.ArrayList<ComponentFactory> |
getBeansOfType(java.lang.reflect.Type type)
|
|
|
getByType(java.lang.Class<T> apiType,
java.lang.annotation.Annotation... bindingTypes)
Returns the component which matches the apiType and binding types |
|
java.lang.ClassLoader |
getClassLoader()
|
|
Context |
getContext(java.lang.Class<java.lang.annotation.Annotation> scopeType)
|
|
static WebBeansContainer |
getCurrent()
Returns the local container. |
|
static WebBeansContainer |
getCurrent(java.lang.ClassLoader loader)
Returns the current environment container. |
|
ELContext |
getELContext()
|
|
|
getEnvironmentObject(java.lang.Class<T> type,
java.lang.annotation.Annotation... ann)
Returns a new instance for a class, but does not register the component with webbeans. |
|
|
getObject(java.lang.Class<T> type,
java.lang.annotation.Annotation... ann)
Returns a new instance for a class, but does not register the component with webbeans. |
|
|
getObject(java.lang.Class<T> type,
java.lang.String name)
Returns a new instance for a class, but does not register the component with webbeans. |
|
java.lang.Object |
getObjectByName(java.lang.String name)
Finds a component by its component name. |
|
int |
getPriority()
Since webbeans doesn't enhance, it's priority 1 |
|
ScopeContext |
getScopeContext(java.lang.Class scope)
Returns the scope context corresponding to the scope annotation type. |
|
WbWebBeans |
getWbWebBeans()
|
|
static ConfigException |
injectError(java.lang.reflect.AccessibleObject prop,
java.lang.String msg)
|
|
void |
injectObject(java.lang.Object obj)
Injects an object |
|
boolean |
isRootScannable(Path root)
Returns true if the root is a valid scannable root. |
|
boolean |
isScanMatch(CharBuffer annotationName)
Returns true if the string matches an annotation class. |
|
java.lang.Class |
loadClass(java.lang.String className)
|
|
static java.lang.String |
location(java.lang.reflect.Field field)
|
|
static java.lang.String |
location(java.lang.reflect.Method method)
|
|
void |
raiseEvent(java.lang.Object event,
java.lang.annotation.Annotation... bindings)
Sends the specified event to any observer instances in the scope |
|
|
resolveByType(java.lang.Class<T> apiType,
java.lang.annotation.Annotation... bindingTypes)
Returns the component which matches the apiType and binding types |
|
java.lang.String |
toString()
|
|
void |
update()
|
|
java.lang.Object |
writeReplace()
Serialization rewriting |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static WebBeansContainer getCurrent()
public static WebBeansContainer getCurrent(java.lang.ClassLoader loader)
public static WebBeansContainer create()
public static WebBeansContainer create(java.lang.ClassLoader loader)
public WbWebBeans getWbWebBeans()
public java.lang.ClassLoader getClassLoader()
public WbComponentType createComponentType(java.lang.Class cl)
public void addComponent(ComponentImpl comp)
public void addComponentByName(java.lang.String name,
ComponentImpl comp)
public void addComponentByType(java.lang.reflect.Type type,
ComponentImpl comp)
type - the interface type to expose the componentcomp - the component to registerpublic java.util.ArrayList<ComponentFactory> getBeansOfType(java.lang.reflect.Type type)
public void addSingleton(java.lang.Object object)
public void addSingleton(java.lang.Object object,
java.lang.String name)
public void addSingleton(java.lang.Object object,
java.lang.String name,
java.lang.Class componentType)
public void addSingletonByName(java.lang.Object object,
java.lang.String name)
object - the singleton valuename - the singleton's namepublic void addEnabledInterceptor(java.lang.Class cl)
public java.util.ArrayList<java.lang.Class> findInterceptors(java.util.ArrayList<java.lang.annotation.Annotation> annList)
public ScopeContext getScopeContext(java.lang.Class scope)
scope - the scope annotation type identifying the scope
public void createProgram(java.util.ArrayList<ConfigProgram> injectList,
java.lang.reflect.Field field,
boolean isOptional)
throws ConfigException
ConfigException
public void createProgram(java.util.ArrayList<ConfigProgram> injectList,
java.lang.reflect.Method method)
throws ConfigException
ConfigException
public ComponentImpl bind(java.lang.String location,
java.lang.reflect.Type type,
java.lang.String name)
public ComponentImpl bind(java.lang.String location,
java.lang.reflect.Type type)
public ComponentImpl bind(java.lang.String location,
java.lang.reflect.Type type,
java.lang.annotation.Annotation[] paramAnn)
public ComponentImpl bind(java.lang.String location,
java.lang.reflect.Type type,
java.util.ArrayList<java.lang.annotation.Annotation> bindingList)
public ComponentImpl bindByBindings(java.lang.String location,
java.lang.reflect.Type type,
java.util.ArrayList<Binding> bindingList)
public ComponentImpl findByName(java.lang.String name)
public java.lang.Object getObjectByName(java.lang.String name)
public void injectObject(java.lang.Object obj)
public void addObserver(ObserverImpl observer)
public <T> ComponentFactory<T> resolveByType(java.lang.Class<T> apiType,
java.lang.annotation.Annotation... bindingTypes)
resolveByType in interface Container
public <T> T getByType(java.lang.Class<T> apiType,
java.lang.annotation.Annotation... bindingTypes)
public void addContext(java.lang.Class<java.lang.annotation.Annotation> scopeType,
Context context)
addContext in interface Containerpublic Context getContext(java.lang.Class<java.lang.annotation.Annotation> scopeType)
getContext in interface Container
public void raiseEvent(java.lang.Object event,
java.lang.annotation.Annotation... bindings)
raiseEvent in interface Containerpublic Conversation createConversation()
public <T> T createTransientObject(java.lang.Class<T> type)
public <T> T createTransientObjectNoInit(java.lang.Class<T> type)
public <T> ComponentFactory<T> createTransient(java.lang.Class<T> type)
public ELContext getELContext()
public <T> T getObject(java.lang.Class<T> type,
java.lang.annotation.Annotation... ann)
public <T> T getObject(java.lang.Class<T> type,
java.lang.String name)
public <T> T createFactory(java.lang.Class<T> type,
java.lang.String name)
public <T> T getEnvironmentObject(java.lang.Class<T> type,
java.lang.annotation.Annotation... ann)
public ComponentFactory createFactory(java.lang.Class type,
java.lang.annotation.Annotation... ann)
public void update()
public void bind()
public java.lang.Class loadClass(java.lang.String className)
public void environmentConfigure(EnvironmentClassLoader loader)
environmentConfigure in interface EnvironmentListenerpublic void environmentBind(EnvironmentClassLoader loader)
environmentBind in interface EnvironmentListenerpublic void environmentStart(EnvironmentClassLoader loader)
environmentStart in interface EnvironmentListenerpublic void environmentStop(EnvironmentClassLoader loader)
environmentStop in interface EnvironmentListener
public static ConfigException injectError(java.lang.reflect.AccessibleObject prop,
java.lang.String msg)
public static java.lang.String location(java.lang.reflect.Field field)
public static java.lang.String location(java.lang.reflect.Method method)
public static ConfigException error(java.lang.reflect.Method method,
java.lang.String msg)
public int getPriority()
getPriority in interface ScanListenerpublic boolean isRootScannable(Path root)
isRootScannable in interface ScanListenerpublic boolean isScanMatch(CharBuffer annotationName)
ScanListener
isScanMatch in interface ScanListener
public void classMatchEvent(EnvironmentClassLoader loader,
Path root,
java.lang.String className)
classMatchEvent in interface ScanListenerpublic java.lang.Object writeReplace()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||