|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.calfater.mailcarbon.impl.manager.message.MessageManager
public class MessageManager
The Class MessageManager.
| Constructor Summary | |
|---|---|
MessageManager(int maxAttempts)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
canProcess(javax.mail.Message message)
Ask the MessageManager to lock the resource if the message can be processed. |
void |
clear()
Clear the list of already copied messages |
void |
done(javax.mail.Message message)
Tells the MessageManager that the message is successfully copied and remove thread lock. |
void |
failed(javax.mail.Message message)
Tells the MessageManager that an error occurred while copying the message and free the message's thread lock. |
boolean |
failedTooManyTimes(javax.mail.Message message)
Ask the MessageManager if a message failled too many times to copy. |
int |
getFailledCount(javax.mail.Message message)
Get the number of failed attempts. |
int |
getMaxAttempts()
Gets the max attempts. |
java.util.List<java.lang.String> |
getMessages()
Gets the messages. |
void |
setMessages(java.util.List<java.lang.String> messageList)
Sets the messages. |
protected java.lang.String |
uniqueId(javax.mail.Message message)
Generate a unique message id. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MessageManager(int maxAttempts)
maxAttempts - number of attempts before to consider a message as invalid.| Method Detail |
|---|
public boolean canProcess(javax.mail.Message message)
IMessageManager
canProcess in interface IMessageManagermessage - the message
public void done(javax.mail.Message message)
IMessageManager
done in interface IMessageManagermessage - A copied message.public void failed(javax.mail.Message message)
IMessageManager
failed in interface IMessageManagermessage - the messagepublic boolean failedTooManyTimes(javax.mail.Message message)
IMessageManager
failedTooManyTimes in interface IMessageManagermessage - the message
public final java.util.List<java.lang.String> getMessages()
IMessageManager
getMessages in interface IMessageManagerpublic final void setMessages(java.util.List<java.lang.String> messageList)
IMessageManager
setMessages in interface IMessageManagermessageList - the list of successfully copied messagespublic int getMaxAttempts()
IMessageManager
getMaxAttempts in interface IMessageManagerpublic void clear()
IMessageManager
clear in interface IMessageManagerpublic int getFailledCount(javax.mail.Message message)
message - the message
protected java.lang.String uniqueId(javax.mail.Message message)
message -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||