org.jboss.webbeans.bootstrap.api
Interface Singleton<T>


public interface Singleton<T>

Holds a reference to an application singleton. This singleton is used internally by Web Beans to store various application scoped objects. This allows Web Beans to operate as a shared library. In a shared mode, the same instance of WebBeans implementation is used by all the applications in a server environment. In the exclusive mode, each application loads a separate copy of WebBeans implementation at the application level. Alternative implementations of Singleton can be used as required

Author:
Sanjeeb.Sahoo@Sun.COM, Pete Muir
See Also:
SingletonProvider

Method Summary
 T get()
          Access the singleton
 void set(T object)
          Store a singleton
 

Method Detail

get

T get()
Access the singleton

Returns:
a singleton object

set

void set(T object)
Store a singleton

Parameters:
object - the object to store


Copyright © 2011. All Rights Reserved.