Examples of WrappedMessage


Examples of de.spotnik.mail.core.message.WrappedMessage

        if( this.persister == null)
        {
            throw new TechnicalException("can't save messages, persister not set");
        }
       
        WrappedMessage wrappedMessage = null;
        try
        {
            wrappedMessage = new WrappedMessage(account, currentMsg, new Date());
           
            if( notParsed(wrappedMessage))
            {
                if( LOG.isDebugEnabled())
                {
                    LOG.debug("processing " + wrappedMessage.getMessageId() + ", Subject: "
                              + wrappedMessage.getSubject());
                }
               
                if( this.filter != null)
                {
                    this.filter.filter(wrappedMessage);
                }
               
                this.persister.addMessage(wrappedMessage);
                processListeners(wrappedMessage);
            }
        }
        catch( BusinessException ex)
        {
            // FIXME: do some error handling
            LOG.error("can't read message", ex);
        }
        catch( Exception ex)
        {
            if( wrappedMessage != null)
            {
                FATAL.error(ex.getMessage(), ex);
                FATAL.fatal("\n" + wrappedMessage.getRawMessage());
            }
        }
    }
View Full Code Here

Examples of org.infinispan.protostream.WrappedMessage

      List list = cacheQuery.list();

      List<WrappedMessage> results = new ArrayList<WrappedMessage>(projSize == 0 ? list.size() : list.size() * projSize);
      for (Object o : list) {
         if (projSize == 0) {
            results.add(new WrappedMessage(o));
         } else {
            Object[] row = (Object[]) o;
            for (int j = 0; j < projSize; j++) {
               results.add(new WrappedMessage(row[j]));
            }
         }
      }

      QueryResponse response = new QueryResponse();
View Full Code Here

Examples of org.infinispan.protostream.WrappedMessage

      List list = cacheQuery.list();
      List<WrappedMessage> results = new ArrayList<WrappedMessage>(projSize == 0 ? list.size() : list.size() * projSize);
      for (Object o : list) {
         if (projSize == 0) {
            results.add(new WrappedMessage(o));
         } else {
            Object[] row = (Object[]) o;
            for (int j = 0; j < projSize; j++) {
               results.add(new WrappedMessage(row[j]));
            }
         }
      }

      QueryResponse response = new QueryResponse();
View Full Code Here

Examples of org.infinispan.protostream.WrappedMessage

   }

   @Override
   public WrappedMessage readFrom(SerializationContext ctx, CodedInputStream in) throws IOException {
      Object o = ProtobufUtil.fromWrappedByteArray(ctx, in);
      return new WrappedMessage(o);
   }
View Full Code Here

Examples of org.infinispan.protostream.WrappedMessage

         if (projSize == 0) {
            if (compatMode) {
               // if we are in compat mode then this is the real object so need to marshall it first
               o = ProtobufUtil.toWrappedByteArray(serCtx, o);
            }
            results.add(new WrappedMessage(o));
         } else {
            Object[] row = (Object[]) o;
            for (int j = 0; j < projSize; j++) {
               results.add(new WrappedMessage(row[j]));
            }
         }
      }

      QueryResponse response = new QueryResponse();
View Full Code Here

Examples of org.infinispan.protostream.WrappedMessage

      List<?> list = cacheQuery.list();
      List<WrappedMessage> results = new ArrayList<WrappedMessage>(projSize == 0 ? list.size() : list.size() * projSize);
      for (Object o : list) {
         if (projSize == 0) {
            results.add(new WrappedMessage(o));
         } else {
            Object[] row = (Object[]) o;
            for (int j = 0; j < projSize; j++) {
               results.add(new WrappedMessage(row[j]));
            }
         }
      }

      QueryResponse response = new QueryResponse();
View Full Code Here

Examples of org.infinispan.protostream.WrappedMessage

         if (projSize == 0) {
            if (compatMode) {
               // if we are in compat mode then this is the real object so need to marshall it first
               o = ProtobufUtil.toWrappedByteArray(serCtx, o);
            }
            results.add(new WrappedMessage(o));
         } else {
            Object[] row = (Object[]) o;
            for (int j = 0; j < projSize; j++) {
               results.add(new WrappedMessage(row[j]));
            }
         }
      }

      QueryResponse response = new QueryResponse();
View Full Code Here

Examples of org.infinispan.protostream.WrappedMessage

      List<?> list = cacheQuery.list();
      List<WrappedMessage> results = new ArrayList<WrappedMessage>(projSize == 0 ? list.size() : list.size() * projSize);
      for (Object o : list) {
         if (projSize == 0) {
            results.add(new WrappedMessage(o));
         } else {
            Object[] row = (Object[]) o;
            for (int j = 0; j < projSize; j++) {
               results.add(new WrappedMessage(row[j]));
            }
         }
      }

      QueryResponse response = new QueryResponse();
View Full Code Here

Examples of org.infinispan.protostream.WrappedMessage

   }

   @Override
   public WrappedMessage readFrom(SerializationContext ctx, CodedInputStream in) throws IOException {
      Object o = ProtobufUtil.fromWrappedByteArray(ctx, in);
      return new WrappedMessage(o);
   }
View Full Code Here

Examples of org.infinispan.protostream.WrappedMessage

      List list = cacheQuery.list();
      List<WrappedMessage> results = new ArrayList<WrappedMessage>(projSize == 0 ? list.size() : list.size() * projSize);
      for (Object o : list) {
         if (projSize == 0) {
            results.add(new WrappedMessage(o));
         } else {
            Object[] row = (Object[]) o;
            for (int j = 0; j < projSize; j++) {
               results.add(new WrappedMessage(row[j]));
            }
         }
      }

      QueryResponse response = new QueryResponse();
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.