com.atlassian.jira.service.services.mail
Class MailFetcherService
java.lang.Object
com.atlassian.jira.service.AbstractService
com.atlassian.jira.service.services.file.AbstractMessageHandlingService
com.atlassian.jira.service.services.mail.MailFetcherService
- All Implemented Interfaces:
- JiraService, com.atlassian.configurable.ObjectConfigurable
- Direct Known Subclasses:
- ImapService, PopService
- public abstract class MailFetcherService
- extends AbstractMessageHandlingService
- implements com.atlassian.configurable.ObjectConfigurable
An abstract mail fetcher for POP and IMAP protocols
Method Summary |
void |
destroy()
This method is called when the service is unloaded (usually when the web application or server
is being shut down). |
protected abstract String |
getFolderName()
|
protected abstract String |
getProtocol(boolean useSSL)
|
void |
init(com.opensymphony.module.propertyset.PropertySet props)
MUST pass 'mail-hostname', 'username' and 'password' as parameters |
void |
run()
Connect to the POP / IMAPemail box and then handle each message. |
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 |
Methods inherited from interface com.atlassian.configurable.ObjectConfigurable |
getDefaultProperty, getKey, getLongProperty, getObjectConfiguration, getProperties, getProperty, getTextProperty, hasProperty |
mailserverId
protected Long mailserverId
USE_SSL
public static final String USE_SSL
- See Also:
- Constant Field Values
FORWARD_EMAIL
public static final String FORWARD_EMAIL
- See Also:
- Constant Field Values
DEFAULT_FOLDER
protected static final String DEFAULT_FOLDER
- See Also:
- Constant Field Values
FS
public static final String FS
MailFetcherService
public MailFetcherService()
init
public void init(com.opensymphony.module.propertyset.PropertySet props)
throws com.atlassian.configurable.ObjectConfigurationException
- MUST pass 'mail-hostname', 'username' and 'password' as parameters
- Specified by:
init
in interface JiraService
- Overrides:
init
in class AbstractMessageHandlingService
- Throws:
com.atlassian.configurable.ObjectConfigurationException
destroy
public void destroy()
- Description copied from class:
AbstractService
- This method is called when the service is unloaded (usually when the web application or server
is being shut down).
You may wish to remove any connections that you have established, eg. database connections.
- Specified by:
destroy
in interface JiraService
- Overrides:
destroy
in class AbstractService
run
public void run()
- Connect to the POP / IMAPemail box and then handle each message.
- Specified by:
run
in interface JiraService
- Specified by:
run
in class AbstractService
getProtocol
protected abstract String getProtocol(boolean useSSL)
getFolderName
protected abstract String getFolderName()
Copyright © 2002-2006 Atlassian. All Rights Reserved.