Class Pmessage

java.lang.Object
pygar.communication.PmessageBase
pygar.communication.Pmessage
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ExternalPmessage

@ThreadSafe
public class Pmessage
extends PmessageBase
implements java.io.Serializable
The Pmessage class extends the PmessageBase class to provide a message type with various options for bod content.

The body of the message can be empty or nonempty. An empty message is sent solely to convey the subject value. A nonempty message contains a body that will be present in one of three mutually exclusive forms. The purpose of this complexity is that it supports a lazy evaluation for some functions. E.g., if the body is present as a file name, then the message can be passed around on the same machine very easily without moving the file. Short messages can be implemented easily with the stringBody alternative.

The current version of this class contains a convenience function to determine the type of body content. Note that the addition of a type field might break older software but a field might be added in the future.

The current version contains lines of code that have been converted to comments in order to disable a feature for conveying a Stream body. The reason for this step is that no existing code implements the stream feature. Moreover, it is not compatible with a JMS implementation of a message system. Therefore, we do not expect that the stream feature will ever be enabled.

See Also:
Serialized Form