summaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/orbekk/example/ExampleClient.java6
-rw-r--r--src/main/java/com/orbekk/protobuf/RpcChannel.java (renamed from src/main/java/com/orbekk/protobuf/NewRpcChannel.java)12
2 files changed, 9 insertions, 9 deletions
diff --git a/src/main/java/com/orbekk/example/ExampleClient.java b/src/main/java/com/orbekk/example/ExampleClient.java
index e047ad9..4d229fe 100644
--- a/src/main/java/com/orbekk/example/ExampleClient.java
+++ b/src/main/java/com/orbekk/example/ExampleClient.java
@@ -19,14 +19,14 @@ import java.util.concurrent.CountDownLatch;
import com.google.protobuf.RpcCallback;
import com.orbekk.example.Example.FortuneReply;
-import com.orbekk.protobuf.NewRpcChannel;
+import com.orbekk.protobuf.RpcChannel;
import com.orbekk.protobuf.Rpc;
public class ExampleClient {
public void runClient(int port) {
- NewRpcChannel channel = null;
+ RpcChannel channel = null;
try {
- channel = NewRpcChannel.createOrNull("localhost", port);
+ channel = RpcChannel.createOrNull("localhost", port);
Example.FortuneService service =
Example.FortuneService.newStub(channel);
printFortune(service);
diff --git a/src/main/java/com/orbekk/protobuf/NewRpcChannel.java b/src/main/java/com/orbekk/protobuf/RpcChannel.java
index 12f1433..402ff17 100644
--- a/src/main/java/com/orbekk/protobuf/NewRpcChannel.java
+++ b/src/main/java/com/orbekk/protobuf/RpcChannel.java
@@ -21,10 +21,10 @@ import com.google.protobuf.Message;
import com.google.protobuf.RpcCallback;
import com.google.protobuf.RpcController;
-public class NewRpcChannel implements com.google.protobuf.RpcChannel {
+public class RpcChannel implements com.google.protobuf.RpcChannel {
public static int NUM_CONCURRENT_REQUESTS = 5;
private static final Logger logger =
- Logger.getLogger(NewRpcChannel.class.getName());
+ Logger.getLogger(RpcChannel.class.getName());
private final String host;
private final int port;
private final AtomicLong nextId = new AtomicLong(0);
@@ -142,7 +142,7 @@ public class NewRpcChannel implements com.google.protobuf.RpcChannel {
}
}
- public static NewRpcChannel createOrNull(String host, int port) {
+ public static RpcChannel createOrNull(String host, int port) {
try {
return create(host, port);
} catch (UnknownHostException e) {
@@ -154,14 +154,14 @@ public class NewRpcChannel implements com.google.protobuf.RpcChannel {
}
}
- public static NewRpcChannel create(String host, int port)
+ public static RpcChannel create(String host, int port)
throws UnknownHostException, IOException {
- NewRpcChannel channel = new NewRpcChannel(host, port);
+ RpcChannel channel = new RpcChannel(host, port);
channel.start();
return channel;
}
- NewRpcChannel(String host, int port) {
+ RpcChannel(String host, int port) {
this.host = host;
this.port = port;
}