com.atlassian.jira.service.services.file
Class AbstractMessageHandlingService
java.lang.Object
com.atlassian.jira.service.AbstractService
com.atlassian.jira.service.services.file.AbstractMessageHandlingService
- All Implemented Interfaces:
- ObjectConfigurable, JiraService, Runnable
- Direct Known Subclasses:
- FileService, MailFetcherService
@Internal
public abstract class AbstractMessageHandlingService
- extends AbstractService
An abstract service to be subclassed by any service which wants to use MessageHandlers.
This clas is goint to be hopefuly moved to JIRA Mail Plugin.
Methods inherited from class com.atlassian.jira.service.AbstractService |
getDefaultProperty, getDescription, getKey, getLongProperty, getName, getObjectConfiguration, getProperties, getProperty, getTextProperty, hasProperty, isInternal, isUnique, setName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KEY_HANDLER
public static final String KEY_HANDLER
- See Also:
- Constant Field Values
KEY_HANDLER_PARAMS
public static final String KEY_HANDLER_PARAMS
- See Also:
- Constant Field Values
MAX_READ_MESSAGES_DRY_RUN
public static final int MAX_READ_MESSAGES_DRY_RUN
- See Also:
- Constant Field Values
AbstractMessageHandlingService
public AbstractMessageHandlingService()
setContext
public void setContext(MessageHandlerContext context)
destroy
public void destroy()
- This method is not really called when JIRA Service manager discards the instance of this service.
That's why we have to play with weak references in the disablement listener
Anyway, for the sake of completeness, we are cleaning the stuff also here.
- Specified by:
destroy
in interface JiraService
- Overrides:
destroy
in class AbstractService
init
public void init(com.opensymphony.module.propertyset.PropertySet props)
throws ObjectConfigurationException
- Description copied from interface:
JiraService
- 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.
- Specified by:
init
in interface JiraService
- Overrides:
init
in class AbstractService
- Parameters:
props
- initialisation parameters
- Throws:
ObjectConfigurationException
- in case of an error with initialisation parameters
runImpl
protected abstract void runImpl(MessageHandlerContext context)
run
public void run()
- Description copied from class:
AbstractService
- This method must be implemented in a subclass, and performs the functionality
that the service performs. This method is called after the duration specified through
the administration web interface.
- Specified by:
run
in interface JiraService
- Specified by:
run
in interface Runnable
- Specified by:
run
in class AbstractService
- See Also:
JiraService.init(com.opensymphony.module.propertyset.PropertySet)
getHandler
public MessageHandler getHandler()
addHandlerInfo
protected abstract String addHandlerInfo(String msg)
getLogger
protected abstract org.apache.log4j.Logger getLogger()
Copyright © 2002-2012 Atlassian. All Rights Reserved.