org.ogf.saga.context
Class ContextFactory

java.lang.Object
  extended by org.ogf.saga.context.ContextFactory

public abstract class ContextFactory
extends Object

Factory for objects in the saga.context package.


Constructor Summary
ContextFactory()
           
 
Method Summary
static Context createContext()
          Constructs a security context.
static Context createContext(String type)
          Constructs a security context.
static Context createContext(String sagaFactoryClassname, String type)
          Constructs a security context.
protected abstract  Context doCreateContext(String type)
          Constructs a security context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextFactory

public ContextFactory()
Method Detail

doCreateContext

protected abstract Context doCreateContext(String type)
                                    throws IncorrectStateException,
                                           TimeoutException,
                                           NoSuccessException
Constructs a security context. To be provided by the implementation.

Parameters:
type - when set to a non-empty string, Context#setDefaults() is called.
Returns:
the security context.
Throws:
IncorrectStateException
TimeoutException
NoSuccessException

createContext

public static Context createContext(String type)
                             throws IncorrectStateException,
                                    TimeoutException,
                                    NoSuccessException
Constructs a security context.

Parameters:
type - type of the context.
Returns:
the security context.
Throws:
IncorrectStateException
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
NoSuccessException - is thrown if the implementation cannot create valid default values based on the available information.

createContext

public static Context createContext()
                             throws IncorrectStateException,
                                    TimeoutException,
                                    NoSuccessException
Constructs a security context.

Returns:
the security context.
Throws:
IncorrectStateException
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
NoSuccessException - is thrown if the implementation cannot create valid default values based on the available information.

createContext

public static Context createContext(String sagaFactoryClassname,
                                    String type)
                             throws IncorrectStateException,
                                    TimeoutException,
                                    NoSuccessException
Constructs a security context.

Parameters:
sagaFactoryClassname - the class name of the Saga factory to be used.
type - type of the context.
Returns:
the security context.
Throws:
IncorrectStateException
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
NoSuccessException - is thrown if the implementation cannot create valid default values based on the available information.


Copyright © 2014 Open Grid Forum. All rights reserved.