diff --git a/src/main/java/algoLike/push/HandsA.java b/src/main/java/algoLike/push/HandsA.java index 406a289..89a1707 100644 --- a/src/main/java/algoLike/push/HandsA.java +++ b/src/main/java/algoLike/push/HandsA.java @@ -7,10 +7,7 @@ import org.springframework.stereotype.Component; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.core.JsonProcessingException; -import pushPullRefactor.Getter; -import pushPullRefactor.Message; -import pushPullRefactor.Resource; -import pushPullRefactor.State; +import pushPullRefactor.*; @Path("/handsA") @Resource("handsA") @@ -21,6 +18,9 @@ private Map.Entry resultByDrawingB; private Map.Entry> resultBySelectingA; private Map.Entry> resultBySelectingB; + @PushReference("loseA") + @Pullable("direct") + private String loseA = "/loseA"; @State private List> value = new ArrayList>(); @Path("/resultByDrawingA") @@ -54,7 +54,7 @@ form.param("handsA", new ObjectMapper().writeValueAsString(i)); } Entity
entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED); - String result = client.target("http://localhost:8080").path("/loseA").request().put(entity, String.class); + String result = client.target("http://localhost:8080").path(loseA).request().put(entity, String.class); } @Path("/resultByDrawingB") @POST @@ -84,7 +84,7 @@ form.param("handsA", new ObjectMapper().writeValueAsString(i)); } Entity entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED); - String result = client.target("http://localhost:8080").path("/loseA").request().put(entity, String.class); + String result = client.target("http://localhost:8080").path(loseA).request().put(entity, String.class); } @Path("/resultBySelectingA") @POST @@ -109,7 +109,7 @@ form.param("handsA", new ObjectMapper().writeValueAsString(i)); } Entity entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED); - String result = client.target("http://localhost:8080").path("/loseA").request().put(entity, String.class); + String result = client.target("http://localhost:8080").path(loseA).request().put(entity, String.class); } @Path("/resultBySelectingB") @POST @@ -134,7 +134,7 @@ form.param("handsA", new ObjectMapper().writeValueAsString(i)); } Entity entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED); - String result = client.target("http://localhost:8080").path("/loseA").request().put(entity, String.class); + String result = client.target("http://localhost:8080").path(loseA).request().put(entity, String.class); } @Produces(MediaType.APPLICATION_JSON) @GET