@Internal public class

MailFetcherService

extends AbstractMessageHandlingService
implements ObjectConfigurable
java.lang.Object
   ↳ com.atlassian.jira.service.AbstractService
     ↳ com.atlassian.jira.service.services.file.AbstractMessageHandlingService
       ↳ com.atlassian.jira.service.services.mail.MailFetcherService

@Internal

This class is an internal implementation detail and will change without notice.

Clients that depend on @Internal classes and interfaces can not expect to be compatible with any version other than the version they were compiled against (even minor version and milestone releases may break binary compatibility with respect to @Internal elements).

Class Overview

Mail fetcher for both POP and IMAP protocols. This class is going to be hopefuly moved to JIRA Mail Plugin.

Summary

Constants
String DEFAULT_FOLDER
String FOLDER_NAME_KEY
String FORWARD_EMAIL
String KEY_MAIL_SERVER
[Expand]
Inherited Constants
From class com.atlassian.jira.service.services.file.AbstractMessageHandlingService
From class com.atlassian.jira.service.AbstractService
Fields
protected Long mailserverId
[Expand]
Inherited Fields
From class com.atlassian.jira.service.AbstractService
From interface com.atlassian.jira.service.JiraService
Public Constructors
MailFetcherService()
Public Methods
ObjectConfiguration getObjectConfiguration()
Retrieves an object configuration object with properties that can be set
void init(PropertySet props)
Initialise the service.
Protected Methods
String addHandlerInfo(String msg)
JRA-13590 Small decorator to add the service handler name and the mail service ID to log messages to make it easier if you have multiple services configured to determine which one is throwing exceptions.
String getFolderName(MailServer server)
Logger getLogger()
int getPort(MailServer server)
void runImpl(MessageHandlerContext context)
Connect to the POP / IMAPemail box and then handle each message.
[Expand]
Inherited Methods
From class com.atlassian.jira.service.services.file.AbstractMessageHandlingService
From class com.atlassian.jira.service.AbstractService
From class java.lang.Object
From interface com.atlassian.configurable.ObjectConfigurable
From interface com.atlassian.jira.service.JiraService
From interface java.lang.Runnable

Constants

protected static final String DEFAULT_FOLDER

Constant Value: "INBOX"

public static final String FOLDER_NAME_KEY

Constant Value: "foldername"

public static final String FORWARD_EMAIL

Constant Value: "forwardEmail"

public static final String KEY_MAIL_SERVER

Constant Value: "popserver"

Fields

protected Long mailserverId

Public Constructors

public MailFetcherService ()

Public Methods

public ObjectConfiguration getObjectConfiguration ()

Retrieves an object configuration object with properties that can be set

Returns
  • ObjectConfiguration object

public void init (PropertySet props)

Initialise the service. This method is guaranteed to be called before the first call to run().

As the parameters are gained from the user's interaction with the website, it is not guaranteed to be called with the correct, or indeed with any parameters.

init() may be called multiple times during the services lifetime.

Parameters
props initialisation parameters

Protected Methods

protected String addHandlerInfo (String msg)

JRA-13590 Small decorator to add the service handler name and the mail service ID to log messages to make it easier if you have multiple services configured to determine which one is throwing exceptions.

Parameters
msg log message
Returns
  • log message decorated with handler name and mail server ID

protected String getFolderName (MailServer server)

protected Logger getLogger ()

protected int getPort (MailServer server)

protected void runImpl (MessageHandlerContext context)

Connect to the POP / IMAPemail box and then handle each message.