Package com.kurento.kmf.jsonrpcconnector.client

Examples of com.kurento.kmf.jsonrpcconnector.client.JsonRpcClient.sendRequest()


  @Test
  public void test() throws IOException, InterruptedException {

    JsonRpcClient client = createJsonRpcClient("/async_handler");

    String response = client.sendRequest("count", "fakeparams",
        String.class);

    Assert.assertEquals("AsyncHello", response);

    client.close();
View Full Code Here


    Params params = new Params();
    params.param1 = "Value1";
    params.param2 = "Value2";

    Params result = client.sendRequest("echo", params, Params.class);

    log.info("Response:" + result);

    Assert.assertEquals(params.param1, result.param1);
    Assert.assertEquals(params.param2, result.param2);
View Full Code Here

  public void test() throws IOException, InterruptedException {

    JsonRpcClient client = createJsonRpcClient("/close_session_handler");

    Assert.assertEquals("new",
        client.sendRequest("sessiontest", String.class));
    Assert.assertEquals("old",
        client.sendRequest("sessiontest", String.class));
    Assert.assertEquals("old",
        client.sendRequest("sessiontest", String.class));
View Full Code Here

    JsonRpcClient client = createJsonRpcClient("/close_session_handler");

    Assert.assertEquals("new",
        client.sendRequest("sessiontest", String.class));
    Assert.assertEquals("old",
        client.sendRequest("sessiontest", String.class));
    Assert.assertEquals("old",
        client.sendRequest("sessiontest", String.class));

    client = createJsonRpcClient("/close_session_handler");
View Full Code Here

    Assert.assertEquals("new",
        client.sendRequest("sessiontest", String.class));
    Assert.assertEquals("old",
        client.sendRequest("sessiontest", String.class));
    Assert.assertEquals("old",
        client.sendRequest("sessiontest", String.class));

    client = createJsonRpcClient("/close_session_handler");

    Assert.assertEquals("new",
        client.sendRequest("sessiontest", String.class));
View Full Code Here

        client.sendRequest("sessiontest", String.class));

    client = createJsonRpcClient("/close_session_handler");

    Assert.assertEquals("new",
        client.sendRequest("sessiontest", String.class));
    Assert.assertEquals("old",
        client.sendRequest("sessiontest", String.class));
    Assert.assertEquals("old",
        client.sendRequest("sessiontest", String.class));
View Full Code Here

    client = createJsonRpcClient("/close_session_handler");

    Assert.assertEquals("new",
        client.sendRequest("sessiontest", String.class));
    Assert.assertEquals("old",
        client.sendRequest("sessiontest", String.class));
    Assert.assertEquals("old",
        client.sendRequest("sessiontest", String.class));

    client.close();
View Full Code Here

    Assert.assertEquals("new",
        client.sendRequest("sessiontest", String.class));
    Assert.assertEquals("old",
        client.sendRequest("sessiontest", String.class));
    Assert.assertEquals("old",
        client.sendRequest("sessiontest", String.class));

    client.close();

  }
View Full Code Here

    log.info("Client started");

    JsonRpcClient client = createJsonRpcClient("/serverevents");

    String result = client.sendRequest("echo", "params", String.class);

    Assert.assertTrue(
        "The method 'afterConnectionEstablished' is not invoked",
        afterConnectionEstablishedLatch.await(TIMEOUT,
            TimeUnit.MILLISECONDS));
View Full Code Here

    params.addProperty("param1", "Value1");
    params.addProperty("param2", "Value2");

    CountDownLatch finishTestLatch = new CountDownLatch(1);

    client.sendRequest("echo", params, new Continuation<JsonElement>() {

      @Override
      public void onSuccess(JsonElement result) {
        log.info("Response:" + result);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.