org.ogf.saga.job
Class JobFactory

java.lang.Object
  extended by org.ogf.saga.job.JobFactory

public abstract class JobFactory
extends Object

Factory for objects from the job package.


Constructor Summary
JobFactory()
           
 
Method Summary
static JobDescription createJobDescription()
          Creates a job description.
static JobDescription createJobDescription(String sagaFactoryClassname)
          Creates a job description.
static JobService createJobService()
          Creates a job service, using the default session and default contact string.
static JobService createJobService(Session session)
          Creates a job service using the default contact string.
static JobService createJobService(Session session, URL rm)
          Creates a job service.
static JobService createJobService(String sagaFactoryClassname)
          Creates a job service, using the default session and default contact string.
static JobService createJobService(String sagaFactoryClassname, Session session)
          Creates a job service using the default contact string.
static JobService createJobService(String sagaFactoryClassname, Session session, URL rm)
          Creates a job service.
static Task<JobFactory,JobService> createJobService(String sagaFactoryClassname, TaskMode mode)
          Creates a task that creates a job service, using the default session and default contact string.
static Task<JobFactory,JobService> createJobService(String sagaFactoryClassname, TaskMode mode, Session session)
          Creates a task that creates a job service, using a default contact string.
static Task<JobFactory,JobService> createJobService(String sagaFactoryClassname, TaskMode mode, Session session, URL rm)
          Creates a task that creates a job service.
static Task<JobFactory,JobService> createJobService(String sagaFactoryClassname, TaskMode mode, URL rm)
          Creates a task that creates a job service, using the default session.
static JobService createJobService(String sagaFactoryClassname, URL rm)
          Creates a job service, using the default session.
static Task<JobFactory,JobService> createJobService(TaskMode mode)
          Creates a task that creates a job service, using the default session and default contact string.
static Task<JobFactory,JobService> createJobService(TaskMode mode, Session session)
          Creates a task that creates a job service, using a default contact string.
static Task<JobFactory,JobService> createJobService(TaskMode mode, Session session, URL rm)
          Creates a task that creates a job service.
static Task<JobFactory,JobService> createJobService(TaskMode mode, URL rm)
          Creates a task that creates a job service, using the default session.
static JobService createJobService(URL rm)
          Creates a job service, using the default session.
protected abstract  JobDescription doCreateJobDescription()
          Creates a job description.
protected abstract  JobService doCreateJobService(Session session, URL rm)
          Creates a job service.
protected abstract  Task<JobFactory,JobService> doCreateJobService(TaskMode mode, Session session, URL rm)
          Creates a task that creates a job service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobFactory

public JobFactory()
Method Detail

doCreateJobDescription

protected abstract JobDescription doCreateJobDescription()
                                                  throws NotImplementedException,
                                                         NoSuccessException
Creates a job description. To be provided by the implementation.

Returns:
the job description.
Throws:
NotImplementedException
NoSuccessException

doCreateJobService

protected abstract JobService doCreateJobService(Session session,
                                                 URL rm)
                                          throws NotImplementedException,
                                                 BadParameterException,
                                                 IncorrectURLException,
                                                 AuthenticationFailedException,
                                                 AuthorizationFailedException,
                                                 PermissionDeniedException,
                                                 TimeoutException,
                                                 NoSuccessException
Creates a job service. To be provided by the implementation.

Parameters:
session - the session handle.
rm - contact string for the resource manager.
Returns:
the job service.
Throws:
NotImplementedException
BadParameterException
IncorrectURLException
AuthenticationFailedException
AuthorizationFailedException
PermissionDeniedException
TimeoutException
NoSuccessException

doCreateJobService

protected abstract Task<JobFactory,JobService> doCreateJobService(TaskMode mode,
                                                                  Session session,
                                                                  URL rm)
                                                           throws NotImplementedException
Creates a task that creates a job service. To be provided by the implementation.

Parameters:
mode - the task mode.
session - the session handle.
rm - contact string for the resource manager.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.

createJobDescription

public static JobDescription createJobDescription()
                                           throws NotImplementedException,
                                                  NoSuccessException
Creates a job description.

Returns:
the job description.
Throws:
NotImplementedException - is thrown when this method is not implemented.
NoSuccessException - is thrown when the Saga factory could not be created.

createJobDescription

public static JobDescription createJobDescription(String sagaFactoryClassname)
                                           throws NotImplementedException,
                                                  NoSuccessException
Creates a job description.

Parameters:
sagaFactoryClassname - the class name of the Saga factory to be used.
Returns:
the job description.
Throws:
NotImplementedException - is thrown when this method is not implemented.
NoSuccessException - is thrown when the Saga factory could not be created.

createJobService

public static JobService createJobService(Session session,
                                          URL rm)
                                   throws NotImplementedException,
                                          BadParameterException,
                                          IncorrectURLException,
                                          AuthenticationFailedException,
                                          AuthorizationFailedException,
                                          PermissionDeniedException,
                                          TimeoutException,
                                          NoSuccessException
Creates a job service.

Parameters:
session - the session handle.
rm - contact string for the resource manager.
Returns:
the job service.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
IncorrectURLException - is thrown when an implementation cannot handle the specified protocol, or that access to the specified entity via the given protocol is impossible.
BadParameterException - is thrown if the specified URL cannot be contacted, or a default contact point does not exist or cannot be found.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

createJobService

public static JobService createJobService(String sagaFactoryClassname,
                                          Session session,
                                          URL rm)
                                   throws NotImplementedException,
                                          BadParameterException,
                                          IncorrectURLException,
                                          AuthenticationFailedException,
                                          AuthorizationFailedException,
                                          PermissionDeniedException,
                                          TimeoutException,
                                          NoSuccessException
Creates a job service.

Parameters:
sagaFactoryClassname - the class name of the Saga factory to be used.
session - the session handle.
rm - contact string for the resource manager.
Returns:
the job service.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
IncorrectURLException - is thrown when an implementation cannot handle the specified protocol, or that access to the specified entity via the given protocol is impossible.
BadParameterException - is thrown if the specified URL cannot be contacted, or a default contact point does not exist or cannot be found.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

createJobService

public static JobService createJobService(Session session)
                                   throws NotImplementedException,
                                          BadParameterException,
                                          IncorrectURLException,
                                          AuthenticationFailedException,
                                          AuthorizationFailedException,
                                          PermissionDeniedException,
                                          TimeoutException,
                                          NoSuccessException
Creates a job service using the default contact string.

Parameters:
session - the session handle.
Returns:
the job service.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
IncorrectURLException - is thrown when an implementation cannot handle the specified protocol, or that access to the specified entity via the given protocol is impossible.
BadParameterException - is thrown if a default contact point does not exist or cannot be found.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

createJobService

public static JobService createJobService(String sagaFactoryClassname,
                                          Session session)
                                   throws NotImplementedException,
                                          BadParameterException,
                                          IncorrectURLException,
                                          AuthenticationFailedException,
                                          AuthorizationFailedException,
                                          PermissionDeniedException,
                                          TimeoutException,
                                          NoSuccessException
Creates a job service using the default contact string.

Parameters:
sagaFactoryClassname - the class name of the Saga factory to be used.
session - the session handle.
Returns:
the job service.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
IncorrectURLException - is thrown when an implementation cannot handle the specified protocol, or that access to the specified entity via the given protocol is impossible.
BadParameterException - is thrown if a default contact point does not exist or cannot be found.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

createJobService

public static JobService createJobService(URL rm)
                                   throws NotImplementedException,
                                          BadParameterException,
                                          IncorrectURLException,
                                          AuthenticationFailedException,
                                          AuthorizationFailedException,
                                          PermissionDeniedException,
                                          TimeoutException,
                                          NoSuccessException
Creates a job service, using the default session.

Parameters:
rm - contact string for the resource manager.
Returns:
the job service.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
IncorrectURLException - is thrown when an implementation cannot handle the specified protocol, or that access to the specified entity via the given protocol is impossible.
BadParameterException - is thrown if the specified URL cannot be contacted, or a default contact point does not exist or cannot be found.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

createJobService

public static JobService createJobService(String sagaFactoryClassname,
                                          URL rm)
                                   throws NotImplementedException,
                                          BadParameterException,
                                          IncorrectURLException,
                                          AuthenticationFailedException,
                                          AuthorizationFailedException,
                                          PermissionDeniedException,
                                          TimeoutException,
                                          NoSuccessException
Creates a job service, using the default session.

Parameters:
sagaFactoryClassname - the class name of the Saga factory to be used.
rm - contact string for the resource manager.
Returns:
the job service.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
IncorrectURLException - is thrown when an implementation cannot handle the specified protocol, or that access to the specified entity via the given protocol is impossible.
BadParameterException - is thrown if the specified URL cannot be contacted, or a default contact point does not exist or cannot be found.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

createJobService

public static JobService createJobService()
                                   throws NotImplementedException,
                                          BadParameterException,
                                          IncorrectURLException,
                                          AuthenticationFailedException,
                                          AuthorizationFailedException,
                                          PermissionDeniedException,
                                          TimeoutException,
                                          NoSuccessException
Creates a job service, using the default session and default contact string.

Returns:
the job service.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
IncorrectURLException - is thrown when an implementation cannot handle the specified protocol, or that access to the specified entity via the given protocol is impossible.
BadParameterException - is thrown if a default contact point does not exist or cannot be found.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

createJobService

public static JobService createJobService(String sagaFactoryClassname)
                                   throws NotImplementedException,
                                          BadParameterException,
                                          IncorrectURLException,
                                          AuthenticationFailedException,
                                          AuthorizationFailedException,
                                          PermissionDeniedException,
                                          TimeoutException,
                                          NoSuccessException
Creates a job service, using the default session and default contact string.

Parameters:
sagaFactoryClassname - the class name of the Saga factory to be used.
Returns:
the job service.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
IncorrectURLException - is thrown when an implementation cannot handle the specified protocol, or that access to the specified entity via the given protocol is impossible.
BadParameterException - is thrown if a default contact point does not exist or cannot be found.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

createJobService

public static Task<JobFactory,JobService> createJobService(TaskMode mode,
                                                           Session session,
                                                           URL rm)
                                                    throws NotImplementedException,
                                                           NoSuccessException
Creates a task that creates a job service.

Parameters:
mode - the task mode.
session - the session handle.
rm - contact string for the resource manager.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.
NoSuccessException - is thrown when the Saga factory could not be created.

createJobService

public static Task<JobFactory,JobService> createJobService(String sagaFactoryClassname,
                                                           TaskMode mode,
                                                           Session session,
                                                           URL rm)
                                                    throws NotImplementedException,
                                                           NoSuccessException
Creates a task that creates a job service.

Parameters:
sagaFactoryClassname - the class name of the Saga factory to be used.
mode - the task mode.
session - the session handle.
rm - contact string for the resource manager.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.
NoSuccessException - is thrown when the Saga factory could not be created.

createJobService

public static Task<JobFactory,JobService> createJobService(TaskMode mode,
                                                           Session session)
                                                    throws NotImplementedException,
                                                           NoSuccessException
Creates a task that creates a job service, using a default contact string.

Parameters:
mode - the task mode.
session - the session handle.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.
NoSuccessException - is thrown when the Saga factory could not be created.

createJobService

public static Task<JobFactory,JobService> createJobService(String sagaFactoryClassname,
                                                           TaskMode mode,
                                                           Session session)
                                                    throws NotImplementedException,
                                                           NoSuccessException
Creates a task that creates a job service, using a default contact string.

Parameters:
sagaFactoryClassname - the class name of the Saga factory to be used.
mode - the task mode.
session - the session handle.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.
NoSuccessException - is thrown when the Saga factory could not be created.

createJobService

public static Task<JobFactory,JobService> createJobService(TaskMode mode,
                                                           URL rm)
                                                    throws NotImplementedException,
                                                           NoSuccessException
Creates a task that creates a job service, using the default session.

Parameters:
mode - the task mode.
rm - contact string for the resource manager.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.
NoSuccessException - is thrown when the Saga factory could not be created or when the default session could not be created.

createJobService

public static Task<JobFactory,JobService> createJobService(String sagaFactoryClassname,
                                                           TaskMode mode,
                                                           URL rm)
                                                    throws NotImplementedException,
                                                           NoSuccessException
Creates a task that creates a job service, using the default session.

Parameters:
sagaFactoryClassname - the class name of the Saga factory to be used.
mode - the task mode.
rm - contact string for the resource manager.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.
NoSuccessException - is thrown when the Saga factory could not be created or when the default session could not be created.

createJobService

public static Task<JobFactory,JobService> createJobService(TaskMode mode)
                                                    throws NotImplementedException,
                                                           NoSuccessException
Creates a task that creates a job service, using the default session and default contact string.

Parameters:
mode - the task mode.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.
NoSuccessException - is thrown when the Saga factory could not be created or when the default session could not be created.

createJobService

public static Task<JobFactory,JobService> createJobService(String sagaFactoryClassname,
                                                           TaskMode mode)
                                                    throws NotImplementedException,
                                                           NoSuccessException
Creates a task that creates a job service, using the default session and default contact string.

Parameters:
sagaFactoryClassname - the class name of the Saga factory to be used.
mode - the task mode.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.
NoSuccessException - is thrown when the Saga factory could not be created or when the default session could not be created.


Copyright © 2014 Open Grid Forum. All rights reserved.