com.atlassian.jira.service.services.mail
Class MailFetcherService

java.lang.Object
  extended by com.atlassian.jira.service.AbstractService
      extended by com.atlassian.jira.service.services.file.AbstractMessageHandlingService
          extended by com.atlassian.jira.service.services.mail.MailFetcherService
All Implemented Interfaces:
ObjectConfigurable, JiraService, java.lang.Runnable
Direct Known Subclasses:
ImapService, PopService

public abstract class MailFetcherService
extends AbstractMessageHandlingService
implements ObjectConfigurable

An abstract mail fetcher for POP and IMAP protocols


Field Summary
protected static java.lang.String DEFAULT_FOLDER
           
static java.lang.String FORWARD_EMAIL
           
protected  java.lang.Long mailserverId
           
static java.lang.String USE_SSL
           
 
Fields inherited from class com.atlassian.jira.service.services.file.AbstractMessageHandlingService
handler, KEY_HANDLER, KEY_HANDLER_PARAMS
 
Fields inherited from class com.atlassian.jira.service.AbstractService
name
 
Fields inherited from interface com.atlassian.jira.service.JiraService
NAME_COMPARATOR
 
Constructor Summary
MailFetcherService()
           
 
Method Summary
protected abstract  java.lang.String getFolderName()
           
protected abstract  java.lang.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.services.file.AbstractMessageHandlingService
getHandler
 
Methods inherited from class com.atlassian.jira.service.AbstractService
destroy, 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
 

Field Detail

mailserverId

protected java.lang.Long mailserverId

USE_SSL

public static final java.lang.String USE_SSL
See Also:
Constant Field Values

FORWARD_EMAIL

public static final java.lang.String FORWARD_EMAIL
See Also:
Constant Field Values

DEFAULT_FOLDER

protected static final java.lang.String DEFAULT_FOLDER
See Also:
Constant Field Values
Constructor Detail

MailFetcherService

public MailFetcherService()
Method Detail

init

public void init(com.opensymphony.module.propertyset.PropertySet props)
          throws ObjectConfigurationException
MUST pass 'mail-hostname', 'username' and 'password' as parameters

Specified by:
init in interface JiraService
Overrides:
init in class AbstractMessageHandlingService
Parameters:
props - initialisation parameters
Throws:
ObjectConfigurationException - in case of an error with initialisation parameters

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 interface java.lang.Runnable
Specified by:
run in class AbstractService
See Also:
JiraService.init(com.opensymphony.module.propertyset.PropertySet)

getProtocol

protected abstract java.lang.String getProtocol(boolean useSSL)

getFolderName

protected abstract java.lang.String getFolderName()


Copyright © 2002-2010 Atlassian. All Rights Reserved.