Package org.atmosphere.cpr
Class AtmosphereFramework.DefaultAtmosphereObjectFactory
java.lang.Object
org.atmosphere.cpr.AtmosphereFramework.DefaultAtmosphereObjectFactory
- All Implemented Interfaces:
AtmosphereObjectFactory<Object>,AtmosphereConfigAware
- Enclosing class:
AtmosphereFramework
public static class AtmosphereFramework.DefaultAtmosphereObjectFactory
extends Object
implements AtmosphereObjectFactory<Object>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPass information to the underlying Dependency Injection Implementationvoidconfigure(AtmosphereConfig config) Configure an AtmosphereFramework object.<T,U extends T>
UnewClassInstance(Class<T> classType, Class<U> defaultType) Delegate the creation of Object to the underlying object provider like Spring, Guice, etc.toString()
-
Constructor Details
-
DefaultAtmosphereObjectFactory
public DefaultAtmosphereObjectFactory()
-
-
Method Details
-
toString
-
configure
Description copied from interface:AtmosphereConfigAwareConfigure an AtmosphereFramework object.- Specified by:
configurein interfaceAtmosphereConfigAware- Parameters:
config-AtmosphereConfig
-
newClassInstance
public <T,U extends T> U newClassInstance(Class<T> classType, Class<U> defaultType) throws InstantiationException, IllegalAccessException Description copied from interface:AtmosphereObjectFactoryDelegate the creation of Object to the underlying object provider like Spring, Guice, etc. When creating a class, it is important to check if the class can be configured via its implementation of theAtmosphereConfigAware.AtmosphereConfigAware.configure(AtmosphereConfig)should be called in that case.- Specified by:
newClassInstancein interfaceAtmosphereObjectFactory<Object>- Parameters:
classType- The class' type to be createddefaultType- a class to be created @return an instance of T- Throws:
InstantiationExceptionIllegalAccessException
-
allowInjectionOf
Description copied from interface:AtmosphereObjectFactoryPass information to the underlying Dependency Injection Implementation- Specified by:
allowInjectionOfin interfaceAtmosphereObjectFactory<Object>- Parameters:
o- an Z- Returns:
- this
-