Examples of waitForMessage()


Examples of com.opengamma.transport.CollectingFudgeMessageReceiver.waitForMessage()

    conduit.getEnd2 ().getFudgeMessageSender().send (FudgeSerializer.addClassHeader(scontext.objectToFudgeMsg (new Init(0)), Init.class, RemoteCalcNodeMessage.class));
    final CalculationJob job = createTestCalculationJob();
    AbstractIdentifierMap.convertIdentifiers(identifierMap, job);
    conduit.getEnd2().getFudgeMessageSender().send(
        FudgeSerializer.addClassHeader(scontext.objectToFudgeMsg(new Execute(job)), Execute.class, RemoteCalcNodeMessage.class));
    final FudgeMsgEnvelope resultMsgEnvelope = messages.waitForMessage(TIMEOUT);
    assertNotNull(resultMsgEnvelope);
    final RemoteCalcNodeMessage resultMessage = dcontext.fudgeMsgToObject(RemoteCalcNodeMessage.class, resultMsgEnvelope.getMessage());
    assertTrue(resultMessage instanceof Result);
    final Result result = (Result) resultMessage;
    assertEquals(job.getSpecification(), result.getResult().getSpecification());
View Full Code Here

Examples of com.opengamma.transport.CollectingFudgeMessageReceiver.waitForMessage()

    final CalculationJob job1 = createTestCalculationJob();
    final CalculationJob job2 = createTestCalculationJob();
    AbstractIdentifierMap.convertIdentifiers(identifierMap, job1);
    conduit.getEnd2().getFudgeMessageSender().send(FudgeSerializer.addClassHeader(scontext.objectToFudgeMsg(new Execute(job1)), Execute.class, RemoteCalcNodeMessage.class));
    conduit.getEnd2().getFudgeMessageSender().send(FudgeSerializer.addClassHeader(scontext.objectToFudgeMsg(new IsAlive(Arrays.asList (job1.getSpecification (), job2.getSpecification ()))), IsAlive.class, RemoteCalcNodeMessage.class));
    final FudgeMsgEnvelope resultMsgEnvelope = messages.waitForMessage(TIMEOUT);
    assertNotNull(resultMsgEnvelope);
    final RemoteCalcNodeMessage failureMessage = dcontext.fudgeMsgToObject(RemoteCalcNodeMessage.class, resultMsgEnvelope.getMessage());
    assertTrue(failureMessage instanceof Failure);
    final Failure failure = (Failure) failureMessage;
    assertEquals(job2.getSpecification(), failure.getJob());
View Full Code Here

Examples of com.opengamma.transport.CollectingFudgeMessageReceiver.waitForMessage()

    final RemoteCalcNodeMessage failureMessage = dcontext.fudgeMsgToObject(RemoteCalcNodeMessage.class, resultMsgEnvelope.getMessage());
    assertTrue(failureMessage instanceof Failure);
    final Failure failure = (Failure) failureMessage;
    assertEquals(job2.getSpecification(), failure.getJob());
    // No more messages - job1 is alive
    assertNull (messages.waitForMessage(TIMEOUT));
  }

  public void errorInvocation() {
    final IdentifierMap identifierMap = new InMemoryIdentifierMap ();
    final DirectFudgeConnection conduit = new DirectFudgeConnection(s_fudgeContext);
View Full Code Here

Examples of com.opengamma.transport.CollectingFudgeMessageReceiver.waitForMessage()

    conduit.getEnd2 ().getFudgeMessageSender().send (FudgeSerializer.addClassHeader(scontext.objectToFudgeMsg (new Init(0)), Init.class, RemoteCalcNodeMessage.class));
    final CalculationJob job = createTestCalculationJob();
    AbstractIdentifierMap.convertIdentifiers(identifierMap, job);
    conduit.getEnd2().getFudgeMessageSender().send(
        FudgeSerializer.addClassHeader(scontext.objectToFudgeMsg(new Execute(job)), Execute.class, RemoteCalcNodeMessage.class));
    final FudgeMsgEnvelope resultMsgEnvelope = messages.waitForMessage(TIMEOUT);
    assertNotNull(resultMsgEnvelope);
    final RemoteCalcNodeMessage resultMessage = dcontext.fudgeMsgToObject(RemoteCalcNodeMessage.class, resultMsgEnvelope.getMessage());
    assertTrue(resultMessage instanceof Failure);
    final Failure failure = (Failure) resultMessage;
    assertEquals(job.getSpecification(), failure.getJob ());
View Full Code Here

Examples of org.apache.giraph.examples.utils.BrachaTouegDeadlockVertexValue.waitForMessage()

      sendMessage(vertexId,
                  edge.getTargetVertexId().get(),
                  BrachaTouegDeadlockMessage.NOTIFY);

      /* the node will wait for a DONE message from each notified vertex */
      value.waitForMessage(Long.valueOf(edge.getTargetVertexId().get()),
                           Long.valueOf(BrachaTouegDeadlockMessage.DONE));
    }

    /* if no requests are pending, the node has to start GRANTing to all
       incoming edges */
 
View Full Code Here

Examples of org.apache.giraph.examples.utils.BrachaTouegDeadlockVertexValue.waitForMessage()

    for (Long parent : parents) {
      sendMessage(vertexId, parent,
                  BrachaTouegDeadlockMessage.GRANT);

      /* the node will wait for a ACK message for each GRANTed vertex */
      value.waitForMessage(parent,
                           Long.valueOf(BrachaTouegDeadlockMessage.ACK));
    }
  }

  /**
 
View Full Code Here

Examples of org.apache.qpid.util.LogMonitor.waitForMessage()

            jmxu.close();
        }

        LogMonitor _monitor = new LogMonitor(_outputFile);
        assertTrue("The expected server security configuration reload did not occur",
                _monitor.waitForMessage(ServerConfiguration.SECURITY_CONFIG_RELOADED, LOGMONITOR_TIMEOUT));
    }

    protected int getFailingPort()
    {
        return FAILING_PORT;
View Full Code Here

Examples of org.apache.qpid.util.LogMonitor.waitForMessage()

                jmxu.close();
            }
           
            LogMonitor _monitor = new LogMonitor(_outputFile);
            assertTrue("The expected server security configuration reload did not occur",
                    _monitor.waitForMessage(ServerConfiguration.SECURITY_CONFIG_RELOADED, LOGMONITOR_TIMEOUT));

        }
    }
}
View Full Code Here

Examples of org.apache.qpid.util.LogMonitor.waitForMessage()

                jmxu.close();
            }
           
            LogMonitor _monitor = new LogMonitor(_outputFile);
            assertTrue("The expected server security configuration reload did not occur",
                    _monitor.waitForMessage(ServerConfiguration.SECURITY_CONFIG_RELOADED, LOGMONITOR_TIMEOUT));

        }
    }
}
View Full Code Here

Examples of org.apache.qpid.util.LogMonitor.waitForMessage()

        // Check that Error has been written to the application log.

        LogMonitor _monitor = new LogMonitor(_outputFile);
        assertTrue("The expected message not written to log file.",
                _monitor.waitForMessage(javaLangErrorMessageText, LOGMONITOR_TIMEOUT));

        if (_clientConnection != null)
        {
            try
            {
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.