Package com.kurento.kmf.rabbitmq.server

Examples of com.kurento.kmf.rabbitmq.server.JsonRpcServerRabbitMq


    System.setProperty(KeepAliveManager.KEEP_ALIVE_INTERVAL_TIME_PROPERTY,
        "1000");

    log.info("Starting server");
    JsonRpcServerRabbitMq server = new JsonRpcServerRabbitMq(
        new EchoJsonRpcHandler());

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

    long initTime = System.nanoTime();

    log.info("Starting client");
    JsonRpcClientRabbitMq client = new JsonRpcClientRabbitMq();

    MediaPipelineFactory mpf = new MediaPipelineFactory(client);
    MediaPipeline pipeline = mpf.create();

    checkKeepAlives(initTime, NUM_KEEP_ALIVES * 1000,
        (NUM_KEEP_ALIVES + 1) * 1000);

    // There are two pipelines and NUM_KEEP_ALIVES are submited in the half
    // of the time
    initTime = System.nanoTime();
    latch = new CountDownLatch(NUM_KEEP_ALIVES);
    MediaPipeline pipeline2 = mpf.create();
    checkKeepAlives(initTime, NUM_KEEP_ALIVES * 1000 / 2,
        (NUM_KEEP_ALIVES + 1) * 1000 / 2);

    client.close();

    log.info("Client finished");

    server.destroy();

    log.info("Server finished");

  }
View Full Code Here


  @Test
  public void simpleRetryTest() throws TException, IOException,
      InterruptedException {

    server = new JsonRpcServerRabbitMq(
        new DefaultJsonRpcHandler<JsonObject>() {

          private int numRequests = 0;

          @Override
View Full Code Here

  @Test
  public void replyBeforeNextRetry() throws TException, IOException,
      InterruptedException {

    server = new JsonRpcServerRabbitMq(
        new DefaultJsonRpcHandler<JsonObject>() {

          @Override
          public void handleRequest(Transaction transaction,
              Request<JsonObject> request) throws Exception {
View Full Code Here

    KurentoServicesTestHelper.startKurentoMediaServer();

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

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

    server.start();

    MediaPipeline pipeline = mpf.create();

    PlayerEndpoint player = pipeline.newPlayerEndpoint(
        "http://files.kurento.org/video/small.webm").build();
View Full Code Here

TOP

Related Classes of com.kurento.kmf.rabbitmq.server.JsonRpcServerRabbitMq

Copyright © 2018 www.massapicom. 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.