Java Doc for FetchMail.java in  » Web-Mail » james-2.3.1 » org » apache » james » fetchmail » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Mail » james 2.3.1 » org.apache.james.fetchmail 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.james.fetchmail.FetchMail

FetchMail
public class FetchMail extends AbstractLogEnabled implements Configurable,Target,Serviceable(Code)

Class FetchMail is an Avalon task that is periodically triggered to fetch mail from a JavaMail Message Store.

The lifecycle of an instance of FetchMail is managed by Avalon. The configure(Configuration) method is invoked to parse and validate Configuration properties. The targetTriggered(String) method is invoked to execute the task.

When triggered, a sorted list of Message Store Accounts to be processed is built. Each Message Store Account is processed by delegating to StoreProcessor.

There are two kinds of Message Store Accounts, static and dynamic. Static accounts are expliciltly declared in the Configuration. Dynamic accounts are built each time the task is executed, one per each user defined to James, using the James user name with a configurable prefix and suffix to define the host user identity and recipient identity for each Account. Dynamic accounts allow FetchMail to fetch mail for all James users without modifying the Configuration parameters or restarting the Avalon server.

To fully understand the operations supported by this task, read the Class documention for each Class in the delegation chain starting with this class' delegate, StoreProcessor.

Creation Date: 24-May-03




Constructor Summary
public  FetchMail()
     Constructor for POP3mail.

Method Summary
protected  MapcomputeDynamicAccounts()
     Computes the dynamicAccounts.
protected  MapcomputeDynamicAccounts(Map oldAccounts, ParsedDynamicAccountParameters parameters)
     Compute the dynamicAccounts for the passed parameters.
protected  ListcomputeParsedDynamicAccountParameters()
     Computes the ParsedDynamicAccountParameters.
protected  SessioncomputeSession()
     Answers a new Session.
protected  ListcomputeStaticAccounts()
     Computes the staticAccounts.
public  voidconfigure(Configuration configuration)
     Method configure parses and validates the Configuration data and creates a new ParsedConfiguration, an Account for each configured static account and a ParsedDynamicAccountParameters for each dynamic account.
protected  ParsedConfigurationgetConfiguration()
     Returns the configuration.
protected  MapgetDynamicAccounts()
     Returns the dynamicAccounts.
protected  UsersRepositorygetLocalUsers()
     Returns the localUsers.
protected  ListgetParsedDynamicAccountParameters()
     Returns the ParsedDynamicAccountParameters.
protected  MailServergetServer()
     Returns the server.
protected  SessiongetSession()
     Returns the session, lazily initialized if required.
protected  ListgetStaticAccounts()
     Returns the accounts.
protected  booleanisFetching()
     Returns the fetching.
protected  voidresetDynamicAccounts()
     Resets the dynamicAccounts.
public  voidservice(ServiceManager manager)
    
protected  voidsetConfiguration(ParsedConfiguration configuration)
     Sets the configuration.
protected  voidsetDynamicAccounts(Map dynamicAccounts)
     Sets the dynamicAccounts.
protected  voidsetFetching(boolean fetching)
     Sets the fetching.
protected  voidsetLocalUsers(UsersRepository localUsers)
     Sets the localUsers.
protected  voidsetParsedDynamicAccountParameters(List parsedDynamicAccountParameters)
     Sets the ParsedDynamicAccountParameters.
protected  voidsetServer(MailServer server)
     Sets the server.
protected  voidsetSession(Session session)
     Sets the session.
protected  voidsetSessionParameters(Configuration configuration)
     Propogate any Session parameters in the configuration to the Session.
protected  voidsetStaticAccounts(List accounts)
     Sets the accounts.
public  voidtargetTriggered(String arg0)
     Method target triggered fetches mail for each configured account.
protected  voidupdateDynamicAccounts()
     Updates the dynamicAccounts.
protected  voidupdateParsedDynamicAccountParameters()
     Updates the ParsedDynamicAccountParameters.
protected  voidupdateSession()
     Updates the current Session.
protected  voidupdateStaticAccounts()
     Updates the staticAccounts.


Constructor Detail
FetchMail
public FetchMail()(Code)
Constructor for POP3mail.




Method Detail
computeDynamicAccounts
protected Map computeDynamicAccounts() throws ConfigurationException(Code)
Computes the dynamicAccounts.



computeDynamicAccounts
protected Map computeDynamicAccounts(Map oldAccounts, ParsedDynamicAccountParameters parameters) throws ConfigurationException(Code)
Compute the dynamicAccounts for the passed parameters. Accounts for existing users are copied and accounts for new users are created.
Parameters:
  oldAccounts -
Parameters:
  parameters - Map - The current Accounts
throws:
  ConfigurationException -



computeParsedDynamicAccountParameters
protected List computeParsedDynamicAccountParameters()(Code)
Computes the ParsedDynamicAccountParameters.



computeSession
protected Session computeSession()(Code)
Answers a new Session. Session



computeStaticAccounts
protected List computeStaticAccounts()(Code)
Computes the staticAccounts.



configure
public void configure(Configuration configuration) throws ConfigurationException(Code)
Method configure parses and validates the Configuration data and creates a new ParsedConfiguration, an Account for each configured static account and a ParsedDynamicAccountParameters for each dynamic account.
See Also:   org.apache.avalon.framework.configuration.Configurable.configure(Configuration)



getConfiguration
protected ParsedConfiguration getConfiguration()(Code)
Returns the configuration. ParsedConfiguration



getDynamicAccounts
protected Map getDynamicAccounts() throws ConfigurationException(Code)
Returns the dynamicAccounts. Initializes if required. Map



getLocalUsers
protected UsersRepository getLocalUsers()(Code)
Returns the localUsers. UsersRepository



getParsedDynamicAccountParameters
protected List getParsedDynamicAccountParameters()(Code)
Returns the ParsedDynamicAccountParameters. List



getServer
protected MailServer getServer()(Code)
Returns the server. MailServer



getSession
protected Session getSession()(Code)
Returns the session, lazily initialized if required. Session



getStaticAccounts
protected List getStaticAccounts()(Code)
Returns the accounts. Initializes if required. List



isFetching
protected boolean isFetching()(Code)
Returns the fetching. boolean



resetDynamicAccounts
protected void resetDynamicAccounts()(Code)
Resets the dynamicAccounts.



service
public void service(ServiceManager manager) throws ServiceException(Code)

See Also:   org.apache.avalon.framework.service.Serviceable.service(ServiceManager)



setConfiguration
protected void setConfiguration(ParsedConfiguration configuration)(Code)
Sets the configuration.
Parameters:
  configuration - The configuration to set



setDynamicAccounts
protected void setDynamicAccounts(Map dynamicAccounts)(Code)
Sets the dynamicAccounts.
Parameters:
  dynamicAccounts - The dynamicAccounts to set



setFetching
protected void setFetching(boolean fetching)(Code)
Sets the fetching.
Parameters:
  fetching - The fetching to set



setLocalUsers
protected void setLocalUsers(UsersRepository localUsers)(Code)
Sets the localUsers.
Parameters:
  localUsers - The localUsers to set



setParsedDynamicAccountParameters
protected void setParsedDynamicAccountParameters(List parsedDynamicAccountParameters)(Code)
Sets the ParsedDynamicAccountParameters.
Parameters:
  ParsedDynamicAccountParameters - The ParsedDynamicAccountParametersto set



setServer
protected void setServer(MailServer server)(Code)
Sets the server.
Parameters:
  server - The server to set



setSession
protected void setSession(Session session)(Code)
Sets the session.
Parameters:
  session - The session to set



setSessionParameters
protected void setSessionParameters(Configuration configuration) throws ConfigurationException(Code)
Propogate any Session parameters in the configuration to the Session.
Parameters:
  configuration - The configuration containing the parameters
throws:
  ConfigurationException -



setStaticAccounts
protected void setStaticAccounts(List accounts)(Code)
Sets the accounts.
Parameters:
  accounts - The accounts to set



targetTriggered
public void targetTriggered(String arg0)(Code)
Method target triggered fetches mail for each configured account.
See Also:   org.apache.avalon.cornerstone.services.scheduler.Target.targetTriggered(String)



updateDynamicAccounts
protected void updateDynamicAccounts() throws ConfigurationException(Code)
Updates the dynamicAccounts.



updateParsedDynamicAccountParameters
protected void updateParsedDynamicAccountParameters()(Code)
Updates the ParsedDynamicAccountParameters.



updateSession
protected void updateSession()(Code)
Updates the current Session.



updateStaticAccounts
protected void updateStaticAccounts()(Code)
Updates the staticAccounts.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.