public class MessageContext
extends java.lang.Object
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.MessageAware
,
DataSource
,
DataContentHandler
Constructor and Description |
---|
MessageContext(Part part)
Create a MessageContext object describing the context of the given Part.
|
Modifier and Type | Method and Description |
---|---|
Message |
getMessage()
Return the Message that contains the content.
|
private static Message |
getMessage(Part p)
Return the Message containing an arbitrary Part.
|
Part |
getPart()
Return the Part that contains the content.
|
Session |
getSession()
Return the Session we're operating in.
|
private Part part
public MessageContext(Part part)
part
- the Partpublic Part getPart()
public Message getMessage()
private static Message getMessage(Part p) throws MessagingException
MessagingException
BodyPart.getParent()
,
Multipart.getParent()
public Session getSession()