Examples of nextMessage()


Examples of com.spotify.docker.client.LogReader.nextMessage()

  protected String readLogFully(final ClientResponse logs) throws IOException {
    final LogReader logReader = new LogReader(logs.getEntityInputStream());
    StringBuilder stringBuilder = new StringBuilder();
    LogMessage logMessage;
    while ((logMessage = logReader.nextMessage()) != null) {
      stringBuilder.append(UTF_8.decode(logMessage.content()));
    }
    logReader.close();
    return stringBuilder.toString();
  }
View Full Code Here

Examples of org.apache.qpid.disttest.client.MessageProvider.nextMessage()

        final Session session = _testSessions.get(command.getSessionName());
        final MessageProducer producer = _testProducers.get(command.getParticipantName());
        try
        {
            sentMessage = messageProvider.nextMessage(session, command);
            int deliveryMode = producer.getDeliveryMode();
            int priority = producer.getPriority();
            long ttl = producer.getTimeToLive();
            if (messageProvider.isPropertySet(MessageProvider.PRIORITY))
            {
View Full Code Here

Examples of org.apache.qpid.disttest.client.MessageProvider.nextMessage()

    public void runSizeTest(int size) throws Exception
    {
        CreateProducerCommand command = new CreateProducerCommand();
        command.setMessageSize(size);
        MessageProvider messageProvider = new MessageProvider(null);
        Message message = messageProvider.nextMessage(_session, command);
        assertNotNull("Message is not generated", message);
        assertTrue("Wrong message type", message instanceof TextMessage);
        TextMessage textMessage = (TextMessage)message;
        String text = textMessage.getText();
        assertNotNull("Message payload is not generated", text);
View Full Code Here

Examples of org.apache.qpid.disttest.client.MessageProvider.nextMessage()

        final Session session = _testSessions.get(command.getSessionName());
        final MessageProducer producer = _testProducers.get(command.getParticipantName());
        try
        {
            sentMessage = messageProvider.nextMessage(session, command);
            int deliveryMode = producer.getDeliveryMode();
            int priority = producer.getPriority();
            long ttl = producer.getTimeToLive();
            if (messageProvider.isPropertySet(MessageProvider.PRIORITY))
            {
View Full Code Here

Examples of org.apache.qpid.disttest.client.MessageProvider.nextMessage()

        final Session session = _testSessions.get(command.getSessionName());
        final MessageProducer producer = _testProducers.get(command.getParticipantName());
        try
        {
            sentMessage = messageProvider.nextMessage(session, command);
            int deliveryMode = producer.getDeliveryMode();
            int priority = producer.getPriority();
            long ttl = producer.getTimeToLive();
            if (messageProvider.isPropertySet(MessageProvider.PRIORITY))
            {
View Full Code Here

Examples of org.fudgemsg.wire.FudgeMsgReader.nextMessage()

    FudgeMsgReader reader = null;
    try {
      FileInputStream fis = new FileInputStream(inputFile);
      reader = fudgeContext.createMessageReader(fis);
      while (reader.hasNext()) {
        FudgeMsg msg = reader.nextMessage();
        LoggedReferenceData loggedData = fudgeContext.fromFudgeMsg(LoggedReferenceData.class, msg);
        addDataToMap(fudgeContext, dataMap, loggedData);
      }
    } catch (FileNotFoundException ex) {
      throw new OpenGammaRuntimeException("Cannot open " + inputFile + " for reading");
View Full Code Here

Examples of org.fudgemsg.wire.FudgeMsgReader.nextMessage()

    ConnectionRequestMessage requestMessage = new ConnectionRequestMessage();
    requestMessage.setUserName(_user.getUserName());
    _messageSender.send(ConnectionRequestBuilder.buildMessageStatic(new FudgeSerializer(getFudgeContext()), requestMessage));
    // TODO kirk 2012-08-22 -- This needs a timeout.
    FudgeMsgReader reader = getFudgeContext().createMessageReader(is);
    FudgeMsg msg = reader.nextMessage();
    ConnectionResponseMessage response = ConnectionResponseBuilder.buildObjectStatic(new FudgeDeserializer(getFudgeContext()), msg);
    switch(response.getResult()) {
      case NEW_CONNECTION_SUCCESS:
      case EXISTING_CONNECTION_RESTART:
        // We're good to go!
View Full Code Here

Examples of org.fudgemsg.wire.FudgeMsgReader.nextMessage()

                new FudgeDataInputStreamReader(context, proc.getInputStream()))) {
              ScheduledThreadPoolExecutor scheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(3);
              Future<FudgeMsg> retMsgFuture = scheduledThreadPoolExecutor.submit(new Callable<FudgeMsg>() {
                @Override
                public FudgeMsg call() throws Exception {
                  return fudgeMsgReader.nextMessage();
                }
              });
             
              Future<List<String>> errFuture = scheduledThreadPoolExecutor.submit(new Callable<List<String>>() {
                @Override
View Full Code Here

Examples of org.fudgemsg.wire.FudgeMsgReader.nextMessage()

 
  public void loadConfig(InputStream inputStream) {
    FudgeXMLStreamReader xmlStreamReader = new FudgeXMLStreamReader(OpenGammaFudgeContext.getInstance(), new InputStreamReader(new BufferedInputStream(inputStream)));
    FudgeMsgReader fudgeMsgReader = new FudgeMsgReader(xmlStreamReader);
    FudgeDeserializer deserializer = new FudgeDeserializer(OpenGammaFudgeContext.getInstance());
    FudgeMsg configsMessage = fudgeMsgReader.nextMessage();
    if (configsMessage == null) {
      s_logger.error("Error reading first message from XML stream");
      return;
    }
    Object object = deserializer.fudgeMsgToObject(FlexiBean.class, configsMessage);
View Full Code Here

Examples of org.fudgemsg.wire.FudgeMsgReader.nextMessage()

    }
    Map<ExternalId, Map<String, Double>> ticks = Maps.newHashMap();
    FudgeMsgReader reader = s_fudgeContext.createMessageReader(fis);
    try {
      while (reader.hasNext()) {
        FudgeMsg message = reader.nextMessage();
        ExternalId securityId = ExternalId.parse(message.getString(RedisLKVFileWriter.SECURITY));
        if (_schemeBlackList.containsKey(securityId.getScheme().getName())) {
          continue;
        }
        FudgeMsg ticksMsg = message.getMessage(RedisLKVFileWriter.TICKS);
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.