|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.mail Class MessageContext
java.lang.Object javax.mail.MessageContext
public class MessageContext
- extends Object
包含 Message 内容的某个片段的上下文。
MessageAware
接口的 getMessageContext
方法返回 MessageContext
对象。MessageAware
通常由 DataSources
实现,以允许 DataContentHandler
传递有关操作数据内容对象所在上下文的信息。
since |
| |
See also | javax.mail.MessageAware, javax.activation.DataSource, javax.activation.DataContentHandler |
The context in which a piece of Message content is contained. A
MessageContext
object is returned by the
getMessageContext
method of the
MessageAware
interface. MessageAware
is
typically implemented by DataSources
to allow a
DataContentHandler
to pass on information about the
context in which a data content object is operating.
- Since:
- JavaMail 1.1
- See Also:
MessageAware
,DataSource
,DataContentHandler
Constructor Summary | |
---|---|
MessageContext(Part part)
Create a MessageContext object describing the context of the given Part. |
Method Summary | |
---|---|
Message |
getMessage()
Return the Message that contains the content. |
Part |
getPart()
Return the Part that contains the content. |
Session |
getSession()
Return the Session we're operating in. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public
MessageContext(Part part)
创建描述给定 Part 的上下文的 MessageContext 对象。
英文文档:
MessageContext
public MessageContext(Part part)
- Create a MessageContext object describing the context of the given Part.
Method Detail |
---|
public Part
getPart()
返回包含内容的 Part。
return | 包含内容的 Part;如果未知,则返回 null |
getPart
public Part getPart()
- Return the Part that contains the content.
- Returns:
- the containing Part, or null if not known
public Message
getMessage()
返回包含内容的 Message。沿父 Message 对象链从头到尾搜索包含内容的 Multipart 对象,直到找到某个 Message 对象为止;或者返回 null。
return | 包含内容的 Message;如果未知,则返回 null |
getMessage
public Message getMessage()
- Return the Message that contains the content.
Follows the parent chain up through containing Multipart
objects until it comes to a Message object, or null.
- Returns:
- the containing Message, or null if not known
public Session
getSession()
返回正操作的 Session。
return | Session;如果未知,则返回 null |
getSession
public Session getSession()
- Return the Session we're operating in.
- Returns:
- the Session, or null if not known
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!