An example implementation of AbstractTaskFlowExecClient.
More...
List of all members.
Protected Member Functions |
void | handleFailure (TaskFailure fail) |
| Prints the failure to stdout.
|
void | showFailure (TaskFailure fail) |
| Helper for handleFailure.
|
abstract void | handleResult (TaskResult res) |
| Prints the result to stdout.
|
void | handleStatus (TaskStatus stat) |
| Prints the progress to stdout.
|
void | handleTaskSpecifier (Specifier< Facets > ts) |
| Shows the facets of ts .
|
Integer | selectQuote (List< Specifier< Quote >> quotes) |
| Shows available quotes.
|
Private Member Functions |
void | showFacets (Facets facets) |
| Helper for handleTaskSpecifier.
|
void | showQuote (Quote payload) |
| Helper which prints a quote to stdout.
|
Detailed Description
An example implementation of AbstractTaskFlowExecClient.
- Author:
- try ma ik jo rr a zib
- Date:
- 10.03.11 16:37 This on executes DummyOrder taskflows.
Member Function Documentation
void de.zib.gndms.gndmc.gorfx.ExampleTaskFlowExecClient.handleFailure |
( |
TaskFailure |
fail | ) |
[protected, virtual] |
abstract void de.zib.gndms.gndmc.gorfx.ExampleTaskFlowExecClient.handleResult |
( |
TaskResult |
res | ) |
[protected, pure virtual] |
void de.zib.gndms.gndmc.gorfx.ExampleTaskFlowExecClient.handleStatus |
( |
TaskStatus |
stat | ) |
[protected, virtual] |
Prints the progress to stdout.
- Parameters:
-
stat | The current task status. |
Implements de.zib.gndms.gndmc.gorfx.AbstractTaskFlowExecClient.
{
System.out.println( "Task is " + stat.getStatus() + " progress: " + stat.getProgress() + " / " + stat.getMaxProgress() );
}
void de.zib.gndms.gndmc.gorfx.ExampleTaskFlowExecClient.handleTaskSpecifier |
( |
Specifier< Facets > |
ts | ) |
[protected, virtual] |
Integer de.zib.gndms.gndmc.gorfx.ExampleTaskFlowExecClient.selectQuote |
( |
List< Specifier< Quote >> |
quotes | ) |
[protected, virtual] |
Shows available quotes.
- Parameters:
-
quotes | All available quotes. |
- Returns:
- Always selects the 0th.
Implements de.zib.gndms.gndmc.gorfx.AbstractTaskFlowExecClient.
{
for ( Specifier<Quote> sq : quotes ) {
System.out.println( "showing quote " + sq.getUriMap().get( "idx" ) );
showQuote( sq.getPayload() );
}
return 0;
}
void de.zib.gndms.gndmc.gorfx.ExampleTaskFlowExecClient.showFacets |
( |
Facets |
facets | ) |
[private] |
Helper for handleTaskSpecifier.
- Parameters:
-
{
for( Facet f : facets.getFacets() )
System.out.println( f.getName() +": " + f.getUrl() );
}
void de.zib.gndms.gndmc.gorfx.ExampleTaskFlowExecClient.showFailure |
( |
TaskFailure |
fail | ) |
[protected] |
Helper for handleFailure.
- Parameters:
-
{
System.out.println( "Failed with: " + fail.getFaultClass() );
System.out.println( " message: " + fail.getMessage() );
System.out.println( " at : " + fail.getFaultLocation() );
System.out.println( " trace : " + fail.getFaultTrace() );
}
void de.zib.gndms.gndmc.gorfx.ExampleTaskFlowExecClient.showQuote |
( |
Quote |
payload | ) |
[private] |
Helper which prints a quote to stdout.
- Parameters:
-
{
System.out.println( "accepted: " + payload.getAccepted() );
System.out.println( "deadline: " + payload.getDeadline() );
System.out.println( "expectedSize: " + payload.getExpectedSize() );
System.out.println( "resultValidity: " + payload.getResultValidity() );
System.out.println( "comments: " );
if( payload.getAdditionalNotes() != null )
for( String k : payload.getAdditionalNotes().keySet() )
System.out.println( " " + k + ": " + payload.getAdditionalNotes().get( k ) );
else
System.out.println( " none" );
}
The documentation for this class was generated from the following file:
- gndmc-rest/src/de/zib/gndms/gndmc/gorfx/ExampleTaskFlowExecClient.java