org.atmosphere.cpr
Class AtmosphereFramework.DefaultAtmosphereObjectFactory

java.lang.Object
  extended by 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
AtmosphereFramework.DefaultAtmosphereObjectFactory()
           
 
Method Summary
 AtmosphereObjectFactory allowInjectionOf(Object o)
          Pass information to the underlying Dependency Injection Implementation
 void configure(AtmosphereConfig config)
          Configure an AtmosphereFramework object.
<T,U extends T>
U
newClassInstance(Class<T> classType, Class<U> defaultType)
          Delegate the creation of Object to the underlying object provider like Spring, Guice, etc.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AtmosphereFramework.DefaultAtmosphereObjectFactory

public AtmosphereFramework.DefaultAtmosphereObjectFactory()
Method Detail

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 created
defaultType - 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.