ColdBox Platform Version 3.7.0

coldbox.system.ioc.scopes
Class Singleton

WEB-INF.cftags.component
        extended by coldbox.system.ioc.scopes.Singleton
All Implemented Interfaces:
IScope

public class Singleton
extends WEB-INF.cftags.component

I am the singleton scope


Constructor Summary
init(any<Injector> injector)
          Configure the scope for operation
 
Method Summary
 void clear()
          Clear the singletons scope and re-create it
 any getFromScope(any<Mapping> mapping, [any<struct> initArguments])
          Retrieve an object from scope or create it if not found in scope
 any<java.util.concurrent.ConcurrentHashMap> getSingletons()
          Get all singletons structure
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(any<Injector> injector)
Configure the scope for operation

Parameters:
injector - The linked WireBox injector: coldbox.system.ioc.Injector
Method Detail

clear

public void clear()
Clear the singletons scope and re-create it


getFromScope

public any getFromScope(any<Mapping> mapping, [any<struct> initArguments])
Retrieve an object from scope or create it if not found in scope

Specified by:
getFromScope in interface IScope
Parameters:
mapping - The object mapping: coldbox.system.ioc.config.Mapping
initArguments - The constructor structure of arguments to passthrough when initializing the instance

getSingletons

public any<java.util.concurrent.ConcurrentHashMap> getSingletons()
Get all singletons structure


ColdBox Platform Version 3.7.0