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

Slides:



Advertisements
Similar presentations
Phil Campbell London South Bank University Java 1 First Steps.
Advertisements

INHERITANCE BASICS Reusability is achieved by INHERITANCE
METHOD OVERRIDING Sub class can override the methods defined by the super class. Overridden Methods in the sub classes should have same name, same signature.
Introduction to Object-Oriented Programming CS 21a: Introduction to Computing I First Semester,
HelloWorld Service Clara-2.x Tutorial-2 By V. Gyurjyan.
Java Programming (Chapter 1). Java Programming Classes, Types, and Objects.
OOP & JAVA. HelloWorld.java /** * The HelloWorld class is an application that * displays "Hello World!" to the standard output. */ public class HelloWorld.
Java Intro. A First Java Program //The Hello, World! program in Java public class Hello { public static void main(String[] args) { System.out.println("Hello,
Slide 1 of 40. Lecture A The Java Programming Language Invented 1995 by James Gosling at Sun Microsystems. Based on previous languages: C, C++, Objective-C,
Unit2: Object-oriented programming Getting started with Java Jin Sa.
Chapter 2: Java Fundamentals Java Program Structure.
Writing Methods. Create the method Methods, like functions, do something They contain the code that performs the job Methods have two parts.
SEEM3460 Tutorial Java Programming in Unix. Code Translation Java source code Java bytecode Java compiler Bytecode interpreter machine code for target.
Writing algorithms using the for-statement. Programming example 1: find all divisors of a number We have seen a program using a while-statement to solve.
Inheritance #1 First questions Similar to Python? What about visibility and encapsulation? – can an object of the child class access private members.
Shorthand operators.
“Introduction to Programming With Java”
CS 584 Lecture 18 l Assignment » Glenda assignment extended to the Java RMI Deadline » No Java RMI Assignment l Test » Friday, Saturday, Monday.
Welcome to the Lecture Series on “Introduction to Programming With Java”
CSCE 2013L: Lab 1 Overview  Java Basics The JVM Anatomy of a Java Program  Object-Oriented Programming Overview  Example: Payroll.java JDK Tools and.
Programming Concept Chapter I Introduction to Java Programming.
Java Quiz Bowl A fun review of the Java you should know from CMPT 201 If you don’t know the answers - this week is for you to study up!
Interfaces. –An interface describes a set of methods: no constructors no instance variables –The interface must be implemented by some class. 646 java.
Introduction to Java Classes and Objects. What is a class A class is description of a structure that contains both data and methods – Describes a set.
A First Simple Program /* This is a simple Java program. Call this file "Example.java".*/ class Example { // Your program begins with a call to main().
Working with arrays (we will use an array of double as example)
Checkout, Installation and Running Tutorial-1 By V. Gyurjyan.
Java Commodity Grid (Java CogKit) Java CogKits allow developers to use commodity technologies such as Java or Python in programming the Grid based on Globus.
Mixing integer and floating point numbers in an arithmetic operation.
Object Oriented Programming Examples: C++, Java Advantages: 1. reusibility of code 2. ability to adapt (extend) previously written code.
Overview of Java CSCI 392 Day One. Running C code vs Java code C Source Code C Compiler Object File (machine code) Library Files Linker Executable File.
CSI 3125, Preliminaries, page 1 Compiling the Program.
The assignment expressions. The assignment operator in an assignment statement We have seen the assignment statement: Effect: var = expr; Stores the value.
Introduction to array: why use arrays ?. Motivational example Problem: Write a program that reads in and stores away 5 double numbers After reading in.
ClaRA web services V. Gyurjyan Clas12 Software Meeting
Constructor OverloadingtMyn1 Constructor Overloading One context in which you will regularly need to use overloading is when you write constructors for.
Object Oriented Programming I ( ) Dr. Adel hamdan Part 03 (Week 4) Dr. Adel Hamdan Date Created: 7/10/2011.
Java: Variables and Methods By Joshua Li Created for the allAboutJavaClasses wikispace.
import java.util.Scanner; class myCode { public static void main(String[] args) { Scanner input= new Scanner(System.in); int num1; System.out.println(“Enter.
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
Requesting Geometry Service Tutorial-2 By V. Gyurjyan.
Computer Science 209 Software Development Packages.
Learning Plan 6 Java Programming Intro to Object Oriented Programming.
Programming in Java Transitioning from Alice. Becomes not myFirstMethod but …. public static void main (String[] arg) { // code for testing classes goes.
Java Programming in Unix
RADE new features via JAVA
Writing Methods.
Computing Adjusted Quiz Total Score
CSC 113 Tutorial QUIZ I.
The Boolean (logical) data type boolean
Sampath Kumar S Assistant Professor, SECE
CNT 4007C Project 2 Good morning, everyone. In this class, we will have a brief look at the project 2. Project 2 is basically the same with project 1.
Sampath Kumar S Assistant Professor, SECE
Java Intro.
INHERITANCE BASICS Reusability is achieved by INHERITANCE
S.VIGNESH Assistant Professor, SECE
JAVA Constructors.
Sampath Kumar S Assistant Professor, SECE
class PrintOnetoTen { public static void main(String args[]) {
Java Programming with Multiple Classes
A Java Application public class Hello { public static void main(String [] args) { System.out.println("Hello, World!"); } } public class.
A Java Application public class Hello { public static void main(String [] args) { System.out.println("Hello, World!"); } } public class.
Sampath Kumar S Assistant Professor, SECE
Introduction to Object-Oriented Programming
Developing Java Applications with NetBeans
Chapter 2: Java Fundamentals
Developing Java Applications with NetBeans
CS 584 Lecture 18 Assignment Glenda assignment extended to the Java RMI Deadline No Java RMI Assignment Test Friday, Saturday, Monday.
Debugging Exercise 00 Try compiling the code samples.
Interfaces,Packages and Threads
Presentation transcript:

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

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 name of this orchestrator */ public GeomServiceTester(String name){ super(name); }

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");

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);

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/

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