@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_RUN
name, SERVICE_EVENT
NAME_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
|
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, setContext
getDefaultProperty, getDescription, getKey, getLongProperty, getName, getObjectConfiguration, getProperties, getProperty, getTextProperty, hasProperty, isInternal, isUnique, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDefaultProperty, getKey, getLongProperty, getProperties, getProperty, getTextProperty, hasProperty
public 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
JiraService
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.
this method may be called multiple times during the services lifetime.
init
in interface JiraService
props
- 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
JiraService
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.
init
in interface JiraService
init
in class AbstractMessageHandlingService
props
- initialisation parametersObjectConfigurationException
- in case of an error with initialisation parametersJiraService.init(PropertySet, long)
protected void runImpl(MessageHandlerContext context)
runImpl
in class AbstractMessageHandlingService
protected String getFolderName(com.atlassian.mail.server.MailServer server)
protected String addHandlerInfo(String msg)
addHandlerInfo
in class AbstractMessageHandlingService
msg
- log messagepublic ObjectConfiguration getObjectConfiguration() throws ObjectConfigurationException
ObjectConfigurable
getObjectConfiguration
in interface ObjectConfigurable
ObjectConfigurationException
protected org.apache.log4j.Logger getLogger()
getLogger
in class AbstractMessageHandlingService
Copyright © 2002-2021 Atlassian. All Rights Reserved.