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

All Known Implementing Classes:
AbstractCommentHandler, AbstractMessageHandler, CreateIssueHandler, CreateOrCommentHandler, CVSLogHandler, FullCommentHandler, NonQuotedCommentHandler, RegexCommentHandler

public interface MessageHandler

An interface representing a message handler. A handler handles messages. Implementers should extend AbstractMessageHandler to inherit standard functionality such mail loop detection etc.

All implementations of MessageHandler need a no-arg constructor, as they are instantiated via reflection.


Method Summary
 boolean handleMessage(javax.mail.Message message)
          Perform the specific work of this handler for the given message.
 void init(Map params)
          Will be called before any messages are to be handled.
 void setErrorHandler(MessageErrorHandler errorHandler)
           
 

Method Detail

init

void init(Map params)
Will be called before any messages are to be handled.

Parameters:
params - configuration.

handleMessage

boolean handleMessage(javax.mail.Message message)
                      throws javax.mail.MessagingException
Perform the specific work of this handler for the given message.

Parameters:
message - the message to check for handling.
Returns:
true if the message is to be deleted from the source.
Throws:
javax.mail.MessagingException - if anything went wrong.

setErrorHandler

void setErrorHandler(MessageErrorHandler errorHandler)


Copyright © 2002-2008 Atlassian. All Rights Reserved.