Stores a list of inbox messages
@param inboxMessages ArrayList of type {@link CTMessageDAO}
173728
synchronized void upsertMessages(ArrayList<CTMessageDAO> inboxMessages){
        if (!this.belowMemThreshold()) {
            Logger.v("There is not enough space left on the device to store data, data discarded");
            return;
        }
        //noinspection TryFinallyCanBeTryWithResources
        try {
            final SQLiteDatabase db = dbHelper.getWritableDatabase();
            for(CTMessageDAO messageDAO : inboxMessages) {
                final ContentValues cv = new ContentValues();
                cv.put(_ID, messageDAO.getId());
                cv.put(KEY_DATA, messageDAO.getJsonData().toString());
                cv.put(WZRKPARAMS, messageDAO.getWzrkParams().toString());
                cv.put(CAMPAIGN,messageDAO.getCampaignId());
                cv.put(TAGS, messageDAO.getTags());
                cv.put(IS_READ, messageDAO.isRead());
                cv.put(EXPIRES, messageDAO.getExpires());
                cv.put(KEY_CREATED_AT,messageDAO.getDate());
                cv.put(USER_ID,messageDAO.getUserId());
                db.insertWithOnConflict(Table.INBOX_MESSAGES.getName(),null,cv,SQLiteDatabase.CONFLICT_REPLACE);
            }
        } catch (final SQLiteException e) {
            getConfigLogger().verbose("Error adding data to table " + Table.INBOX_MESSAGES.getName());
        } finally {
            dbHelper.close();
        }
    }
1176619
public void pushMessages(List<byte[]> messages) {
    for (byte[] message: messages) {
      producer.send(new ProducerRecord<>(topic, message), (recordMetadata, e) -> {
        if (e != null) {
          log.error("Failed to send message to topic {} due to exception: ", topic, e);
        }
      });
    }
  }
1173045
@Override
	protected int storeMessage(AbstractMessage message, int previousHandle) throws JMSException
    {
    	return ((InMemoryLinkedDataStore)dataStore).store(message, previousHandle);
	}
983552
public void pushMessages(List<byte[]> messages) {
    List<KeyedMessage<String, byte[]>> keyedMessages = Lists.transform(messages,
        new Function<byte[], KeyedMessage<String, byte[]>>() {
          @Nullable
          @Override
          public KeyedMessage<String, byte[]> apply(byte[] bytes) {
            return new KeyedMessage<String, byte[]>(topic, bytes);
          }
        });
    this.producer.send(keyedMessages);
  }
1092813
public GetServiceStatusResult withMessages(Message... values) {
        List<Message> list = getMessages();
        for (Message value : values) {
            list.add(value);
        }
        return this;
    }
1104781
public List<ValidationMessage<Origin>> getMessages(String messageKey, Severity severity) {

		List<ValidationMessage<Origin>> messages = new ArrayList<ValidationMessage<Origin>>();

        for (ValidationResult result : results) {
            for (ValidationMessage<Origin> message : result.getMessages()) {
                if (messageKey.equals(message.getMessageKey()) && severity.equals(message.getSeverity())) {
                    messages.add(message);
                }
            }
        }

        return messages;
	}
1194395
public void addMessages(List<CmsMessages> messages) {

        if (messages == null) {
            throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_MULTIMSG_EMPTY_LIST_0));
        }

        Iterator<CmsMessages> i = messages.iterator();
        while (i.hasNext()) {
            addMessages(i.next());
        }
    }
75334
@SuppressWarnings({"unused", "WeakerAccess"})
    public CTInboxMessage getInboxMessageForId(String messageId){
        synchronized (inboxControllerLock) {
            if (this.ctInboxController != null) {
                CTMessageDAO message = ctInboxController.getMessageForId(messageId);
                return (message != null) ? new CTInboxMessage(message.toJSON()) :  null;
            } else {
                getConfigLogger().debug(getAccountId(), "Notification Inbox not initialized");
                return null;
            }
        }
    }
279915
public void put(DelayableImmutableMessage delayableImmutableMessage) {
        if (messagePersister.persist(messageQueueId, delayableImmutableMessage)) {
            logger.trace("Message {} was persisted for messageQueueId {}",
                         delayableImmutableMessage.getMessage(),
                         messageQueueId);
        } else {
            logger.trace("Message {} was not persisted for messageQueueId {}",
                         delayableImmutableMessage.getMessage(),
                         messageQueueId);
        }
        delayableImmutableMessages.put(delayableImmutableMessage);
    }
391854
def _AddMessageMethods(message_descriptor, cls):
  """"""
  _AddListFieldsMethod(message_descriptor, cls)
  _AddHasFieldMethod(message_descriptor, cls)
  _AddClearFieldMethod(message_descriptor, cls)
  if message_descriptor.is_extendable:
    _AddClearExtensionMethod(cls)
    _AddHasExtensionMethod(cls)
  _AddEqualsMethod(message_descriptor, cls)
  _AddStrMethod(message_descriptor, cls)
  _AddReprMethod(message_descriptor, cls)
  _AddUnicodeMethod(message_descriptor, cls)
  _AddByteSizeMethod(message_descriptor, cls)
  _AddSerializeToStringMethod(message_descriptor, cls)
  _AddSerializePartialToStringMethod(message_descriptor, cls)
  _AddMergeFromStringMethod(message_descriptor, cls)
  _AddIsInitializedMethod(message_descriptor, cls)
  _AddMergeFromMethod(cls)
  _AddWhichOneofMethod(message_descriptor, cls)
  _AddReduceMethod(cls)
  # Adds methods which do not depend on cls.
  cls.Clear = _Clear
  cls.DiscardUnknownFields = _DiscardUnknownFields
  cls._SetListener = _SetListener
1029477
synchronized ArrayList<CTMessageDAO> getMessages(String userId){
        final String tName = Table.INBOX_MESSAGES.getName();
        Cursor cursor;
        ArrayList<CTMessageDAO> messageDAOArrayList = new ArrayList<>();
        try{
            final SQLiteDatabase db = dbHelper.getWritableDatabase();
            cursor= db.rawQuery("SELECT * FROM "+tName+" WHERE " + USER_ID + " = ? ORDER BY " + KEY_CREATED_AT+ " DESC", new String[]{userId});
            if(cursor != null) {
                while(cursor.moveToNext()){
                    CTMessageDAO ctMessageDAO = new CTMessageDAO();
                    ctMessageDAO.setId(cursor.getString(cursor.getColumnIndex(_ID)));
                    ctMessageDAO.setJsonData(new JSONObject(cursor.getString(cursor.getColumnIndex(KEY_DATA))));
                    ctMessageDAO.setWzrkParams(new JSONObject(cursor.getString(cursor.getColumnIndex(WZRKPARAMS))));
                    ctMessageDAO.setDate(cursor.getLong(cursor.getColumnIndex(KEY_CREATED_AT)));
                    ctMessageDAO.setExpires(cursor.getLong(cursor.getColumnIndex(EXPIRES)));
                    ctMessageDAO.setRead(cursor.getInt(cursor.getColumnIndex(IS_READ)));
                    ctMessageDAO.setUserId(cursor.getString(cursor.getColumnIndex(USER_ID)));
                    ctMessageDAO.setTags(cursor.getString(cursor.getColumnIndex(TAGS)));
                    ctMessageDAO.setCampaignId(cursor.getString(cursor.getColumnIndex(CAMPAIGN)));
                    messageDAOArrayList.add(ctMessageDAO);
                }
                cursor.close();
            }
            return messageDAOArrayList;
        }catch (final SQLiteException e){
            getConfigLogger().verbose("Error retrieving records from " + tName, e);
            return null;
        } catch (JSONException e) {
            getConfigLogger().verbose("Error retrieving records from " + tName, e.getMessage());
            return null;
        } finally {
            dbHelper.close();
        }
    }
651190
public void setMailSettings(CmsMailSettings mailSettings) {

        m_mailSettings = mailSettings;
        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_MAIL_SETTINGS_1, mailSettings));
        }
    }
902000
public void deleteMails(String as[], String as1[]) throws MessagingException, IOException {
	Folder folder;
	Message amessage[];
	folder = _store.getFolder("INBOX");
	folder.open(2);
	Map<String, Message> map = getMessages(null, folder, as1, as, startrow, maxrows, false);
	Iterator<String> iterator = map.keySet().iterator();
	amessage = new Message[map.size()];
	int i = 0;
	while (iterator.hasNext()) {
	    amessage[i++] = map.get(iterator.next());
	}
	try {
	    folder.setFlags(amessage, new Flags(javax.mail.Flags.Flag.DELETED), true);
	}
	finally {
	    folder.close(true);
	}
    }
139974
public Iterator<String> getMessages() {
		Iterator<SmtpMessage> it = server.getReceivedEmail();

		List<String> msgs = new ArrayList<>();
		while(it.hasNext()) {
			SmtpMessage msg = it.next();
			msgs.add(msg.toString());
		}

		return msgs.iterator();
	}
788578
private void checkMessageID(Message message) {
        if (!MessageUtils.isOutbound(message)) return;

        AddressingProperties maps =
                ContextUtils.retrieveMAPs(message, false, MessageUtils.isOutbound(message));
        if (maps == null) {
            maps = new AddressingProperties();
        }
        if (maps.getMessageID() == null) {
            String messageID = ContextUtils.generateUUID();
            boolean isRequestor = ContextUtils.isRequestor(message);
            maps.setMessageID(ContextUtils.getAttributedURI(messageID));
            ContextUtils.storeMAPs(maps, message, ContextUtils.isOutbound(message), isRequestor);
        }
    }
298272
public java.util.List<String> getMessages() {
        if (messages == null) {
            messages = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return messages;
    }
580816
public void addWarningMsgs(final Set<String> msgs) {
    if (msgs != null) {
      this._warningMsgs.addAll(msgs);
      if (!msgs.isEmpty() && this._errorMsgs.isEmpty()) {
        this._status = ValidationStatus.WARN;
      }
    }
  }