From 46bf03f6f38284a85dc96a2e72688f1749750a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjetil=20=C3=98rbekk?= Date: Wed, 28 Mar 2012 19:32:57 +0200 Subject: Handle failing RPCs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit – Handles RPCs that fail because the recipient calls setFailed(). – Handles RPCs that fail because the connection is closed. --- .../com/orbekk/protobuf/SimpleProtobufClient.java | 39 ---------------------- 1 file changed, 39 deletions(-) delete mode 100644 src/main/java/com/orbekk/protobuf/SimpleProtobufClient.java (limited to 'src/main/java/com/orbekk/protobuf/SimpleProtobufClient.java') diff --git a/src/main/java/com/orbekk/protobuf/SimpleProtobufClient.java b/src/main/java/com/orbekk/protobuf/SimpleProtobufClient.java deleted file mode 100644 index 7d0dc6a..0000000 --- a/src/main/java/com/orbekk/protobuf/SimpleProtobufClient.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.orbekk.protobuf; - -import java.util.concurrent.CountDownLatch; -import java.util.logging.Logger; - -import com.google.protobuf.RpcCallback; - -public class SimpleProtobufClient { - static final Logger logger = - Logger.getLogger(SimpleProtobufClient.class.getName()); - -// public void run() { -// RpcChannel channel = RpcChannel.create("localhost", 10000); -// Test.TestService test = Test.TestService.newStub(channel); -// Test.TestRequest request = Test.TestRequest.newBuilder() -// .setId("Hello!") -// .build(); -// int count = 10; -// final CountDownLatch stop = new CountDownLatch(count); -// for (int i = 0; i < count; i++) { -// logger.info("Sending request."); -// test.run(null, request, new RpcCallback() { -// @Override public void run(Test.TestResponse response) { -// System.out.println("Response from server: " + response); -// stop.countDown(); -// } -// }); -// } -// try { -// stop.await(); -// } catch (InterruptedException e) { -// // Stop waiting. -// } -// } -// -// public static void main(String[] args) { -// new SimpleProtobufClient().run(); -// } -} -- cgit v1.2.3