Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Rich Ajax Platform
Release 1.2

org.eclipse.rwt
Class SessionSingletonBase


java.lang.Object
  extended by
org.eclipse.rwt.SessionSingletonBase

public abstract class SessionSingletonBase
extends Object

Subclasses of SessionSingletonBase provide access to a unique instance of their type with session scope. This means that in the context of one user session getInstance(Class) will always return the same object, but for different user sessions the returned instances will be different.

usage:

 public class FooSingleton extends SessionSingletonBase {
  
   private FooSingleton() {}
 
   public static FooSingleton getInstance() {
     return ( FooSingleton )getInstance( FooSingleton.class );
   }
 }
 

Since:
1.0

Field Summary
static  String LOCK
          IMPORTANT: This constant is not part of the RWT public API.
 
Constructor Summary
SessionSingletonBase ()
           
 
Method Summary
static  Object getInstance ( Class type)
          Returns the singleton instance of the specified type that is stored in the current session context.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCK

public static final 
String LOCK
IMPORTANT: This constant is not part of the RWT public API. It is marked public only so that it can be shared within the packages provided by RWT. It should never be referenced from application code.

Constructor Detail

SessionSingletonBase

public SessionSingletonBase()
Method Detail

getInstance

public static 
Object getInstance(
Class type)
Returns the singleton instance of the specified type that is stored in the current session context. If no instance exists yet, a new one will be created. Therefore the specified type should have an parameterless default constructor.

Parameters:
type - specifies the session singleton instance type.
Returns:
the unique instance of the specified type that is associated with the current user session context.

Eclipse Rich Ajax Platform
Release 1.2

Copyright (c) Innoopract Informationssysteme GmbH and others 2002, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire