Interface AtmosphereObjectFactory<Z>

    • Method Detail

      • newClassInstance

        <T,​U extends T> T newClassInstance​(java.lang.Class<T> classType,
                                                 java.lang.Class<U> defaultType)
                                          throws java.lang.InstantiationException,
                                                 java.lang.IllegalAccessException
        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.
        Parameters:
        classType - The class' type to be created
        defaultType - a class to be created @return an instance of T
        Throws:
        java.lang.InstantiationException
        java.lang.IllegalAccessException
      • allowInjectionOf

        AtmosphereObjectFactory allowInjectionOf​(Z z)
        Pass information to the underlying Dependency Injection Implementation
        Parameters:
        z - an Z
        Returns:
        this