com.atlassian.jira.service.services.pop
Class PopService

java.lang.Object
  extended bycom.atlassian.jira.service.AbstractService
      extended bycom.atlassian.jira.service.services.file.AbstractMessageHandlingService
          extended bycom.atlassian.jira.service.services.pop.PopService
All Implemented Interfaces:
JiraService
Direct Known Subclasses:
ImapService

public class PopService
extends AbstractMessageHandlingService

Connect to a POP mailbox specified by the 'mail-hostname', 'username' and 'password' parameters, and for each message call handleMessage().


Field Summary
protected  java.lang.Long mailserverId
           
protected static java.lang.String POP_PROTOCOL
           
 
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
 
Constructor Summary
PopService()
           
 
Method Summary
 void destroy()
          This method is called when the service is unloaded (usually when the web application or server is being shut down).
 ObjectConfiguration getObjectConfiguration()
           
protected  java.lang.String getProtocol()
           
 void init(PropertySet props)
          MUST pass 'mail-hostname', 'username' and 'password' as parameters
 void run()
          Connect to the POP email 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
getDefaultProperty, getDescription, getLongProperty, getObjectConfiguration, getProperties, getProperty, hasProperty, isInternal, isUnique
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POP_PROTOCOL

protected static final java.lang.String POP_PROTOCOL
See Also:
Constant Field Values

mailserverId

protected java.lang.Long mailserverId
Constructor Detail

PopService

public PopService()
Method Detail

init

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

Specified by:
init in interface JiraService
Overrides:
init in class AbstractMessageHandlingService
Throws:
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 email box and then handle each message.

Specified by:
run in interface JiraService
Specified by:
run in class AbstractService

getObjectConfiguration

public ObjectConfiguration getObjectConfiguration()
                                           throws ObjectConfigurationException
Throws:
ObjectConfigurationException

getProtocol

protected java.lang.String getProtocol()