-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathfeatures.txt
201 lines (147 loc) · 7.08 KB
/
features.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
#
# Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0, which is available at
# http://www.eclipse.org/legal/epl-2.0.
#
# This Source Code may also be made available under the following Secondary
# Licenses when the conditions for such availability set forth in the
# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
# version 2 with the GNU Classpath Exception, which is available at
# https://www.gnu.org/software/classpath/license.html.
#
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#
`
########################### -*- Mode: Text -*- ##########################
## features.txt --
##
## List all major product features to be tested by your test script.
Jakarta Mail Feature List
-------------------------
Overview
--------
The Jakarta Mail API is a specification that defines a Java interface to
a messaging system. It contains a set of abstract classes and methods
that provide an abstract Messaging layer. This layer is defined by the
jakarta.mail, jakarta.mail.event and jakarta.mail.search packages.
It also includes concrete classes that implement the current Internet
standards for describing structure of an electronic message - namely
RFC822 and MIME. This is contained in the package "jakarta.mail.internet".
Service providers provide implementations of the Jakarta Mail specification
in terms of proprietary or standard protocols. The current Jakarta Mail
package provides an IMAP and SMTP provider. We expect third-parties
to come up with providers for a bunch of other Messaging protocols.
The major components of Jakarta Mail are:
Message structure
-----------------
The APIs in this section describe the structure of an electronic
message.
Feature List:
1) Message
The abstract Message class models an email message. Subclasses
provide actual implementation. A Message contains a set of attributes
and a "content". Examples of attributes are "Subject", "From",
"Content-Type" etc. The content of a Message is an arbitrary collection
of bytes. The DataHandler class from the "jakarta.activation" package is
used to 'type' the content and obtain suitable Viewers, Content-Handlers
etc.
2) Multipart
Jakarta Mail allows Messages to contain multiple "content" objects.
Such a message is represented as a Message object containing a
Multipart object as its content. A Multipart object is essentially
a holder for multiple BodyPart objects.
3) BodyPart
The BodyPart class is actually quite similar to the Message class -
it also has a set of attributes and a "content". Note that certain
attributes like "Subject" and "From" make sense only for Messages,
while others like "Content-Type" are valid for both.
4) Flags
A Message can have a set of flags associated with it. These flags
describe the state of the message. A Flags object holds all the
flags that are set on a particular message.
Jakarta Mail defines a set of standard flags like DELETED, ANSWERED etc.
Certain implementations may also allow user-defined flags.
Message Storage and Retrieval
-----------------------------
The Classes and APIs in this section deal with the storage and
retrieval of messages from a message store.
Feature List:
1) Store
Store is an abstract class that models a message store and its
access protocol. Subclasses provide actual implementations.
Clients establish a session with a message store by first obtaining
an appropriate Store object. The Session class provides a registry
(or factory) for locating and instantiaing appropriate Store objects,
based on the user's desired access-protocol.
Once the client obtains the Store object, it connects to it using
the connect() method. When its finally done with the session, it
terminates using the close() method.
2) Folder
Folder is abstract class that represents a folder for mail messages.
Subclasses implement protocol specific Folders.
Folders can contain Messages, other Folders or both, thus providing a
tree-like hierarchy rooted at the Store's default folder.
A Folder object obtained from a Store need not actually exist in the
backend store. The exists() method tests whether the folder exists or
not. The create() method creates a Folder.
The messages within a Folder are obtained using one of the many
getMessage() variants.
Message Composition and Transport
---------------------------------
The classes and APIs in this section deal with sending messages.
Note that since the Message class is abstract, one has to create a
suitable subclass. For the most common case of creating and sending
"internet" messages, start off by instantiating the MimeMessage class.
Set suitable attributes like "Subject", "To" etc. Then insert the
content into the message using the setContent() or setText() methods.
Thus you have a complete MimeMessage, ready for transmission.
1) Transport
An abstract class that models a message transport. Subclasses provide
actual implementations
The static send() method on Transport sends the given message to
the recipeints listed within the message. This method is actually
a convenience method, that internally finds and instantiates the
appropriate Transport object, and uses that to do the actual sending.
Internet Message
----------------
Feature List:
1) MimeMessage
This class represents a MIME style email message. It implements the
Message abstract class. It also provides additional methods to set
and get MIME specific attributes.
2) MimeBodyPart
This class represents a MIME body part. It implements the BodyPart
abstract class. MimeBodyParts are contained in MimeMultipart objects.
3) MimeMultipart
The MimeMultipart class is an implementation of the abstract Multipart
class that uses MIME conventions for the multipart data.
A MimeMultipart is obtained from a MimePart whose primary type is
"multipart" (by invoking the part's getContent() method) or it can be
created by a client as part of crafting a new MimeMessage.
Events
------
Jakarta Mail uses events to communicate state changes to clients. The Store,
Folder and Transport classes are examples of event sources. The
ConnectionEvent, MessageCountEvent etc are examples of events. The
jakarta.mail.event package contains all the Jakarta Mail events.
Clients express interest in certain events by registering themselves as
listeners of those events.
Search
------
Jakarta Mail provides APIs to search a Folder for messages that match
specific search criteria. Search criteria are expressed using
SearchTerms. By using logical operators, one can combine these terms
to form quite complex search criterion.
The jakarta.mail.search package contains all Jakarta Mail SearchTerms.
Reference:
---------
The following references are publically available on the Internet:
* The Jakarta Mail specification in PDF format:
https://eclipse-ee4j.github.io/mail/docs/Mail-2.0.pdf
* Jakarta Mail API Documentation (javadoc format)
https://eclipse-ee4j.github.io/mail/docs/api/
* Jakarta Activation Homepage
https://github.com/eclipse-ee4j/jaf
########################################################################