com.atlassian.jira.service.util.handler
Interface MessageHandlerExecutionMonitor

All Superinterfaces:
MessageHandlerErrorCollector

@PublicApi
public interface MessageHandlerExecutionMonitor
extends MessageHandlerErrorCollector

This is extension to MessageHandlerErrorCollector interface for with a few reporting methods around Messages. You should not need to implement this interface (unless for test purposes).


Method Summary
 void markMessageForDeletion(String reason)
          Mark a message for deletion.
 void messageRejected(javax.mail.Message message, String reason)
          Reports the rejection of the message
 void nextMessage(javax.mail.Message message)
          Reports that given message is about to be dispatched to the message handler.
 void setNumMessages(int count)
          Report the number of messages ready for processing by the handler in the current run
 
Methods inherited from interface com.atlassian.jira.service.util.handler.MessageHandlerErrorCollector
error, error, info, info, warning, warning
 

Method Detail

setNumMessages

void setNumMessages(int count)
Report the number of messages ready for processing by the handler in the current run

Parameters:
count - number of messages ready for processing by the handler in the current run

messageRejected

void messageRejected(javax.mail.Message message,
                     String reason)
Reports the rejection of the message

Parameters:
message - the message which has been rejected (should be the one reported before with nextMessage() method.
reason - the reason of the rejection (may be displayed in the web UI, so translated messages are desirable here)

nextMessage

void nextMessage(javax.mail.Message message)
Reports that given message is about to be dispatched to the message handler.

Parameters:
message - the message which is about to be dispatched to the handler.

markMessageForDeletion

@ExperimentalApi
void markMessageForDeletion(String reason)
Mark a message for deletion. The message will be deleted even if there is no forwarding address or if the forwarding failed. This generally indicates that the message is in a state that JIRA will never be able to process.

Parameters:
reason - the reason for the rejection. This will also be used when forwarding the email.


Copyright © 2002-2014 Atlassian. All Rights Reserved.