View Javadoc

1   /*
2    * Copyright (c) 2005, The K-Wf Grid Consortium
3    * Fraunhofer Institute for Computer Architecture and Software Technology
4    * See http://www.kwfgrid.eu and http://www.first.fraunhofer.de for more details.
5    */
6   package net.kwfgrid.gworkflowdl.protocol.server;
7   
8   import net.kwfgrid.gworkflowdl.structure.*;
9   import net.kwfgrid.gworkflowdl.protocol.Protocol;
10  import net.kwfgrid.gworkflowdl.protocol.structure.*;
11  
12  /***
13     Creator for server side of the protocol implementation of the GWorkflowDL API.
14   */
15  public class ServerCreator extends ProtocolCreator {
16      /***
17         Constructor.
18         @param delegate The creator used to create the delegate objects of the protocol structure.
19       */
20      public ServerCreator(Creator delegate) {
21  	super(delegate);
22      }
23  
24      public Workflow newWorkflow() {
25  	Workflow wf = _delegate.newWorkflow();
26  	ProtocolWorkflow pwf = new ServerWorkflow(wf, (IServerDelegate)Protocol.getProtocolMethodCallStrategy());
27  	return pwf;
28      }
29  
30      public Workflow newWorkflow(String ID) {
31  	Workflow wf = _delegate.newWorkflow(ID);
32  	ProtocolWorkflow pwf = new ServerWorkflow(wf, (IServerDelegate)Protocol.getProtocolMethodCallStrategy());
33  	return pwf;
34      }
35  }