Examples of JsonRpcClientThrift


Examples of com.kurento.kmf.thrift.jsonrpcconnector.JsonRpcClientThrift

      Address kmfAddress = getThriftKmfAddress(prefix);

      log.info("kmsThriftAddress: {} and kmfThriftAddress: {}",
          kmsAddress, kmfAddress);

      client = new JsonRpcClientThrift(kmsAddress.getHost(),
          kmsAddress.getPort(), kmfAddress.getHost(),
          kmfAddress.getPort());

      break;
View Full Code Here

Examples of com.kurento.kmf.thrift.jsonrpcconnector.JsonRpcClientThrift

  private JsonRpcClient client;

  public RabbitMqConnectorManager(Address thriftKmsAddress,
      Address thriftKmfAddress, Address rabbitMqAddress) {

    this.client = new JsonRpcClientThrift(thriftKmsAddress.getHost(),
        thriftKmsAddress.getPort(), thriftKmfAddress.getHost(),
        thriftKmfAddress.getPort());

    log.info("Starting RabbitMQ to Thrift Media Connector");
View Full Code Here

Examples of com.kurento.kmf.thrift.jsonrpcconnector.JsonRpcClientThrift

  private JsonRpcServerThrift server;

  @Override
  protected JsonRpcClient createJsonRpcClient() {
    return new JsonRpcClientThrift("127.0.0.1", 6463, "127.0.0.1", 7979);
  }
View Full Code Here

Examples of com.kurento.kmf.thrift.jsonrpcconnector.JsonRpcClientThrift

    MediaPipelineFactory mpf = new MediaPipelineFactory(
        new JsonRpcClientRabbitMq());

    JsonRpcServerRabbitMq server = new JsonRpcServerRabbitMq(
        new JsonRpcClientThrift());

    server.start();

    MediaPipeline pipeline = mpf.create();
View Full Code Here

Examples of com.kurento.kmf.thrift.jsonrpcconnector.JsonRpcClientThrift

      ThriftInterfaceExecutorService executorService = new ThriftInterfaceExecutorService(
          thriftInterfaceConfiguration());

      MediaApiConfiguration mediaApiConfiguration = mediaApiConfiguration();

      JsonRpcClient client = new JsonRpcClientThrift(clientPool,
          executorService, new InetSocketAddress(
              mediaApiConfiguration.getHandlerAddress(),
              mediaApiConfiguration.getHandlerPort()));

      return new MediaPipelineFactory(client);
View Full Code Here

Examples of com.kurento.kmf.thrift.jsonrpcconnector.JsonRpcClientThrift

    server.start();
    log.info("Server started");

    log.info("Starting client");

    JsonRpcClient client = new JsonRpcClientThrift("127.0.0.1", 19292,
        "127.0.0.1", 7979);

    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);

    client.close();

    log.info("Client finished");

    server.destroy();
View Full Code Here

Examples of com.kurento.kmf.thrift.jsonrpcconnector.JsonRpcClientThrift

    server.destroy();
  }

  protected JsonRpcClient createJsonRpcClient() {

    return new JsonRpcClientThrift(LOCALHOST, THRIFT_SERVER_PORT,
        LOCALHOST, THRIFT_CLIENT_PORT);
  }
View Full Code Here

Examples of com.kurento.kmf.thrift.jsonrpcconnector.JsonRpcClientThrift

    log.info("Server started");

    long initTime = System.nanoTime();

    log.info("Starting client");
    JsonRpcClient client = new JsonRpcClientThrift("127.0.0.1", 19292,
        "127.0.0.1", 7979);

    if (!latch.await(15, TimeUnit.SECONDS)) {
      Assert.fail("Timeout of 15s waiting for keepAlives");
    } else {
      long duration = ((System.nanoTime() - initTime) / 1000000);

      Assert.assertTrue(
          "Waiting time should be greather than estimated keepAlive time ("
              + duration + " > " + (NUM_KEEP_ALIVES * 1000) + ")",
          duration > NUM_KEEP_ALIVES * 1000);

      Assert.assertTrue("Waiting time should be a bit more than "
          + NUM_KEEP_ALIVES + " keepAlive times (" + duration + " < "
          + ((NUM_KEEP_ALIVES + 3) * 1000) + ")",
          duration < (NUM_KEEP_ALIVES + 3) * 1000);

    }

    client.close();

    log.info("Client finished");

    server.destroy();

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.