Package com.kurento.kmf.jsonrpcconnector.client

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


    JsonRpcClient client = createJsonRpcClient("/error_handler");

    try {

      client.sendRequest("explicitError");

      Assert.fail("An exception should be thrown");

    } catch (JsonRpcErrorException e) {
View Full Code Here


      checkException(e, "Exception message", "Data");
    }

    try {

      client.sendRequest("asyncError");

      Assert.fail("An exception should be thrown");

    } catch (JsonRpcErrorException e) {
View Full Code Here

      checkException(e, "Exception message", "Data");
    }

    try {

      client.sendRequest("exceptionError");

      Assert.fail("An exception should be thrown");

    } catch (JsonRpcErrorException e) {
View Full Code Here

  public void test() throws IOException, InterruptedException {

    JsonRpcClient client = createJsonRpcClient("/new_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("/new_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

    JsonRpcClient client = createJsonRpcClient("/reconnection");

    if (client instanceof JsonRpcClientWebSocket) {

      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

    if (client instanceof JsonRpcClientWebSocket) {

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

      log.info("SessionId: " + client.getSession().getSessionId());
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));

      log.info("SessionId: " + client.getSession().getSessionId());

      JsonRpcClientWebSocket webSocketClient = (JsonRpcClientWebSocket) client;
View Full Code Here

      WebSocketSession session = webSocketClient.getWebSocketSession();
      session.close();

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

      client.setSessionId(null);
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.