|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.inject.InjectableObjectFactory
public class InjectableObjectFactory
Support injection of Atmosphere's Internal object using
AtmosphereConfig,AtmosphereFramework,{@link AtmosphereFramework,{@link org.atmosphere.cpr.BroadcasterFactory,
{@link org.atmosphere.cpr.AtmosphereResourceFactory } ,{@link org.atmosphere.cpr.DefaultMetaBroadcaster } and
{@link org.atmosphere.cpr.AtmosphereResourceSessionFactory }
| Field Summary | |
|---|---|
static Class<Injectable<?>>[] |
DEFAULT_ATMOSPHERE_INJECTABLE
|
protected static org.slf4j.Logger |
logger
|
| Constructor Summary | |
|---|---|
InjectableObjectFactory()
|
|
| Method Summary | ||
|---|---|---|
AtmosphereObjectFactory |
allowInjectionOf(Injectable<?> injectable)
Pass information to the underlying Dependency Injection Implementation |
|
void |
configure(AtmosphereConfig config)
Configure an AtmosphereFramework object. |
|
|
injectAtmosphereInternalObject(U instance,
Class<U> defaultType,
AtmosphereFramework framework)
|
|
|
newClassInstance(Class<T> classType,
Class<U> defaultType)
Delegate the creation of Object to the underlying object provider like Spring, Guice, etc. |
|
|
postConstructExecution(U instance,
Class<U> defaultType)
Execute method. |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final org.slf4j.Logger logger
public static final Class<Injectable<?>>[] DEFAULT_ATMOSPHERE_INJECTABLE
| Constructor Detail |
|---|
public InjectableObjectFactory()
| Method Detail |
|---|
public void configure(AtmosphereConfig config)
AtmosphereConfigAware
configure in interface AtmosphereConfigAwareconfig - AtmosphereConfig
public <T,U extends T> U newClassInstance(Class<T> classType,
Class<U> defaultType)
throws InstantiationException,
IllegalAccessException
AtmosphereObjectFactoryAtmosphereConfigAware. AtmosphereConfigAware.configure(AtmosphereConfig)
should be called in that case.
newClassInstance in interface AtmosphereObjectFactory<Injectable<?>>classType - The class' type to be createddefaultType - a class to be created @return an instance of T
InstantiationException
IllegalAccessException
public <U> void postConstructExecution(U instance,
Class<U> defaultType)
throws IllegalAccessException
U - instance - the requested object.defaultType - the type of the requested object
IllegalAccessException
public <U> void injectAtmosphereInternalObject(U instance,
Class<U> defaultType,
AtmosphereFramework framework)
throws IllegalAccessException
U - instance - the requested object.defaultType - the type of the requested objectframework - the AtmosphereFramework
IllegalAccessExceptionpublic AtmosphereObjectFactory allowInjectionOf(Injectable<?> injectable)
AtmosphereObjectFactory
allowInjectionOf in interface AtmosphereObjectFactory<Injectable<?>>injectable - an Z
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||