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>
AtmosphereFramework.DefaultAtmosphereObjectFactory
public AtmosphereFramework.DefaultAtmosphereObjectFactory()
toString
public String toString()
- Overrides:
toString in class Object
configure
public void configure(AtmosphereConfig config)
- Description copied from interface:
AtmosphereConfigAware
- Configure an AtmosphereFramework object.
- Specified by:
configure in interface AtmosphereConfigAware
- Parameters:
config - AtmosphereConfig
newClassInstance
public <T,U extends T> U newClassInstance(Class<T> classType,
Class<U> defaultType)
throws InstantiationException,
IllegalAccessException
- Description copied from interface:
AtmosphereObjectFactory
- Delegate 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 the
AtmosphereConfigAware. AtmosphereConfigAware.configure(AtmosphereConfig)
should be called in that case.
- Specified by:
newClassInstance in interface AtmosphereObjectFactory<Object>
- Parameters:
classType - The class' type to be createddefaultType - a class to be created @return an instance of T
- Throws:
InstantiationException
IllegalAccessException
allowInjectionOf
public AtmosphereObjectFactory allowInjectionOf(Object o)
- Description copied from interface:
AtmosphereObjectFactory
- Pass information to the underlying Dependency Injection Implementation
- Specified by:
allowInjectionOf in interface AtmosphereObjectFactory<Object>
- Parameters:
o - an Z
- Returns:
- this
Copyright © 2015. All Rights Reserved.