/** * @param shouldMarkMessagesAsRead the shouldMarkMessagesAsRead. * @return the spec. * @see ImapMailReceiver#setShouldMarkMessagesAsRead(Boolean) */ public ImapIdleChannelAdapterSpec shouldMarkMessagesAsRead(boolean shouldMarkMessagesAsRead) { assertReceiver(); this.receiver.setShouldMarkMessagesAsRead(shouldMarkMessagesAsRead); return this; }
/** * @param searchTermStrategy the searchTermStrategy. * @return the spec. * @see ImapMailReceiver#setSearchTermStrategy(SearchTermStrategy) */ public ImapIdleChannelAdapterSpec searchTermStrategy(SearchTermStrategy searchTermStrategy) { assertReceiver(); this.receiver.setSearchTermStrategy(searchTermStrategy); return this; }
/** * A Java Mail {@link Session} to use. * @param session the session. * @return the spec. * @see ImapMailReceiver#setSession(Session) */ public ImapIdleChannelAdapterSpec session(Session session) { assertReceiver(); this.receiver.setSession(session); this.sessionProvided = true; return this; }
/** * @param maxFetchSize the maxFetchSize. * @return the spec. * @see ImapMailReceiver#setMaxFetchSize(int) */ public ImapIdleChannelAdapterSpec maxFetchSize(int maxFetchSize) { assertReceiver(); this.receiver.setMaxFetchSize(maxFetchSize); return this; }
/** * @param shouldDeleteMessages the shouldDeleteMessages. * @return the spec. * @see ImapMailReceiver#setShouldDeleteMessages(boolean) */ public ImapIdleChannelAdapterSpec shouldDeleteMessages(boolean shouldDeleteMessages) { assertReceiver(); this.receiver.setShouldDeleteMessages(shouldDeleteMessages); return this; }
/** * @param maxFetchSize the maxFetchSize. * @return the spec. * @see ImapMailReceiver#setMaxFetchSize(int) */ public ImapIdleChannelAdapterSpec maxFetchSize(int maxFetchSize) { assertReceiver(); this.receiver.setMaxFetchSize(maxFetchSize); return this; }
/** * @param shouldDeleteMessages the shouldDeleteMessages. * @return the spec. * @see ImapMailReceiver#setShouldDeleteMessages(boolean) */ public ImapIdleChannelAdapterSpec shouldDeleteMessages(boolean shouldDeleteMessages) { assertReceiver(); this.receiver.setShouldDeleteMessages(shouldDeleteMessages); return this; }
/** * A Java Mail {@link Session} to use. * @param session the session. * @return the spec. * @see ImapMailReceiver#setSession(Session) */ public ImapIdleChannelAdapterSpec session(Session session) { assertReceiver(); this.receiver.setSession(session); this.sessionProvided = true; return this; }
/** * @param searchTermStrategy the searchTermStrategy. * @return the spec. * @see ImapMailReceiver#setSearchTermStrategy(SearchTermStrategy) */ public ImapIdleChannelAdapterSpec searchTermStrategy(SearchTermStrategy searchTermStrategy) { assertReceiver(); this.receiver.setSearchTermStrategy(searchTermStrategy); return this; }
/** * @param shouldMarkMessagesAsRead the shouldMarkMessagesAsRead. * @return the spec. * @see ImapMailReceiver#setShouldMarkMessagesAsRead(Boolean) */ public ImapIdleChannelAdapterSpec shouldMarkMessagesAsRead(boolean shouldMarkMessagesAsRead) { assertReceiver(); this.receiver.setShouldMarkMessagesAsRead(shouldMarkMessagesAsRead); return this; }
/** * Configure an {@link Expression} to select messages. The root object for the expression * evaluation is a {@link javax.mail.internet.MimeMessage} which should return a boolean * result (true means select the message). * @param selectorExpression the selectorExpression. * @return the spec. * @since 1.2 */ public ImapIdleChannelAdapterSpec selectorExpression(Expression selectorExpression) { assertReceiver(); this.receiver.setSelectorExpression(selectorExpression); return this; }
/** * Configure an {@link Expression} to select messages. The root object for the expression * evaluation is a {@link javax.mail.internet.MimeMessage} which should return a boolean * result (true means select the message). * @param selectorExpression the selectorExpression. * @return the spec. * @since 1.2 */ public ImapIdleChannelAdapterSpec selectorExpression(Expression selectorExpression) { assertReceiver(); this.receiver.setSelectorExpression(selectorExpression); return this; }
/** * @param javaMailAuthenticator the javaMailAuthenticator. * @return the spec. * @see ImapMailReceiver#setJavaMailAuthenticator(Authenticator) */ public ImapIdleChannelAdapterSpec javaMailAuthenticator(Authenticator javaMailAuthenticator) { assertReceiver(); assertSession(); this.receiver.setJavaMailAuthenticator(javaMailAuthenticator); return this; }
/** * @param javaMailProperties the javaMailProperties. * @return the spec. * @see ImapMailReceiver#setJavaMailProperties(Properties) */ public ImapIdleChannelAdapterSpec javaMailProperties(Properties javaMailProperties) { assertReceiver(); assertSession(); this.receiver.setJavaMailProperties(javaMailProperties); return this; }
/** * @param javaMailAuthenticator the javaMailAuthenticator. * @return the spec. * @see ImapMailReceiver#setJavaMailAuthenticator(Authenticator) */ public ImapIdleChannelAdapterSpec javaMailAuthenticator(Authenticator javaMailAuthenticator) { assertReceiver(); assertSession(); this.receiver.setJavaMailAuthenticator(javaMailAuthenticator); return this; }
/** * @param javaMailProperties the javaMailProperties. * @return the spec. * @see ImapMailReceiver#setJavaMailProperties(Properties) */ public ImapIdleChannelAdapterSpec javaMailProperties(Properties javaMailProperties) { assertReceiver(); assertSession(); this.receiver.setJavaMailProperties(javaMailProperties); return this; }
/** * Set the name of the flag to use to flag messages when the server does * not support \Recent but supports user flags; * default {@value ImapMailReceiver#DEFAULT_SI_USER_FLAG}. * @param userFlag the flag. * @return the spec. * @since 1.2 * @see ImapMailReceiver#setUserFlag(String) */ public ImapIdleChannelAdapterSpec userFlag(String userFlag) { assertReceiver(); this.receiver.setUserFlag(userFlag); return _this(); }
/** * Set the header mapper; if a header mapper is not provided, the message payload is * a {@link MimeMessage}, when provided, the headers are mapped and the payload is * the {@link MimeMessage} content. * @param headerMapper the header mapper. * @return the spec. * @since 1.2 * @see ImapMailReceiver#setUserFlag(String) * @see #embeddedPartsAsBytes(boolean) */ public ImapIdleChannelAdapterSpec headerMapper(HeaderMapper<MimeMessage> headerMapper) { assertReceiver(); this.receiver.setHeaderMapper(headerMapper); return _this(); }
/** * Set the name of the flag to use to flag messages when the server does * not support \Recent but supports user flags; * default {@value ImapMailReceiver#DEFAULT_SI_USER_FLAG}. * @param userFlag the flag. * @return the spec. * @since 1.2 * @see ImapMailReceiver#setUserFlag(String) */ public ImapIdleChannelAdapterSpec userFlag(String userFlag) { assertReceiver(); this.receiver.setUserFlag(userFlag); return _this(); }
/** * When a header mapper is provided determine whether an embedded {@link Part} (e.g * {@link Message} or {@link javax.mail.Multipart} content is rendered as a byte[] in the * payload. Otherwise, leave as a {@link Part}. These objects are not suitable for * downstream serialization. Default: true. * <p>This has no effect if there is no header mapper, in that case the payload is the * {@link MimeMessage}. * @param embeddedPartsAsBytes the embeddedPartsAsBytes to set. * @return the spec. * @since 1.2 * @see #headerMapper(HeaderMapper) */ public ImapIdleChannelAdapterSpec embeddedPartsAsBytes(boolean embeddedPartsAsBytes) { assertReceiver(); this.receiver.setEmbeddedPartsAsBytes(embeddedPartsAsBytes); return _this(); }