@Internal public class MailFetcherService extends AbstractMessageHandlingService implements ObjectConfigurable
AbstractMessageHandlingService.HandlerDisablementListener| Modifier and Type | Field and Description |
|---|---|
protected Long |
configurationIdentifier |
protected static String |
DEFAULT_FOLDER |
static String |
FOLDER_NAME_KEY |
static String |
FORWARD_EMAIL |
static String |
KEY_MAIL_SERVER |
protected Long |
mailserverId |
KEY_HANDLER, KEY_HANDLER_PARAMS, MAX_READ_MESSAGES_DRY_RUNname, SERVICE_EVENTNAME_COMPARATOR| Constructor and Description |
|---|
MailFetcherService() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected String |
getFolderName(com.atlassian.mail.server.MailServer server) |
protected org.apache.log4j.Logger |
getLogger() |
ObjectConfiguration |
getObjectConfiguration()
Retrieves an object configuration object with properties that can be set
|
protected int |
getPort(com.atlassian.mail.server.MailServer server) |
void |
init(com.opensymphony.module.propertyset.PropertySet props)
Initialise the service.
|
void |
init(com.opensymphony.module.propertyset.PropertySet props,
long configurationIdentifier)
Initialise the service passing configuration identifier which is unique per configuration of the service.
|
protected void |
runImpl(MessageHandlerContext context)
Connect to the POP / IMAPemail box and then handle each message.
|
asString, destroy, getHandler, run, setContextgetDefaultProperty, getDescription, getKey, getLongProperty, getName, getObjectConfiguration, getProperties, getProperty, getTextProperty, hasProperty, isInternal, isUnique, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDefaultProperty, getKey, getLongProperty, getProperties, getProperty, getTextProperty, hasPropertypublic static final String KEY_MAIL_SERVER
protected Long mailserverId
protected Long configurationIdentifier
public static final String FORWARD_EMAIL
protected static final String DEFAULT_FOLDER
public static final String FOLDER_NAME_KEY
public void init(com.opensymphony.module.propertyset.PropertySet props,
long configurationIdentifier)
throws ObjectConfigurationException
JiraServiceAs 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.
this method may be called multiple times during the services lifetime.
init in interface JiraServiceprops - initialisation parametersconfigurationIdentifier - identifier of the configuration of the serviceObjectConfigurationException - in case of an error with initialisation parameterspublic void init(com.opensymphony.module.propertyset.PropertySet props)
throws ObjectConfigurationException
JiraServiceAs 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.
init in interface JiraServiceinit in class AbstractMessageHandlingServiceprops - initialisation parametersObjectConfigurationException - in case of an error with initialisation parametersJiraService.init(PropertySet, long)protected int getPort(com.atlassian.mail.server.MailServer server)
protected void runImpl(MessageHandlerContext context)
runImpl in class AbstractMessageHandlingServiceprotected String getFolderName(com.atlassian.mail.server.MailServer server)
protected String addHandlerInfo(String msg)
addHandlerInfo in class AbstractMessageHandlingServicemsg - log messagepublic ObjectConfiguration getObjectConfiguration() throws ObjectConfigurationException
ObjectConfigurablegetObjectConfiguration in interface ObjectConfigurableObjectConfigurationExceptionprotected org.apache.log4j.Logger getLogger()
getLogger in class AbstractMessageHandlingServiceCopyright © 2002-2019 Atlassian. All Rights Reserved.