org.atmosphere.guice
Class GuiceObjectFactory

java.lang.Object
  extended by org.atmosphere.guice.GuiceObjectFactory
All Implemented Interfaces:
org.atmosphere.cpr.AtmosphereObjectFactory<com.google.inject.AbstractModule>, org.atmosphere.inject.AtmosphereConfigAware

public class GuiceObjectFactory
extends Object
implements org.atmosphere.cpr.AtmosphereObjectFactory<com.google.inject.AbstractModule>

An AtmosphereObjectFactory for Guice

Author:
Jean-Francois Arcand

Field Summary
protected  org.atmosphere.cpr.AtmosphereConfig config
           
protected  com.google.inject.Injector injector
           
 
Constructor Summary
GuiceObjectFactory()
           
 
Method Summary
 org.atmosphere.cpr.AtmosphereObjectFactory allowInjectionOf(com.google.inject.AbstractModule module)
           
 void configure(org.atmosphere.cpr.AtmosphereConfig config)
           
protected  void initInjector(org.atmosphere.cpr.AtmosphereFramework framework)
           
<T,U extends T>
U
newClassInstance(Class<T> classType, Class<U> classToInstantiate)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

injector

protected com.google.inject.Injector injector

config

protected org.atmosphere.cpr.AtmosphereConfig config
Constructor Detail

GuiceObjectFactory

public GuiceObjectFactory()
Method Detail

configure

public void configure(org.atmosphere.cpr.AtmosphereConfig config)
Specified by:
configure in interface org.atmosphere.inject.AtmosphereConfigAware

newClassInstance

public <T,U extends T> U newClassInstance(Class<T> classType,
                                          Class<U> classToInstantiate)
                             throws InstantiationException,
                                    IllegalAccessException
Specified by:
newClassInstance in interface org.atmosphere.cpr.AtmosphereObjectFactory<com.google.inject.AbstractModule>
Throws:
InstantiationException
IllegalAccessException

toString

public String toString()
Overrides:
toString in class Object

initInjector

protected void initInjector(org.atmosphere.cpr.AtmosphereFramework framework)

allowInjectionOf

public org.atmosphere.cpr.AtmosphereObjectFactory allowInjectionOf(com.google.inject.AbstractModule module)
Specified by:
allowInjectionOf in interface org.atmosphere.cpr.AtmosphereObjectFactory<com.google.inject.AbstractModule>


Copyright © 2015. All Rights Reserved.