diff --git a/AlgebraicDataflowArchitectureModel/prototypes/JAX-RS/Clock/PULL-first/Hour.java b/AlgebraicDataflowArchitectureModel/prototypes/JAX-RS/Clock/PULL-first/Hour.java index 063d06b..a7acf75 100644 --- a/AlgebraicDataflowArchitectureModel/prototypes/JAX-RS/Clock/PULL-first/Hour.java +++ b/AlgebraicDataflowArchitectureModel/prototypes/JAX-RS/Clock/PULL-first/Hour.java @@ -9,23 +9,20 @@ @Path("/hour") @Component public class Hour { - private double value = 0.0; + private int value = 0; @Produces(MediaType.APPLICATION_JSON) @GET - public double getValue() { + public int getValue() { return value; } @POST - public void updateFromMin(@FormParam("min") double min) { - double temp_if2; + public void updateFromMin(@FormParam("min") int min) { + int temp_if0; if ((min==0)) { - temp_if2 = ((this.value+1)%24); + temp_if0 = ((this.value+1)%24); } else { - temp_if2 = this.value; + temp_if0 = this.value; } - this.value = temp_if2; - } - public Hour(double hour) { - this.hour = hour; + this.value = temp_if0; } } \ No newline at end of file diff --git a/AlgebraicDataflowArchitectureModel/prototypes/JAX-RS/Clock/PULL-first/Hour_ang.java b/AlgebraicDataflowArchitectureModel/prototypes/JAX-RS/Clock/PULL-first/Hour_ang.java index d237f76..9c14018 100644 --- a/AlgebraicDataflowArchitectureModel/prototypes/JAX-RS/Clock/PULL-first/Hour_ang.java +++ b/AlgebraicDataflowArchitectureModel/prototypes/JAX-RS/Clock/PULL-first/Hour_ang.java @@ -13,7 +13,7 @@ @Produces(MediaType.APPLICATION_JSON) @GET public double getValue() { - double hour = client.target("http://localhost:8080").path("/hour").request().get(double.class); + int hour = client.target("http://localhost:8080").path("/hour").request().get(int.class); return ((hour/6)*Math.PI); } } \ No newline at end of file diff --git a/AlgebraicDataflowArchitectureModel/prototypes/JAX-RS/Clock/PULL-first/Min.java b/AlgebraicDataflowArchitectureModel/prototypes/JAX-RS/Clock/PULL-first/Min.java index a4589a3..db4cea5 100644 --- a/AlgebraicDataflowArchitectureModel/prototypes/JAX-RS/Clock/PULL-first/Min.java +++ b/AlgebraicDataflowArchitectureModel/prototypes/JAX-RS/Clock/PULL-first/Min.java @@ -9,20 +9,17 @@ @Path("/min") @Component public class Min { - private double value = 0.0; + private int value = 0; private Client client = ClientBuilder.newClient(); @Produces(MediaType.APPLICATION_JSON) @GET - public double getValue() { + public int getValue() { return value; } - public Min(double min) { - this.min = min; - } @POST public void tick() throws JsonProcessingException { Form form = new Form(); - form.param("min", Double.toString(this.value)); + form.param("min", Integer.toString(this.value)); Entity