Eclipse Remote Application Platform

org.eclipse.rap.rwt
Class SessionSingletonBase

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

Deprecated. use SingletonUtil instead

public abstract class SessionSingletonBase
extends java.lang.Object

SessionSingletonBase creates and manages a unique instance of a given 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 {

   private FooSingleton() {}

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

Since:
2.0

Constructor Summary
SessionSingletonBase()
          Deprecated.  
 
Method Summary
static
<T> T
getInstance(java.lang.Class<T> type)
          Deprecated. 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
 

Constructor Detail

SessionSingletonBase

public SessionSingletonBase()
Deprecated. 
Method Detail

getInstance

public static <T> T getInstance(java.lang.Class<T> type)
Deprecated. 
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. The specified type must have a parameterless 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 Remote Application Platform

Copyright (c) EclipseSource and others 2002, 2013. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0