|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.goldeninnovations.smp.messagespool.MemoryMessageSpool
public class MemoryMessageSpool
An in-memory blocking MessageSpool implementation. Fastest Spool Implementation but provides no data persistence or recovery options.
Default MessageSpool
Constructor Summary | |
---|---|
MemoryMessageSpool()
|
Method Summary | |
---|---|
EmailMessage |
createMessage()
Factory method called when a new message is being processed. |
EmailMessage |
deSpoolMessage()
Returns the newt EmailMessage in the spool. |
boolean |
spoolMessage(EmailMessage message)
Stores a new message in the spool. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MemoryMessageSpool()
Method Detail |
---|
public EmailMessage createMessage()
MessageSpool
MessageSpool
implementation to provide a custom EmailMessage implementation.
createMessage
in interface MessageSpool
public boolean spoolMessage(EmailMessage message)
MessageSpool
spoolMessage
in interface MessageSpool
message
- the EmailMessage
to spool.
public EmailMessage deSpoolMessage() throws InterruptedException
MessageSpool
EmailMessage
in the spool. If the spool is empty, implementations
can either return null, or block until the next available message.
deSpoolMessage
in interface MessageSpool
EmailMessage
, or null if queue is empty and non-blocking.
InterruptedException
- thrown for blocking implementations that are interrupted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |