@@ -0,0 +1,771 @@
+package com.microservices.rentaloffer;%0A%0Apublic class Ping implements Client %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        String host = args%5B0%5D;%0A        String port = args%5B1%5D;%0A%0A        Ping ping = new Ping();%0A        ping.publish(host, port);%0A    %7D%0A%0A    public void publish(String host, String port) %7B%0A        try (Connections connection = new Connections(host, port)) %7B%0A            while (true) %7B%0A                PingPacket pingPacket = new PingPacket();%0A                connection.publish(pingPacket.toJson(sign()));%0A                Thread.sleep(15000);%0A            %7D%0A        %7D catch (Exception e) %7B%0A            throw new RuntimeException(%22Could not publish ping:%22, e);%0A        %7D%0A    %7D%0A%0A    @Override%0A    public String sign() %7B%0A        return %22Ping%22;%0A    %7D%0A%7D%0A

Add ping service