@Test public void testGetProtocolParameters() throws Exception { HttpEntity<String> entity = new HttpEntity<>(null, headers); ResponseEntity<String> response = restTemplate.exchange( createURLWithPort("/protocols/" + PingPong.class.getName()), HttpMethod.GET, entity, String.class); WParameters ps = objectMapper.readValue(response.getBody(), WParameters.class); Assert.assertTrue(response.getBody(), ps instanceof PingPong.PingPongParameters); }
@GetMapping(value = "/protocols/{fullClassName}") @Override public WParameters getProtocolParameters(@PathVariable("fullClassName") String fullClassName) { return server.getProtocolParameters(fullClassName); }
WServer extends ExternalWS implements IServer, External { @GetMapping(value = "/protocols/{fullClassName}") @Override public WParameters getProtocolParameters(@PathVariable("fullClassName") String fullClassName) { return server.getProtocolParameters(fullClassName); } }
WServer extends ExternalWS implements IServer, External { @GetMapping(value = "/protocols/{fullClassName}") @Override public WParameters getProtocolParameters(@PathVariable("fullClassName") String fullClassName) { return server.getProtocolParameters(fullClassName); }  }
WServer extends ExternalWS implements IServer, External { @GetMapping(value = "/protocols/{fullClassName}") @Override public WParameters getProtocolParameters(@PathVariable("fullClassName") String fullClassName) { return server.getProtocolParameters(fullClassName); }  @GetMapping(value = "/network/nodes") @Override List<? extends Node> getNodeInfo(); @GetMapping(value = "/network/time") @Override int getTime(); @GetMapping(value = "/protocols") @Override List<String> getProtocols(); @GetMapping(value = "/protocols/{fullClassName}") @Override WParameters getProtocolParameters(@PathVariable("fullClassName") String fullClassName); @PostMapping(value = "/network/init/{fullClassName}") void init(
      @PathVariable("fullClassName") String fullClassName, @RequestBody WParameters parameters); @PostMapping(value = "/network/runMs/{ms}") @Override void runMs(@PathVariable("ms") int ms); @GetMapping(value = "/network/nodes/{nodeId}") @Override Node getNodeInfo(@PathVariable("nodeId") int nodeId); @GetMapping(value = "/network/messages") @Override List<EnvelopeInfo<?>> getMessages(); @PostMapping(value = "/nodes/{nodeId}/start") @Override void startNode(@PathVariable("nodeId") int nodeId); @PostMapping(value = "/network/nodes/{nodeId}/stop") @Override void stopNode(@PathVariable("nodeId") int nodeId); @PostMapping(value = "/network/nodes/{nodeId}/external") @Override void setExternal(
      @PathVariable("nodeId") int nodeId, @RequestBody String externalServiceFullAddress); @PostMapping(value = "/network/send") @Override void sendMessage(@RequestBody SendMessage msg); @SuppressWarnings("unused") @Bean @Primary ObjectMapper objectMapper(); static void main(String... args); }
WServer extends ExternalWS implements IServer, External { @GetMapping(value = "/protocols/{fullClassName}") @Override public WParameters getProtocolParameters(@PathVariable("fullClassName") String fullClassName) { return server.getProtocolParameters(fullClassName); }  @GetMapping(value = "/network/nodes") @Override List<? extends Node> getNodeInfo(); @GetMapping(value = "/network/time") @Override int getTime(); @GetMapping(value = "/protocols") @Override List<String> getProtocols(); @GetMapping(value = "/protocols/{fullClassName}") @Override WParameters getProtocolParameters(@PathVariable("fullClassName") String fullClassName); @PostMapping(value = "/network/init/{fullClassName}") void init(
      @PathVariable("fullClassName") String fullClassName, @RequestBody WParameters parameters); @PostMapping(value = "/network/runMs/{ms}") @Override void runMs(@PathVariable("ms") int ms); @GetMapping(value = "/network/nodes/{nodeId}") @Override Node getNodeInfo(@PathVariable("nodeId") int nodeId); @GetMapping(value = "/network/messages") @Override List<EnvelopeInfo<?>> getMessages(); @PostMapping(value = "/nodes/{nodeId}/start") @Override void startNode(@PathVariable("nodeId") int nodeId); @PostMapping(value = "/network/nodes/{nodeId}/stop") @Override void stopNode(@PathVariable("nodeId") int nodeId); @PostMapping(value = "/network/nodes/{nodeId}/external") @Override void setExternal(
      @PathVariable("nodeId") int nodeId, @RequestBody String externalServiceFullAddress); @PostMapping(value = "/network/send") @Override void sendMessage(@RequestBody SendMessage msg); @SuppressWarnings("unused") @Bean @Primary ObjectMapper objectMapper(); static void main(String... args);  }