Package org.atmosphere.cpr
Class AtmosphereFramework.DefaultAtmosphereObjectFactory
- java.lang.Object
-
- org.atmosphere.cpr.AtmosphereFramework.DefaultAtmosphereObjectFactory
-
- All Implemented Interfaces:
AtmosphereObjectFactory<java.lang.Object>,AtmosphereConfigAware
- Enclosing class:
- AtmosphereFramework
public static class AtmosphereFramework.DefaultAtmosphereObjectFactory extends java.lang.Object implements AtmosphereObjectFactory<java.lang.Object>
-
-
Constructor Summary
Constructors Constructor Description DefaultAtmosphereObjectFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AtmosphereObjectFactoryallowInjectionOf(java.lang.Object o)Pass information to the underlying Dependency Injection Implementationvoidconfigure(AtmosphereConfig config)Configure an AtmosphereFramework object.<T,U extends T>
UnewClassInstance(java.lang.Class<T> classType, java.lang.Class<U> defaultType)Delegate the creation of Object to the underlying object provider like Spring, Guice, etc.java.lang.StringtoString()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
configure
public void configure(AtmosphereConfig config)
Description copied from interface:AtmosphereConfigAwareConfigure an AtmosphereFramework object.- Specified by:
configurein interfaceAtmosphereConfigAware- Parameters:
config-AtmosphereConfig
-
newClassInstance
public <T,U extends T> U newClassInstance(java.lang.Class<T> classType, java.lang.Class<U> defaultType) throws java.lang.InstantiationException, java.lang.IllegalAccessExceptionDescription 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<java.lang.Object>- Parameters:
classType- The class' type to be createddefaultType- a class to be created @return an instance of T- Throws:
java.lang.InstantiationExceptionjava.lang.IllegalAccessException
-
allowInjectionOf
public AtmosphereObjectFactory allowInjectionOf(java.lang.Object o)
Description copied from interface:AtmosphereObjectFactoryPass information to the underlying Dependency Injection Implementation- Specified by:
allowInjectionOfin interfaceAtmosphereObjectFactory<java.lang.Object>- Parameters:
o- an Z- Returns:
- this
-
-