g-Eclipse
Release 1.0.0

eu.geclipse.core.jobs
Class GridJobCreator

java.lang.Object
  extended by eu.geclipse.core.model.impl.AbstractGridElementCreator
      extended by eu.geclipse.core.model.impl.AbstractGridJobCreator
          extended by eu.geclipse.core.jobs.GridJobCreator
All Implemented Interfaces:
ICreatorSourceMatcher, IGridElementCreator, IGridJobCreator

public class GridJobCreator
extends AbstractGridJobCreator
implements ICreatorSourceMatcher

GridJobCreator creates grid jobs. A GridJob object is middleware independent and contains a GridJobID, IGridJobDescription and GridJobStatus. These last three components can be middleware dependent.


Constructor Summary
GridJobCreator()
           
 
Method Summary
 boolean canCreate(java.lang.Object source)
          Matcher method that determines if the corresponding IGridElementCreator can create an IGridElement from the specified object.
 IGridElement create(IGridContainer parent)
          Create an element and set it to be a child of the specified IGridContainer.
 IGridJob create(IGridContainer parent, IGridJobID id, IGridJobService jobService, java.lang.String jobName)
          Creates GridJob and add this to GridProjectView.
 
Methods inherited from class eu.geclipse.core.model.impl.AbstractGridJobCreator
canCreate, getDescription
 
Methods inherited from class eu.geclipse.core.model.impl.AbstractGridElementCreator
create, getSource, setSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface eu.geclipse.core.model.IGridElementCreator
create, getSource, setSource
 

Constructor Detail

GridJobCreator

public GridJobCreator()
Method Detail

create

public IGridElement create(IGridContainer parent)
                    throws ProblemException
Description copied from interface: IGridElementCreator
Create an element and set it to be a child of the specified IGridContainer. The element is created from the object that was specified in a former call to IGridElementCreator.setSource(Object). If the creation fails a ProblemException will be thrown.

Specified by:
create in interface IGridElementCreator
Parameters:
parent - The parent of the newly created element.
Returns:
The newly created element.
Throws:
ProblemException - If any problem occurs while the new element is created. For instance if a source object is needed to create the element but was not defined before.

canCreate

public boolean canCreate(java.lang.Object source)
Description copied from interface: ICreatorSourceMatcher
Matcher method that determines if the corresponding IGridElementCreator can create an IGridElement from the specified object.

Specified by:
canCreate in interface ICreatorSourceMatcher
Parameters:
source - The object from which to create an element.
Returns:
True if the corresponding creator is potentially able to create elements from the specified object.

create

public IGridJob create(IGridContainer parent,
                       IGridJobID id,
                       IGridJobService jobService,
                       java.lang.String jobName)
                throws ProblemException
Description copied from interface: IGridJobCreator
Creates GridJob and add this to GridProjectView. This method is called after successful job submission.

Specified by:
create in interface IGridJobCreator
Parameters:
parent - - The parent node in GridProjectView
id - - Identifier of job
jobName - - name under which job should be stored in the workspace
Returns:
created job
Throws:
ProblemException

g-Eclipse
Release 1.0.0