oracle.panama.messaging.common
Class Message
java.lang.Object
|
+--oracle.panama.messaging.common.MessagePart
|
+--oracle.panama.messaging.common.Message
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable
- public class Message
- extends MessagePart
The message can be extended. It implements the
Externalizable interface so that it is fast to serialize
it. It can be stored in the database persistently
as a Java object. No information won't be lost even
it is an extended one.
This class describes the structure of a message content for delivering.
The Message class defines the interface for applications to represent
message complex content, which is MIME type based and potentially
multipart.
The main content of a message is actually described in MessagePart, the
Message class encapsulates a few message-wide properties.
The Message class can be extended to represent customized message
format.
Instances of the Messages object potentially can be persisted after
externalization depending on how the system routes the message.
- See Also:
- Serialized Form
Type | Method |
java.lang.String |
getSubject()
Get the subject of the message. |
void |
readExternal(java.io.ObjectInput oi)
Read a message instance from a stream. |
void |
setSubject(java.lang.String subject)
Set the subject of the message. |
void |
writeExternal(java.io.ObjectOutput oo)
Write a message instance to a stream. |
Methods inherited from class oracle.panama.messaging.common.MessagePart |
addHeader, getAllHeaders, getContent,
getContentType, getDisposition, getFileName,
getHeader, getHeader, getHeaderParameter, isMimeType, setContent,
setContentType, setDisposition, setFileName,
setHeader |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Message
public Message()
getSubject
public java.lang.String getSubject()
- Get the subject of the message.
- Returns:
- the message subject represented as a String
setSubject
public void setSubject(java.lang.String subject)
- Set the subject of the message.
- Parameters:
subject
- subject of the message.
readExternal
public void readExternal(java.io.ObjectInput oi)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Read a message instance from a stream.
- Overrides:
readExternal
in class MessagePart
- Parameters:
oi
- the stream to read from.
writeExternal
public void writeExternal(java.io.ObjectOutput oo)
throws java.io.IOException
- Write a message instance to a stream.
- Overrides:
writeExternal
in class MessagePart
- Parameters:
oo
- the stream to write to.