Java Doc for MailImpl.java in  » Web-Mail » james-2.3.1 » org » apache » james » core » 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.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.james.core.MailImpl

MailImpl
public class MailImpl implements Disposable,Mail(Code)

Wraps a MimeMessage adding routing information (from SMTP) and some simple API enhancements.

From James version > 2.2.0a8 "mail attributes" have been added. Backward and forward compatibility is supported: messages stored in file repositories without attributes by James version <= 2.2.0a8 will be processed by later versions as having an empty attributes hashmap; messages stored in file repositories with attributes by James version > 2.2.0a8 will be processed by previous versions, ignoring the attributes.


version:
   CVS $Revision: 494012 $ $Date: 2007-01-08 11:23:58 +0100 (Mo, 08 Jan 2007) $


Field Summary
final public static  longserialVersionUID
    

Constructor Summary
public  MailImpl()
    
public  MailImpl(String name, MailAddress sender, Collection recipients)
     A constructor that creates a MailImpl with the specified name, sender, and recipients.
public  MailImpl(Mail mail, String newName)
    
public  MailImpl(String name, MailAddress sender, Collection recipients, InputStream messageIn)
     A constructor that creates a MailImpl with the specified name, sender, recipients, and message data.
public  MailImpl(String name, MailAddress sender, Collection recipients, MimeMessage message)
     A constructor that creates a MailImpl with the specified name, sender, recipients, and MimeMessage.
public  MailImpl(MimeMessage message)
     A constructor which will attempt to obtain sender and recipients from the headers of the MimeMessage supplied.

Method Summary
public  voiddispose()
    
public  Mailduplicate()
     Duplicate the MailImpl.
public  Mailduplicate(String newName)
     Duplicate the MailImpl, replacing the mail name with the one passed in as an argument.
public  SerializablegetAttribute(String key)
    
public  IteratorgetAttributeNames()
    
public  HashMapgetAttributesRaw()
     This method is necessary, when Mail repositories needs to deal explicitly with storing Mail attributes as a Serializable Note: This method is not exposed in the Mail interface, it is for internal use by James only.
public  StringgetErrorMessage()
     Get the error message associated with this MailImpl.
public  DategetLastUpdated()
     Get the last updated time for this MailImpl.
public  MimeMessagegetMessage()
     Get the MimeMessage associated with this MailImpl.
public  longgetMessageSize()
    

Return the size of the message including its headers.

public  StringgetName()
     Get the name of this MailImpl.
public  CollectiongetRecipients()
     Get the recipients of this MailImpl.
public  StringgetRemoteAddr()
     Get the remote address associated with this MailImpl.
public  StringgetRemoteHost()
     Get the remote host associated with this MailImpl.
public  MailAddressgetSender()
     Get the sender of this MailImpl.
public  StringgetState()
     Get the state of this MailImpl.
public  booleanhasAttributes()
    
public  voidremoveAllAttributes()
    
public  SerializableremoveAttribute(String key)
    
public  SerializablesetAttribute(String key, Serializable object)
    
public  voidsetAttributesRaw(HashMap attr)
     This method is necessary, when Mail repositories needs to deal explicitly with retriving Mail attributes as a Serializable Note: This method is not exposed in the Mail interface, it is for internal use by James only.
public  voidsetErrorMessage(String msg)
     Set the error message associated with this MailImpl.
public  voidsetLastUpdated(Date lastUpdated)
     Set the date this mail was last updated.
public  voidsetMessage(MimeMessage message)
     Set the MimeMessage associated with this MailImpl.
public  voidsetName(String name)
     Set the name of this MailImpl.
public  voidsetRecipients(Collection recipients)
     Set the recipients for this MailImpl.
public  voidsetRemoteAddr(String remoteAddr)
     Set the remote address associated with this MailImpl.
public  voidsetRemoteHost(String remoteHost)
     Set the remote address associated with this MailImpl.
public  voidsetSender(MailAddress sender)
     Set the sender of this MailImpl.
public  voidsetState(String state)
     Set the state of this MailImpl.
public  voidwriteMessageTo(OutputStream out)
     Writes the message out to an OutputStream.

Field Detail
serialVersionUID
final public static long serialVersionUID(Code)
We hardcode the serialVersionUID so that from James 1.2 on, MailImpl will be deserializable (so your mail doesn't get lost)




Constructor Detail
MailImpl
public MailImpl()(Code)
A constructor that creates a new, uninitialized MailImpl



MailImpl
public MailImpl(String name, MailAddress sender, Collection recipients)(Code)
A constructor that creates a MailImpl with the specified name, sender, and recipients.
Parameters:
  name - the name of the MailImpl
Parameters:
  sender - the sender for this MailImpl
Parameters:
  recipients - the collection of recipients of this MailImpl



MailImpl
public MailImpl(Mail mail, String newName) throws MessagingException(Code)

Parameters:
  mail -
Parameters:
  newName -
throws:
  MessagingException -



MailImpl
public MailImpl(String name, MailAddress sender, Collection recipients, InputStream messageIn) throws MessagingException(Code)
A constructor that creates a MailImpl with the specified name, sender, recipients, and message data.
Parameters:
  name - the name of the MailImpl
Parameters:
  sender - the sender for this MailImpl
Parameters:
  recipients - the collection of recipients of this MailImpl
Parameters:
  messageIn - a stream containing the message source



MailImpl
public MailImpl(String name, MailAddress sender, Collection recipients, MimeMessage message) throws MessagingException(Code)
A constructor that creates a MailImpl with the specified name, sender, recipients, and MimeMessage.
Parameters:
  name - the name of the MailImpl
Parameters:
  sender - the sender for this MailImpl
Parameters:
  recipients - the collection of recipients of this MailImpl
Parameters:
  message - the MimeMessage associated with this MailImpl



MailImpl
public MailImpl(MimeMessage message) throws MessagingException(Code)
A constructor which will attempt to obtain sender and recipients from the headers of the MimeMessage supplied.
Parameters:
  message - - a MimeMessage from which to construct a Mail




Method Detail
dispose
public void dispose()(Code)

See Also:   org.apache.avalon.framework.activity.Disposable.dispose



duplicate
public Mail duplicate()(Code)
Duplicate the MailImpl. a MailImpl that is a duplicate of this one



duplicate
public Mail duplicate(String newName)(Code)
Duplicate the MailImpl, replacing the mail name with the one passed in as an argument.
Parameters:
  newName - the name for the duplicated mail a MailImpl that is a duplicate of this one with a different name



getAttribute
public Serializable getAttribute(String key)(Code)

See Also:   org.apache.mailet.Mail.getAttribute(String)
since:
   2.2.0



getAttributeNames
public Iterator getAttributeNames()(Code)

See Also:   org.apache.mailet.Mail.getAttributeNames
since:
   2.2.0



getAttributesRaw
public HashMap getAttributesRaw()(Code)
This method is necessary, when Mail repositories needs to deal explicitly with storing Mail attributes as a Serializable Note: This method is not exposed in the Mail interface, it is for internal use by James only. Serializable of the entire attributes collection
since:
   2.2.0



getErrorMessage
public String getErrorMessage()(Code)
Get the error message associated with this MailImpl. the error message associated with this MailImpl



getLastUpdated
public Date getLastUpdated()(Code)
Get the last updated time for this MailImpl. the last updated time for this MailImpl



getMessage
public MimeMessage getMessage() throws MessagingException(Code)
Get the MimeMessage associated with this MailImpl. the MimeMessage associated with this MailImpl



getMessageSize
public long getMessageSize() throws MessagingException(Code)

Return the size of the message including its headers. MimeMessage.getSize() method only returns the size of the message body.

Note: this size is not guaranteed to be accurate - see Sun's documentation of MimeMessage.getSize().

approximate size of full message including headers.
throws:
  MessagingException - if a problem occurs while computing the message size



getName
public String getName()(Code)
Get the name of this MailImpl. the name of this MailImpl



getRecipients
public Collection getRecipients()(Code)
Get the recipients of this MailImpl. the recipients of this MailImpl



getRemoteAddr
public String getRemoteAddr()(Code)
Get the remote address associated with this MailImpl. the remote address associated with this MailImpl



getRemoteHost
public String getRemoteHost()(Code)
Get the remote host associated with this MailImpl. the remote host associated with this MailImpl



getSender
public MailAddress getSender()(Code)
Get the sender of this MailImpl. the sender of this MailImpl



getState
public String getState()(Code)
Get the state of this MailImpl. the state of this MailImpl



hasAttributes
public boolean hasAttributes()(Code)

See Also:   org.apache.mailet.Mail.hasAttributes
since:
   2.2.0



removeAllAttributes
public void removeAllAttributes()(Code)

See Also:   org.apache.mailet.Mail.removeAllAttributes
since:
   2.2.0



removeAttribute
public Serializable removeAttribute(String key)(Code)

See Also:   org.apache.mailet.Mail.removeAttribute(String)
since:
   2.2.0



setAttribute
public Serializable setAttribute(String key, Serializable object)(Code)

See Also:   org.apache.mailet.Mail.setAttribute(StringSerializable)
since:
   2.2.0



setAttributesRaw
public void setAttributesRaw(HashMap attr)(Code)
This method is necessary, when Mail repositories needs to deal explicitly with retriving Mail attributes as a Serializable Note: This method is not exposed in the Mail interface, it is for internal use by James only. Serializable of the entire attributes collection
since:
   2.2.0



setErrorMessage
public void setErrorMessage(String msg)(Code)
Set the error message associated with this MailImpl.
Parameters:
  msg - the new error message associated with this MailImpl



setLastUpdated
public void setLastUpdated(Date lastUpdated)(Code)
Set the date this mail was last updated.
Parameters:
  lastUpdated - the date the mail was last updated



setMessage
public void setMessage(MimeMessage message)(Code)
Set the MimeMessage associated with this MailImpl.
Parameters:
  message - the new MimeMessage associated with this MailImpl



setName
public void setName(String name)(Code)
Set the name of this MailImpl.
Parameters:
  name - the name of this MailImpl



setRecipients
public void setRecipients(Collection recipients)(Code)
Set the recipients for this MailImpl.
Parameters:
  recipients - the recipients for this MailImpl



setRemoteAddr
public void setRemoteAddr(String remoteAddr)(Code)
Set the remote address associated with this MailImpl.
Parameters:
  remoteAddr - the new remote address associated with this MailImpl



setRemoteHost
public void setRemoteHost(String remoteHost)(Code)
Set the remote address associated with this MailImpl.
Parameters:
  remoteHost - the new remote host associated with this MailImpl



setSender
public void setSender(MailAddress sender)(Code)
Set the sender of this MailImpl.
Parameters:
  sender - the sender of this MailImpl



setState
public void setState(String state)(Code)
Set the state of this MailImpl.
Parameters:
  state - the state of this MailImpl



writeMessageTo
public void writeMessageTo(OutputStream out) throws IOException, MessagingException(Code)
Writes the message out to an OutputStream.
Parameters:
  out - the OutputStream to which to write the content
throws:
  MessagingException - if the MimeMessage is not set for this MailImpl
throws:
  IOException - if an error occurs while reading or writing from the stream



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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