org.ogf.saga.session
Class SessionFactory

java.lang.Object
  extended by org.ogf.saga.session.SessionFactory

public abstract class SessionFactory
extends Object

Factory for creating sessions.


Constructor Summary
SessionFactory()
           
 
Method Summary
static Session createSession()
          Returns the default session, with all the default contexts.
static Session createSession(boolean defaults)
          Creates a session.
static Session createSession(String sagaFactoryClassname)
          Returns the default session, with all the default contexts.
static Session createSession(String sagaFactoryClassname, boolean defaults)
          Creates a session.
protected abstract  Session doCreateSession(boolean defaults)
          Creates a session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionFactory

public SessionFactory()
Method Detail

doCreateSession

protected abstract Session doCreateSession(boolean defaults)
                                    throws NoSuccessException
Creates a session. To be provided by an implementation.

Parameters:
defaults - when set, the default session is returned, with all the default contexts. Later modifications to this session are reflected in the default session.
Returns:
the session.
Throws:
NoSuccessException

createSession

public static Session createSession(boolean defaults)
                             throws NoSuccessException
Creates a session.

Parameters:
defaults - when set, the default session is returned, with all the default contexts. Later modifications to this session are reflected in the default session.
Returns:
the session.
Throws:
NoSuccessException - is thrown if the implementation cannot create valid default values based on the available information.

createSession

public static Session createSession(String sagaFactoryClassname,
                                    boolean defaults)
                             throws NoSuccessException
Creates a session.

Parameters:
sagaFactoryClassname - the class name of the Saga factory to be used.
defaults - when set, the default session is returned, with all the default contexts. Later modifications to this session are reflected in the default session.
Returns:
the session.
Throws:
NoSuccessException - is thrown if the implementation cannot create valid default values based on the available information.

createSession

public static Session createSession()
                             throws NoSuccessException
Returns the default session, with all the default contexts. Later modifications to this session are reflected in the default session.

Returns:
the session.
Throws:
NoSuccessException - is thrown if the implementation cannot create valid default values based on the available information.

createSession

public static Session createSession(String sagaFactoryClassname)
                             throws NoSuccessException
Returns the default session, with all the default contexts. Later modifications to this session are reflected in the default session.

Parameters:
sagaFactoryClassname - the class name of the Saga factory to be used.
Returns:
the session.
Throws:
NoSuccessException - is thrown if the implementation cannot create valid default values based on the available information.


Copyright © 2014 Open Grid Forum. All rights reserved.