Skip navigation links
com.caucho.config.inject

Class SingletonBean<T>

    • Method Detail

      • create

        public T create(CreationalContext<T> env)
        Description copied from interface: Contextual
        Creates a new instance for the Contextual's type. If the instance already exists in the CreationalContext, create will return it instead of creating a new instance.
        1. create an instance of the bean
        2. create interceptor and decorator stacks
        3. inject dependencies
        4. set any XML-configured values
        5. call @PostConstruct
        Specified by:
        create in interface Contextual<T>
        Specified by:
        create in class AbstractSingletonBean<T>
        Parameters:
        env - the creation context used to support circular references.
        Returns:
        the new instance
      • close

        public void close()
        Frees the singleton on environment shutdown
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface java.lang.AutoCloseable
        Overrides:
        close in class AbstractSingletonBean<T>