Examples of nextMessage()


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

    getLogger().info("{} bytes", data.length);
   
    ByteArrayInputStream bais = new ByteArrayInputStream(data);
    InputStreamReader inputReader = new InputStreamReader(new BufferedInputStream(bais), Charsets.UTF_8);
    try (FudgeMsgReader fudgeReader = new FudgeMsgReader(new FudgeXMLStreamReader(getFudgeContext(), inputReader))) {
      return fudgeReader.nextMessage();
    }
  }

  @SuppressWarnings("unchecked")
  protected <T> T cycleObjectOverBytes(final T object) {
View Full Code Here

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

    writer.writeMessage(msg);
    writer.close();

    ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
    FudgeMsgReader reader = context.createMessageReader(bais);
    FudgeMsg rebuiltMsg = reader.nextMessage();
    AssertJUnit.assertNotNull(rebuiltMsg);
    FudgeField currencyPairField = rebuiltMsg.getByName(CURRENCY_PAIR);
    AssertJUnit.assertNotNull(currencyPairField);
    AssertJUnit.assertEquals(String.class, currencyPairField.getType().getJavaType());
    CurrencyPair currencyPair = rebuiltMsg.getFieldValue(CurrencyPair.class, currencyPairField);
View Full Code Here

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

   */
  protected <T> T parseXML(String xml, Class<T> type) {
    final CharArrayReader car = new CharArrayReader(xml.toCharArray());
    @SuppressWarnings("resource")
    final FudgeMsgReader fmr = new FudgeMsgReader(new FudgeXMLStreamReader(getFudgeContext(), car));
    final FudgeMsg message = fmr.nextMessage();
    return getFudgeContext().fromFudgeMsg(type, message);
  }

  /**
   * Converts JSON to configuration object
View Full Code Here

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

    try {
      FileInputStream fis = new FileInputStream(fullPath);
      FudgeMsgReader reader = s_fudgeContext.createMessageReader(fis);
      try {
        while (reader.hasNext()) {
          FudgeMsg message = reader.nextMessage();
          String buid = message.getString(BUID_KEY);
          if (afterEndTime(message)) {
            return false;
          }
          boolean isRequestedSecurity = _securities.contains(buid) || _securities.isEmpty();
View Full Code Here

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

      InputStream entityStream) throws IOException, WebApplicationException {
   
    InputStreamReader entityReader = new InputStreamReader(entityStream, Charsets.UTF_8);
    @SuppressWarnings("resource"// wraps stream that cannot be closed here
    FudgeMsgReader reader = new FudgeMsgReader(new FudgeXMLStreamReader(getFudgeContext(), entityReader));
    FudgeMsg message = reader.nextMessage();
    if (message == null) {
      return null;
    }
    FudgeDeserializer deser = new FudgeDeserializer(getFudgeContext());
    return deser.fudgeMsgToObject(type, message);
View Full Code Here

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

      InputStream entityStream) throws IOException, WebApplicationException {
   
    InputStreamReader entityReader = new InputStreamReader(entityStream, Charsets.UTF_8);
    @SuppressWarnings("resource"// wraps stream that cannot be closed here
    FudgeMsgReader reader = new FudgeMsgReader(new FudgeJSONStreamReader(getFudgeContext(), entityReader));
    FudgeMsg message = reader.nextMessage();
    if (message == null) {
      return null;
    }
    FudgeDeserializer deser = new FudgeDeserializer(getFudgeContext());
    return deser.fudgeMsgToObject(type, message);
View Full Code Here

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

      MultivaluedMap<String, String> httpHeaders,
      InputStream entityStream) throws IOException, WebApplicationException {
   
    @SuppressWarnings("resource")
    FudgeMsgReader reader = new FudgeMsgReader(new FudgeDataInputStreamReader(getFudgeContext(), entityStream));
    FudgeMsg message = reader.nextMessage();
    if (message == null) {
      return null;
    }
    FudgeDeserializer deser = new FudgeDeserializer(getFudgeContext());
    return deser.fudgeMsgToObject(type, message);
View Full Code Here

Examples of org.jboss.jms.delegate.BrowserEndpoint.nextMessage()

      if (endpoint == null)
      {
         throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
      }
     
      return new BrowserNextMessageResponse(endpoint.nextMessage());
   }

   public void write(DataOutputStream os) throws Exception
   {
      super.write(os);
View Full Code Here

Examples of org.jboss.jms.delegate.BrowserEndpoint.nextMessage()

/* 62 */     if (endpoint == null)
/*    */     {
/* 64 */       throw new IllegalStateException("Cannot find object in dispatcher with id " + this.objectId);
/*    */     }
/*    */
/* 67 */     return new BrowserNextMessageResponse(endpoint.nextMessage());
/*    */   }
/*    */
/*    */   public void write(DataOutputStream os) throws Exception
/*    */   {
/* 72 */     super.write(os);
View Full Code Here

Examples of org.jboss.jms.server.endpoint.BrowserEndpoint.nextMessage()

      if (endpoint == null)
      {
         throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
      }
     
      return new BrowserNextMessageResponse(endpoint.nextMessage());
   }

   public void write(DataOutputStream os) throws Exception
   {
      super.write(os);
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.