|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.kwfgrid.gwes.client.RemoteGWES
public class RemoteGWES
Class that provides local GWES interface and invokes remote GWES using Axis2 stubs. Singleton pattern. Caches connector objects.
| Field Summary | |
|---|---|
protected static Pattern |
PATTERN_WORKFLOW_NOT_AVAILABLE
|
| Method Summary | |
|---|---|
void |
abort(String workflowID,
String userID)
Abort a workflow with a certain identifier. |
String[][] |
getActivityStatusArray(String workflowID,
String userID)
Get the status array of all instantiated activities of a given workflow. |
String[] |
getAvailableResources(String ofClass,
String userID)
Get a list of all available resources. |
String[] |
getCheckpoints(String workflowID,
String userID)
Get the path of all available checkpoints for a specific workflow. |
String[] |
getData(String workflowID,
String placeID,
String userID)
Get some data that is hold inside a specific workflow and that is referenced by a data place identifier. |
String |
getDescription(String workflowID,
String userID)
Get the human-readable description for a specific workflow. |
static RemoteGWES |
getInstance()
Create new or return existing RemoteGWES instance to GWES with service URL as specified by system property. |
static RemoteGWES |
getInstance(String gwesServiceUrl)
Create new or return existing RemoteGWES instance to GWES with service URL as specified by paramter gwesServiceUrl. |
String[][] |
getProperties(String workflowID,
String userID)
Get all propertries of a specific workflow. |
String |
getProperty(String workflowID,
String name,
String userID)
Get the value of a specific workflow property. |
String |
getResourceDescription(String resourceUri,
String userID)
Get the resource description of a specific resource in D-GRDL syntax. |
int |
getStatus(String workflowID,
String userID)
Get the current status code of the workflow specified by its identifier. |
String |
getWorkflowDescription(String workflowID,
String userID)
Get the current Generic Workflow Description document of the workflow specified by its identifier. |
String[] |
getWorkflowIDs(int level,
String userID)
Get the identifiers of all the workflows that are handled by this Generic Workflow Execution Service. |
String[][] |
getWorkflowStatusArray(int level,
String userID)
Get the workflow status of all currently available workflows. |
String |
initiate(String gworkflowdl,
String userID)
Interface GWES |
void |
remove(String workflowID,
int level,
String userID)
Remove a specific workflow from memory, database, and/or its temporary data on the Grid nodes. |
String |
restart(String workflowID,
String userID)
Restart a workflow with a certain identifier from the beginning. |
String |
restore(String workflowID,
String userID)
Restores a workflow from the XML database. |
void |
resume(String workflowID,
String userID)
Resume a workflow with a certain identifier. |
void |
setDescription(String workflowID,
String description,
String userID)
Set the human-readable description for a specific workflow. |
void |
setProperty(String workflowID,
String name,
String value,
String userID)
Set the value of a specific workflow property. |
void |
setTimeout(long timeout)
Sets the timeout for the connection with the remote gwes in milli seconds. |
void |
setWorkflowDescription(String workflowID,
String gworkflowdl,
String userID)
Overwrite the current Generic Workflow Description document of the workflow specified by its identifier. |
void |
start(String workflowID,
String userID)
Start a workflow with a certain identifier. |
String |
store(String workflowID,
String userID)
Store a workflow in the XML workflow database. |
void |
suspend(String workflowID,
String userID)
Suspend a workflow with a certain identifier. |
int |
waitForStatusChangeFrom(String workflowID,
int oldStatus,
String userID)
Wait for workflow to change its status from an specified status. |
int |
waitForStatusChangeToCompletedOrTerminated(String workflowID,
String userID)
Wait for workflow to change its status to final states COMPLETED or TERMINATED. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Pattern PATTERN_WORKFLOW_NOT_AVAILABLE
| Method Detail |
|---|
public static RemoteGWES getInstance()
throws Exception
ExceptionConstants.PROP_SYSTEM_GWES_SERVICE_BASE_URL_INTERNAL
public static RemoteGWES getInstance(String gwesServiceUrl)
throws Exception
Exceptionpublic void setTimeout(long timeout)
Options.DEFAULT_TIMEOUT_MILLISECONDS
timeout - The timeout in milli seconds.
public String initiate(String gworkflowdl,
String userID)
throws net.kwfgrid.gworkflowdl.structure.WorkflowFormatException,
StateTransitionException,
LoggingException,
GWESException,
WorkflowSecurityException,
RemoteException
initiate in interface GWESgworkflowdl - The description of the workflow.userID - userID|credential: The ID of the user who owns the workflow. Use the DN of the
certificate if available. The optional user credential is separated from userID by "|".
user ID MUST NOT contain "|" or spaces!
net.kwfgrid.gworkflowdl.structure.WorkflowFormatException
StateTransitionException
LoggingException
GWESException
WorkflowSecurityException
RemoteException
public void start(String workflowID,
String userID)
throws NoSuchWorkflowException,
StateTransitionException,
LoggingException,
WorkflowSecurityException,
GWESException,
RemoteException
GWES
start in interface GWESworkflowID - The unique workflow identifier.
NoSuchWorkflowException
StateTransitionException
LoggingException
WorkflowSecurityException
GWESException
RemoteException
public void suspend(String workflowID,
String userID)
throws NoSuchWorkflowException,
StateTransitionException,
LoggingException,
WorkflowSecurityException,
GWESException,
RemoteException
GWES
suspend in interface GWESworkflowID - The unique workflow identifier.
NoSuchWorkflowException
StateTransitionException
LoggingException
WorkflowSecurityException
GWESException
RemoteException
public void resume(String workflowID,
String userID)
throws NoSuchWorkflowException,
StateTransitionException,
LoggingException,
WorkflowSecurityException,
GWESException,
RemoteException
GWES
resume in interface GWESworkflowID - The unique workflow identifier.
NoSuchWorkflowException
StateTransitionException
LoggingException
WorkflowSecurityException
GWESException
RemoteException
public void abort(String workflowID,
String userID)
throws NoSuchWorkflowException,
StateTransitionException,
LoggingException,
WorkflowSecurityException,
GWESException,
RemoteException
GWES
abort in interface GWESworkflowID - The unique workflow identifier.
NoSuchWorkflowException
StateTransitionException
LoggingException
WorkflowSecurityException
GWESException
RemoteException
public String restart(String workflowID,
String userID)
throws NoSuchWorkflowException,
net.kwfgrid.gworkflowdl.structure.WorkflowFormatException,
DatabaseException,
StateTransitionException,
LoggingException,
WorkflowSecurityException,
GWESException,
RemoteException
GWES
restart in interface GWESworkflowID - The unique identifier of the workflow to restart.userID - The user identifier of the user who owns the workflow.
NoSuchWorkflowException - If the workflow identifier is not available in the workflow database
net.kwfgrid.gworkflowdl.structure.WorkflowFormatException - If the workflow stored in the database has the wrong format
DatabaseException - If there is a problem with retrieving the workflow from the database
StateTransitionException - If the state of the workflow is not INITIATED at the beginning.
LoggingException
WorkflowSecurityException
GWESException
RemoteException
public String getWorkflowDescription(String workflowID,
String userID)
throws NoSuchWorkflowException,
DatabaseException,
LoggingException,
WorkflowSecurityException,
GWESException,
RemoteException
GWES
getWorkflowDescription in interface GWESworkflowID - The unique workflow identifier.
NoSuchWorkflowException
DatabaseException
LoggingException
WorkflowSecurityException
GWESException
RemoteException
public void setWorkflowDescription(String workflowID,
String gworkflowdl,
String userID)
throws NoSuchWorkflowException,
StateTransitionException,
net.kwfgrid.gworkflowdl.structure.WorkflowFormatException,
LoggingException,
GWESException,
WorkflowSecurityException,
RemoteException
GWES
setWorkflowDescription in interface GWESworkflowID - The unique workflow identifier.gworkflowdl - The GWorkflowDL description of the workflow.
NoSuchWorkflowException
StateTransitionException
net.kwfgrid.gworkflowdl.structure.WorkflowFormatException
LoggingException
GWESException
WorkflowSecurityException
RemoteException
public int getStatus(String workflowID,
String userID)
throws NoSuchWorkflowException,
LoggingException,
DatabaseException,
WorkflowSecurityException,
GWESException,
RemoteException
GWES
- STATUS_UNDEFINED = 0
- STATUS_INITIATED = 1
- STATUS_RUNNING = 2
- STATUS_SUSPENDED = 3
- STATUS_ACTIVE = 4
- STATUS_TERMINATED = 5
- STATUS_COMPLETED = 6
getStatus in interface GWESworkflowID - The unique workflow identifier.
NoSuchWorkflowException
LoggingException
DatabaseException
WorkflowSecurityException
GWESException
RemoteException
public int waitForStatusChangeFrom(String workflowID,
int oldStatus,
String userID)
throws NoSuchWorkflowException,
RemoteException,
LoggingException,
WorkflowSecurityException,
GWESException,
InterruptedException
GWES
waitForStatusChangeFrom in interface GWESworkflowID - The workflow identifieroldStatus - The old status of the workflow
NoSuchWorkflowException
RemoteException
LoggingException
WorkflowSecurityException
GWESException
InterruptedException
public int waitForStatusChangeToCompletedOrTerminated(String workflowID,
String userID)
throws NoSuchWorkflowException,
LoggingException,
WorkflowSecurityException,
GWESException,
RemoteException,
InterruptedException
GWES
waitForStatusChangeToCompletedOrTerminated in interface GWESworkflowID - The workflow identifier
NoSuchWorkflowException
LoggingException
WorkflowSecurityException
GWESException
RemoteException
InterruptedException
public String[] getWorkflowIDs(int level,
String userID)
throws DatabaseException,
LoggingException,
WorkflowSecurityException,
GWESException,
RemoteException
GWES
- level = 1: workflows handled in main memory
- level = 2: workflows stored in workflow database
- level = 3: workflows handled in main memory AND stored in workflow database
getWorkflowIDs in interface GWESlevel - The level from where to get the workflowIDs.
DatabaseException
LoggingException
WorkflowSecurityException
GWESException
RemoteException
public String[][] getWorkflowStatusArray(int level,
String userID)
throws LoggingException,
WorkflowSecurityException,
GWESException,
RemoteException
GWES"ID=hoheisel_f2968050-1d6a-11db-bacc-ad353bc1f9b1" "status=COMPLETED" "birthdayMs=1154003111126" "durationUndefinedMs=527" "durationInitiatedMs=792" "durationRunningMs=0" "durationActiveMs=0" "durationSuspendedMs=0" "durationTotalMs=1351" "endTimeMs=1154003112477" "level=MEMORY" "description=test workflow"The level denotes from where to get the workflow IDs:
- level = 1: workflows handled in main memory
- level = 2: workflows stored in workflow database
- level = 3: workflows handled in main memory AND stored in workflow database
getWorkflowStatusArray in interface GWESlevel - The level from where to get the workflowIDs.
LoggingException
WorkflowSecurityException
GWESException
RemoteException
public String store(String workflowID,
String userID)
throws NoSuchWorkflowException,
DatabaseException,
LoggingException,
WorkflowSecurityException,
GWESException,
RemoteException
GWESrestore method.
store in interface GWESworkflowID - The unique workflow identifier.
NoSuchWorkflowException - If the workflow identifier is unknown to this GWES.
DatabaseException - If there is a problem with the XML database
LoggingException
WorkflowSecurityException
GWESException
RemoteExceptionGWES.restore(String,String)
public String restore(String workflowID,
String userID)
throws NoSuchWorkflowException,
net.kwfgrid.gworkflowdl.structure.WorkflowFormatException,
DatabaseException,
StateTransitionException,
LoggingException,
WorkflowSecurityException,
GWESException,
RemoteException
GWES/db/gworkflowdl/[workflowID]/0000000221.xml. The method call
returns the new workflow ID of the restored workflow.
A restored workflow has the status INITIATED and needs to be started using the start() method.
Workflows are stored, e.g., by using the store method.
restore in interface GWESworkflowID - The old workflow ID of the stored workflow.userID - The user ID.
NoSuchWorkflowException
net.kwfgrid.gworkflowdl.structure.WorkflowFormatException
DatabaseException
StateTransitionException
LoggingException
WorkflowSecurityException
GWESException
RemoteExceptionGWES.store(String, String),
GWES.start(String, String)
public String[] getData(String workflowID,
String placeID,
String userID)
throws NoSuchWorkflowException,
LoggingException,
DatabaseException,
WorkflowSecurityException,
GWESException,
RemoteException
GWES
getData in interface GWESworkflowID - The workflow identifierplaceID - The place identifier that refers to the data
NoSuchWorkflowException
LoggingException
DatabaseException
WorkflowSecurityException
GWESException
RemoteException
public void setDescription(String workflowID,
String description,
String userID)
throws NoSuchWorkflowException,
DatabaseException,
LoggingException,
WorkflowSecurityException,
RemoteException,
GWESException
GWES
setDescription in interface GWESworkflowID - The workflow identifierdescription - The human-readable description
NoSuchWorkflowException - If the workflow identifier is unknown to this GWES.
DatabaseException
LoggingException
WorkflowSecurityException
RemoteException
GWESException
public String getDescription(String workflowID,
String userID)
throws NoSuchWorkflowException,
DatabaseException,
LoggingException,
WorkflowSecurityException,
RemoteException,
GWESException
GWES
getDescription in interface GWESworkflowID - The workflow identifier
NoSuchWorkflowException - If the workflow identifier is unknown to this GWES.
DatabaseException
LoggingException
WorkflowSecurityException
RemoteException
GWESException
public void setProperty(String workflowID,
String name,
String value,
String userID)
throws NoSuchWorkflowException,
net.kwfgrid.gworkflowdl.structure.WorkflowFormatException,
DatabaseException,
LoggingException,
WorkflowSecurityException,
RemoteException,
GWESException
GWES
setProperty in interface GWESworkflowID - The workflow identifiername - Name of the propertyvalue - Value of the property
NoSuchWorkflowException - If the workflow identifier is unknown to this GWES.
net.kwfgrid.gworkflowdl.structure.WorkflowFormatException
DatabaseException
LoggingException
WorkflowSecurityException
RemoteException
GWESException
public String getProperty(String workflowID,
String name,
String userID)
throws NoSuchWorkflowException,
net.kwfgrid.gworkflowdl.structure.WorkflowFormatException,
DatabaseException,
LoggingException,
WorkflowSecurityException,
RemoteException,
GWESException
GWES
getProperty in interface GWESworkflowID - The workflow identifiername - Name of the property
NoSuchWorkflowException - If the workflow identifier is unknown to this GWES.
net.kwfgrid.gworkflowdl.structure.WorkflowFormatException
DatabaseException
LoggingException
WorkflowSecurityException
RemoteException
GWESException
public String[][] getProperties(String workflowID,
String userID)
throws NoSuchWorkflowException,
net.kwfgrid.gworkflowdl.structure.WorkflowFormatException,
DatabaseException,
LoggingException,
WorkflowSecurityException,
RemoteException,
GWESException
GWESproperties = getProperties(workflowID); properties[0][0] //Name of the first workflow property properties[0][1] //Value of the first workflow property properties[1][0] //Name of the second worklfow property properties[1][1] //Value of the second workflow property
getProperties in interface GWESNoSuchWorkflowException - If the workflow identifier is unknown to this GWES.
net.kwfgrid.gworkflowdl.structure.WorkflowFormatException
DatabaseException
LoggingException
WorkflowSecurityException
RemoteException
GWESException
public String[] getCheckpoints(String workflowID,
String userID)
throws DatabaseException,
LoggingException,
WorkflowSecurityException,
RemoteException,
GWESException
GWES
getCheckpoints in interface GWESworkflowID - The workflow identifier.
DatabaseException
LoggingException
WorkflowSecurityException
RemoteException
GWESException
public void remove(String workflowID,
int level,
String userID)
throws NoSuchWorkflowException,
DatabaseException,
LoggingException,
WorkflowSecurityException,
RemoteException,
GWESException
GWES
- level = 1: main memory
- level = 2: workflow database
- level = 3: main memory AND workflow database
- level = 4: temporary data on Grid nodes
- level = 5: main memory AND temporary data on Grid nodes
- level = 6: workflow database AND temporary data on Grid nodes
- level = 7: main memory AND workflow database AND temporary data on Grid nodes
remove in interface GWESworkflowID - The workflow identifier.level - From where to remove the workflow data.userID - The user ID.
NoSuchWorkflowException - If the workflow identifier is unknown to this GWES.
DatabaseException
LoggingException
WorkflowSecurityException
RemoteException
GWESException
public String[][] getActivityStatusArray(String workflowID,
String userID)
throws NoSuchWorkflowException,
LoggingException,
WorkflowSecurityException,
GWESException,
RemoteException
GWES
ID=hoheisel_2addc790-416a-11de-97f3-9cdc141524de_0000000025
status=ACTIVE
activityClass=net.kwfgrid.gwes.wsgramactivity.GRAMActivity
operationName=software:makeload100
resourceName=hardware:quadro.first.fhrg.fraunhofer.de
timeoutActive=7200000
timeoutRunning=86400000
birthdayMs=1242403824742
durationUndefinedMs=1
durationInitiatedMs=1
durationRunningMs=1886
durationActiveMs=0
durationSuspendedMs=0
durationTotalMs=0
endTimeMs=0
getActivityStatusArray in interface GWESworkflowID - The workflow identifier.
NoSuchWorkflowException - If the workflow identifier is unknown to this GWES.
LoggingException
WorkflowSecurityException
GWESException
RemoteException
public String[] getAvailableResources(String ofClass,
String userID)
throws DatabaseException,
LoggingException,
WorkflowSecurityException,
GWESException,
RemoteException
GWES
String[] resources = getAvailableResources("urn:dgrdl:software");
resources[0]=
<resource>
<uri>software:cat-fhrg</uri> // Operation URI
<classUri>urn:dgrdl:software:cat</classUri> // Operation Class URI (workflow: operationClass name="...")
<name>cat</name> // Operation Name
<description>Program that concatenates two files<description> // Operation Description
</resource>
getAvailableResources in interface GWESofClass - The class which this resource should be part of. This method only checkes whether the class starts
with the given ofClass parameter, e.g., "urn:dgrdl:software" would match both classes: "urn:dgrdl:software:A"
as well as "urn:dgrdl:software:B". If ofClass is null then all classes of resources are
returned.
DatabaseException
LoggingException
WorkflowSecurityException
GWESException
RemoteException
public String getResourceDescription(String resourceUri,
String userID)
throws DatabaseException,
LoggingException,
WorkflowSecurityException,
GWESException,
RemoteException
GWES
getResourceDescription in interface GWESresourceUri - The resource URI.
DatabaseException
LoggingException
WorkflowSecurityException
GWESException
RemoteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||