Presentation is loading. Please wait.

Presentation is loading. Please wait.

Requesting Geometry Service Clara-2.x Tutorial-4 By V. Gyurjyan.

Similar presentations


Presentation on theme: "Requesting Geometry Service Clara-2.x Tutorial-4 By V. Gyurjyan."— Presentation transcript:

1 Requesting Geometry Service Clara-2.x Tutorial-4 By V. Gyurjyan

2 GeometryServiceTester class package javaservices; import org.jlab.clas12.tools.property.JProperty; import org.jlab.clas12.tools.property.JPropertyList; import org.jlab.coda.clara.core.JioSerial; import usr.JOrchestrator; public class GeomServiceTester extends JOrchestrator { /** * Constructor * @param name of this orchestrator */ public GeomServiceTester(String name){ super(name); }

3 GeometryServiceTester class public static void main(String[] args){ // create an instance of this class GeomServiceTester gt = new GeomServiceTester(args[0]); // create input transient data for the Geometry Service // Request property JProperty req = new JProperty("requesting_service", "gemc"); // system property JProperty sys = new JProperty("system", "dc");

4 GeometryServiceTester class // property list creation JProperty[] arry = {req, sys}; JPropertyList pList = new JPropertyList(arry); // create input data for the geometry service JioSerial inputData = new JioSerial(pList); // sync request the service by sending the created input data JioSerial output = gt.syncRunService("CLAS12GeometryService", inputData, 10000); // print the response from the geometry service System.out.println(output);

5 Compiling javac -cp $CLARA_SERVICES/lib/Clara.jar:$CLARA_SERVICES/lib/j tools-1.0.jar:$CLARA_SERVICES/lib/cMsg-3.3.jar GeomServiceTester.java -d $CLARA_SERVCIES/

6 Running java -cp "$CLARA_SERVICES/.:$CLARA_SERVICES/lib/*" javaservices.GeomServiceTester


Download ppt "Requesting Geometry Service Clara-2.x Tutorial-4 By V. Gyurjyan."

Similar presentations


Ads by Google