@Test public void testEncryption() throws Exception { Map<String, String> eConf = ImmutableMap.<String,String>builder() .putAll(emptyConfig) .put(RpcConfiguration.RPC_SASL_OPT_PREFIX + "qop", Rpc.SASL_AUTH_CONF) .build(); RpcServer server = autoClose(new RpcServer(eConf)); Rpc[] rpcs = createRpcConnection(server, eConf); Rpc client = rpcs[1]; TestMessage outbound = new TestMessage("Hello World!"); Future<TestMessage> call = client.call(outbound, TestMessage.class); TestMessage reply = call.get(10, TimeUnit.SECONDS); assertEquals(outbound.message, reply.message); }
public Future<Void> call(Object msg) { return call(msg, Void.class); }
Rpc implements Closeable { public Future<Void> call(Object msg) { return call(msg, Void.class); } }
Rpc implements Closeable { public Future<Void> call(Object msg) { return call(msg, Void.class); } private  Rpc(RpcConfiguration config, Channel channel, EventExecutorGroup egroup); }
Rpc implements Closeable { public Future<Void> call(Object msg) { return call(msg, Void.class); } private  Rpc(RpcConfiguration config, Channel channel, EventExecutorGroup egroup); static Promise<Rpc> createClient(
      Map<String, String> config,
      final NioEventLoopGroup eloop,
      String host,
      int port,
      final String clientId,
      final String secret,
      final RpcDispatcher dispatcher); void addListener(Listener l); Future<Void> call(Object msg); Future<T> call(Object msg, Class<T> retType); Promise<T> createPromise(); @Override void close(); }
Rpc implements Closeable { public Future<Void> call(Object msg) { return call(msg, Void.class); } private  Rpc(RpcConfiguration config, Channel channel, EventExecutorGroup egroup); static Promise<Rpc> createClient(
      Map<String, String> config,
      final NioEventLoopGroup eloop,
      String host,
      int port,
      final String clientId,
      final String secret,
      final RpcDispatcher dispatcher); void addListener(Listener l); Future<Void> call(Object msg); Future<T> call(Object msg, Class<T> retType); Promise<T> createPromise(); @Override void close();  }