/** * An {@link ImapMailInboundChannelAdapterSpec} factory based on the provided {@link ImapMailReceiver}. * @param imapMailReceiver the {@link ImapMailReceiver} to use. * @return the {@link ImapMailInboundChannelAdapterSpec} instance. * @since 1.2 */ public static ImapMailInboundChannelAdapterSpec imapInboundAdapter(ImapMailReceiver imapMailReceiver) { return new ImapMailInboundChannelAdapterSpec(imapMailReceiver); }
@Bean public IntegrationFlow imapMailFlow() { return IntegrationFlows .from(Mail.imapInboundAdapter("imap://user:pw@localhost:" + imapServer.getPort() + "/INBOX") .searchTermStrategy(this::fromAndNotSeenTerm) .userFlag("testSIUserFlag") .javaMailProperties(p -> p.put("mail.debug", "false")), e -> e.autoStartup(true) .poller(p -> p.fixedDelay(1000))) .channel(MessageChannels.queue("imapChannel")) .get(); }
/** * A flag to determine if message should be marked as read. * @param shouldMarkMessagesAsRead the shouldMarkMessagesAsRead. * @return the spec. * @see ImapMailReceiver#setShouldMarkMessagesAsRead(Boolean) */ public ImapMailInboundChannelAdapterSpec shouldMarkMessagesAsRead(boolean shouldMarkMessagesAsRead) { assertReceiver(); this.receiver.setShouldMarkMessagesAsRead(shouldMarkMessagesAsRead); return this; }
/** * A flag to determine if message should be marked as read. * @param shouldMarkMessagesAsRead the shouldMarkMessagesAsRead. * @return the spec. * @see ImapMailReceiver#setShouldMarkMessagesAsRead(Boolean) */ public ImapMailInboundChannelAdapterSpec shouldMarkMessagesAsRead(boolean shouldMarkMessagesAsRead) { assertReceiver(); this.receiver.setShouldMarkMessagesAsRead(shouldMarkMessagesAsRead); return this; }
/** * An {@link ImapMailInboundChannelAdapterSpec} factory based on the provided {@link ImapMailReceiver}. * @param imapMailReceiver the {@link ImapMailReceiver} to use. * @return the {@link ImapMailInboundChannelAdapterSpec} instance. * @since 1.2 */ public static ImapMailInboundChannelAdapterSpec imapInboundAdapter(ImapMailReceiver imapMailReceiver) { return new ImapMailInboundChannelAdapterSpec(imapMailReceiver); }
/** * A {@link SearchTermStrategy} to use. * @param searchTermStrategy the searchTermStrategy. * @return the spec. * @see ImapMailReceiver#setSearchTermStrategy(SearchTermStrategy) */ public ImapMailInboundChannelAdapterSpec searchTermStrategy(SearchTermStrategy searchTermStrategy) { assertReceiver(); this.receiver.setSearchTermStrategy(searchTermStrategy); return this; }
public static ImapMailInboundChannelAdapterSpec imapInboundAdapter() { return new ImapMailInboundChannelAdapterSpec(); }
/** * A {@link SearchTermStrategy} to use. * @param searchTermStrategy the searchTermStrategy. * @return the spec. * @see ImapMailReceiver#setSearchTermStrategy(SearchTermStrategy) */ public ImapMailInboundChannelAdapterSpec searchTermStrategy(SearchTermStrategy searchTermStrategy) { assertReceiver(); this.receiver.setSearchTermStrategy(searchTermStrategy); return this; }
public static ImapMailInboundChannelAdapterSpec imapInboundAdapter(String url) { return new ImapMailInboundChannelAdapterSpec(url); }
public static ImapMailInboundChannelAdapterSpec imapInboundAdapter() { return new ImapMailInboundChannelAdapterSpec(); }
public static ImapMailInboundChannelAdapterSpec imapInboundAdapter(String url) { return new ImapMailInboundChannelAdapterSpec(url); }