org.eclipse.emf.ecp.core.rap.sessionprovider.test
Class MockSessionProvider

java.lang.Object
  extended by org.eclipse.emf.ecp.core.rap.sessionprovider.test.MockSessionProvider
All Implemented Interfaces:
SessionProvider

public class MockSessionProvider
extends Object
implements SessionProvider

This s a mock session provider for testing, it does not recieve a web session.

Author:
neilmack

Nested Class Summary
static class MockSessionProvider.SessionProviderType
           
 
Constructor Summary
MockSessionProvider()
          default constructor.
 
Method Summary
static MockSessionProvider getInstance()
          returns the provider instance.
 String getSessionId()
          get the current sessions ID.
static void setSessionProvider(MockSessionProvider.SessionProviderType type)
          sets the type of the session provider.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockSessionProvider

public MockSessionProvider()
default constructor.

Method Detail

getInstance

public static MockSessionProvider getInstance()
returns the provider instance.

Returns:
the provider instance

setSessionProvider

public static void setSessionProvider(MockSessionProvider.SessionProviderType type)
sets the type of the session provider. this determines whether the provider gives the same id each time it is asked for a sessionID or a different one each time.

Parameters:
type - the type

getSessionId

public final String getSessionId()
Description copied from interface: SessionProvider
get the current sessions ID.

Specified by:
getSessionId in interface SessionProvider
Returns:
the current sessions ID


Copyright © 2015. All Rights Reserved.