|
Spring Integration | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.integration.mail.AbstractMailReceiver
public abstract class AbstractMailReceiver
Base class for MailReceiver implementations.
| Field Summary | |
|---|---|
protected boolean |
initialized
|
protected org.apache.commons.logging.Log |
logger
|
| Constructor Summary | |
|---|---|
AbstractMailReceiver()
|
|
AbstractMailReceiver(String url)
|
|
AbstractMailReceiver(javax.mail.URLName urlName)
|
|
| Method Summary | |
|---|---|
protected void |
deleteMessages(javax.mail.Message[] messages)
Deletes the given messages from this receiver's folder. |
void |
destroy()
|
protected void |
fetchMessages(javax.mail.Message[] messages)
Fetches the specified messages from this receiver's folder. |
protected javax.mail.Folder |
getFolder()
|
protected void |
openFolder()
|
javax.mail.Message[] |
receive()
|
protected abstract javax.mail.Message[] |
searchForNewMessages()
Subclasses must implement this method to return new mail messages. |
void |
setJavaMailAuthenticator(javax.mail.Authenticator javaMailAuthenticator)
Optional, sets the Authenticator to be used to obtain a session. |
void |
setJavaMailProperties(Properties javaMailProperties)
A new Session will be created with these properties (and the JavaMailAuthenticator if provided). |
void |
setMaxFetchSize(int maxFetchSize)
Specify the maximum number of Messages to fetch per call to receive(). |
void |
setProtocol(String protocol)
|
void |
setSession(javax.mail.Session session)
Set the Session. |
void |
setShouldDeleteMessages(boolean shouldDeleteMessages)
Specify whether mail messages should be deleted after retrieval. |
protected boolean |
shouldDeleteMessages()
Indicates whether the mail messages should be deleted after being received. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.commons.logging.Log logger
protected volatile boolean initialized
| Constructor Detail |
|---|
public AbstractMailReceiver()
public AbstractMailReceiver(javax.mail.URLName urlName)
public AbstractMailReceiver(String url)
| Method Detail |
|---|
public void setProtocol(String protocol)
public void setSession(javax.mail.Session session)
Session. Otherwise, the Session will be created by invocation of
Session.getInstance(Properties) or Session.getInstance(Properties, Authenticator).
setJavaMailProperties(Properties),
setJavaMailAuthenticator(Authenticator)public void setJavaMailProperties(Properties javaMailProperties)
Session will be created with these properties (and the JavaMailAuthenticator if provided).
Use either this method or setSession(javax.mail.Session), but not both.
setJavaMailAuthenticator(Authenticator),
setSession(Session)public void setJavaMailAuthenticator(javax.mail.Authenticator javaMailAuthenticator)
setSession(javax.mail.Session) has been used to configure the Session directly.
setSession(Session)public void setMaxFetchSize(int maxFetchSize)
receive().
public void setShouldDeleteMessages(boolean shouldDeleteMessages)
protected boolean shouldDeleteMessages()
protected javax.mail.Folder getFolder()
protected abstract javax.mail.Message[] searchForNewMessages()
throws javax.mail.MessagingException
javax.mail.MessagingException
protected void openFolder()
throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic javax.mail.Message[] receive()
receive in interface MailReceiver
protected void fetchMessages(javax.mail.Message[] messages)
throws javax.mail.MessagingException
fetches
every FetchProfile.Item.
messages - the messages to fetch
javax.mail.MessagingException - in case of JavaMail errors
protected void deleteMessages(javax.mail.Message[] messages)
throws javax.mail.MessagingException
messages - the messages to delete
javax.mail.MessagingException - in case of JavaMail errors
public void destroy()
throws Exception
destroy in interface DisposableBeanExceptionpublic String toString()
toString in class Object
|
Spring Integration | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||