Interface QueueMessage
-
public interface QueueMessage
-
-
Field Summary
Fields Modifier and Type Field Description static StringMESSAGE_ADDED_IN_QUEUEstatic StringMESSAGE_DELETED_FROM_QUEUEstatic StringMESSAGE_SENT_FROM_QUEUE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidenable(boolean enabled)Enable/Disable sending mail messagebooleanput(MessageInfo message)Puts the message into the queuevoidremoveAll()Removes all queue elementsvoidsend()Peek the message from queue and sendbooleansendMessage(MessageInfo message)Sends mail instantly without passing by queue (use directly the mail service).
-
-
-
Field Detail
-
MESSAGE_ADDED_IN_QUEUE
static final String MESSAGE_ADDED_IN_QUEUE
- See Also:
- Constant Field Values
-
MESSAGE_DELETED_FROM_QUEUE
static final String MESSAGE_DELETED_FROM_QUEUE
- See Also:
- Constant Field Values
-
MESSAGE_SENT_FROM_QUEUE
static final String MESSAGE_SENT_FROM_QUEUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
put
boolean put(MessageInfo message) throws Exception
Puts the message into the queue- Parameters:
message-- Returns:
- Throws:
Exception
-
sendMessage
boolean sendMessage(MessageInfo message) throws Exception
Sends mail instantly without passing by queue (use directly the mail service). If sending mail is suspended (by Mail Counter MBean), the message will not be sent, thus it will be suspended.- Parameters:
message- the message to be sent- Returns:
- true if the message is sent or mail service is off
- Throws:
Exception
-
enable
void enable(boolean enabled)
Enable/Disable sending mail message- Parameters:
enabled- true to enable and false to disable
-
-