@UriEndpoint(firstVersion="1.0.0", scheme="imap,imaps,pop3,pop3s,smtp,smtps", title="IMAP,IMAPS,POP3,POP3S,SMTP,SMTPS", syntax="imap:host:port", alternativeSyntax="imap:username:password@host:port", consumerClass=MailConsumer.class, label="mail") public class MailEndpoint extends org.apache.camel.impl.ScheduledPollEndpoint
Constructor and Description |
---|
MailEndpoint() |
MailEndpoint(String endpointUri) |
MailEndpoint(String uri,
MailComponent component,
MailConfiguration configuration) |
MailEndpoint(String endpointUri,
MailConfiguration configuration)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor,
JavaMailSender sender)
Creates a consumer using the given processor and sender
|
org.apache.camel.Exchange |
createExchange(javax.mail.Message message) |
org.apache.camel.Producer |
createProducer() |
org.apache.camel.Producer |
createProducer(JavaMailSender sender)
Creates a producer using the given sender
|
MailBinding |
getBinding() |
MailConfiguration |
getConfiguration() |
ContentTypeResolver |
getContentTypeResolver() |
org.apache.camel.spi.HeaderFilterStrategy |
getHeaderFilterStrategy() |
org.apache.camel.spi.IdempotentRepository<String> |
getIdempotentRepository() |
MailUidGenerator |
getMailUidGenerator() |
int |
getMaxMessagesPerPoll() |
MailBoxPostProcessAction |
getPostProcessAction() |
javax.mail.search.SearchTerm |
getSearchTerm() |
com.sun.mail.imap.SortTerm[] |
getSortTerm() |
boolean |
isIdempotentRepositoryRemoveOnCommit() |
boolean |
isSingleton() |
void |
setBinding(MailBinding binding)
Sets the binding used to convert from a Camel message to and from a Mail message
|
void |
setConfiguration(MailConfiguration configuration)
Sets the Mail configuration
|
void |
setContentTypeResolver(ContentTypeResolver contentTypeResolver)
Resolver to determine Content-Type for file attachments.
|
void |
setDelay(long delay)
Milliseconds before the next poll.
|
void |
setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
To use a custom
HeaderFilterStrategy to filter headers. |
void |
setIdempotentRepository(org.apache.camel.spi.IdempotentRepository<String> idempotentRepository)
A pluggable repository org.apache.camel.spi.IdempotentRepository which allows to cluster
consuming from the same mailbox, and let the repository coordinate whether a mail message
is valid for the consumer to process.
|
void |
setIdempotentRepositoryRemoveOnCommit(boolean idempotentRepositoryRemoveOnCommit)
When using idempotent repository, then when the mail message has been successfully processed and
is committed, should the message id be removed from the idempotent repository (default) or
be kept in the repository.
|
void |
setMailUidGenerator(MailUidGenerator mailUidGenerator)
A pluggable
MailUidGenerator that allows to use custom logic to generate UUID of the mail message. |
void |
setMaxMessagesPerPoll(int maxMessagesPerPoll)
Specifies the maximum number of messages to gather per poll.
|
void |
setPostProcessAction(MailBoxPostProcessAction postProcessAction)
Refers to an
MailBoxPostProcessAction for doing post processing tasks on the mailbox once the normal processing ended. |
void |
setSearchTerm(javax.mail.search.SearchTerm searchTerm)
Refers to a
SearchTerm which allows to filter mails based on search criteria such as subject, body, from, sent after a certain date etc. |
void |
setSortTerm(com.sun.mail.imap.SortTerm[] sortTerm)
Sorting order for messages.
|
configurePollingConsumer, configureProperties, configureScheduledPollConsumerProperties, doStart, doStop, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDelay, getInitialDelay, getPollStrategy, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, initConsumerProperties, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setGreedy, setInitialDelay, setPollStrategy, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay
configureConsumer, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBridgeErrorHandler, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public MailEndpoint()
public MailEndpoint(String uri, MailComponent component, MailConfiguration configuration)
@Deprecated public MailEndpoint(String endpointUri, MailConfiguration configuration)
public MailEndpoint(String endpointUri)
public org.apache.camel.Producer createProducer(JavaMailSender sender) throws Exception
Exception
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
Exception
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor, JavaMailSender sender) throws Exception
Exception
public boolean isSingleton()
public org.apache.camel.Exchange createExchange(javax.mail.Message message)
public MailBinding getBinding()
public void setBinding(MailBinding binding)
public MailConfiguration getConfiguration()
public void setConfiguration(MailConfiguration configuration)
public org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
public void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
HeaderFilterStrategy
to filter headers.public ContentTypeResolver getContentTypeResolver()
public void setContentTypeResolver(ContentTypeResolver contentTypeResolver)
public int getMaxMessagesPerPoll()
public void setMaxMessagesPerPoll(int maxMessagesPerPoll)
public javax.mail.search.SearchTerm getSearchTerm()
public void setSearchTerm(javax.mail.search.SearchTerm searchTerm)
SearchTerm
which allows to filter mails based on search criteria such as subject, body, from, sent after a certain date etc.public com.sun.mail.imap.SortTerm[] getSortTerm()
public void setSortTerm(com.sun.mail.imap.SortTerm[] sortTerm)
public MailBoxPostProcessAction getPostProcessAction()
public void setPostProcessAction(MailBoxPostProcessAction postProcessAction)
MailBoxPostProcessAction
for doing post processing tasks on the mailbox once the normal processing ended.public org.apache.camel.spi.IdempotentRepository<String> getIdempotentRepository()
public void setIdempotentRepository(org.apache.camel.spi.IdempotentRepository<String> idempotentRepository)
public boolean isIdempotentRepositoryRemoveOnCommit()
public void setIdempotentRepositoryRemoveOnCommit(boolean idempotentRepositoryRemoveOnCommit)
public MailUidGenerator getMailUidGenerator()
public void setMailUidGenerator(MailUidGenerator mailUidGenerator)
MailUidGenerator
that allows to use custom logic to generate UUID of the mail message.public void setDelay(long delay)
setDelay
in class org.apache.camel.impl.ScheduledPollEndpoint
Apache Camel