@Internal public abstract class AbstractMessageHandlingService extends AbstractService
Modifier and Type | Class and Description |
---|---|
static class |
AbstractMessageHandlingService.HandlerDisablementListener
This class only purpose is to respond quickly to possible disablement of a plugin module which defines
the handler used by descendants of AbstractMessageHandlingService class.
|
Modifier and Type | Field and Description |
---|---|
static String |
KEY_HANDLER |
static String |
KEY_HANDLER_PARAMS |
static int |
MAX_READ_MESSAGES_DRY_RUN |
log, name, SERVICE_EVENT
NAME_COMPARATOR
Constructor and Description |
---|
AbstractMessageHandlingService() |
Modifier and Type | Method and Description |
---|---|
protected abstract String |
addHandlerInfo(String msg) |
protected String |
asString(javax.mail.Message message) |
void |
destroy()
This method is not really called when JIRA Service manager discards the instance of this service.
|
MessageHandler |
getHandler() |
protected abstract org.apache.log4j.Logger |
getLogger() |
void |
init(com.opensymphony.module.propertyset.PropertySet props)
Initialise the service.
|
void |
run()
This method must be implemented in a subclass, and performs the functionality
that the service performs.
|
protected abstract void |
runImpl(MessageHandlerContext context) |
void |
setContext(MessageHandlerContext context) |
getDefaultProperty, getDescription, getKey, getLongProperty, getName, getObjectConfiguration, getProperties, getProperty, getTextProperty, hasProperty, isInternal, isUnique, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
init
getObjectConfiguration
public static final String KEY_HANDLER
public static final String KEY_HANDLER_PARAMS
public static final int MAX_READ_MESSAGES_DRY_RUN
public void setContext(MessageHandlerContext context)
public void destroy()
destroy
in interface JiraService
destroy
in class AbstractService
public 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 AbstractService
props
- initialisation parametersObjectConfigurationException
- in case of an error with initialisation parametersJiraService.init(PropertySet, long)
protected abstract void runImpl(MessageHandlerContext context)
public void run()
AbstractService
run
in interface JiraService
run
in interface Runnable
run
in class AbstractService
JiraService.init(com.opensymphony.module.propertyset.PropertySet)
public MessageHandler getHandler()
protected abstract org.apache.log4j.Logger getLogger()
protected final String asString(javax.mail.Message message)
Copyright © 2002-2024 Atlassian. All Rights Reserved.