Mercurial > hg > Members > nobuyasu > TestJava
comparison src/msgpack/test/TestMsgPackClient.java @ 0:d86770305c8b draft
add TestJava
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 11 May 2012 02:30:59 +0900 |
parents | |
children | 830afc6475b0 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:d86770305c8b |
---|---|
1 package msgpack.test; | |
2 | |
3 import org.msgpack.rpc.Client; | |
4 import org.msgpack.rpc.loop.EventLoop; | |
5 | |
6 public class TestMsgPackClient { | |
7 public static interface RPCInterface { | |
8 String hello(String msg, int a); | |
9 } | |
10 | |
11 public static void main(String[] args) throws Exception { | |
12 EventLoop loop = EventLoop.defaultEventLoop(); | |
13 | |
14 Client cli = new Client("localhost", 8888, loop); | |
15 RPCInterface iface = cli.proxy(RPCInterface.class); | |
16 | |
17 String msg = iface.hello("hello", 1); | |
18 System.out.println(msg); | |
19 } | |
20 } |