The sender creates a communication buffer object of type Buffer.
Internally this buffer maintains a vector of bytes reflecting the wire
format of the message. It is the responsibility of the user to ensure
that sufficient space is available in the buffer to hold the desired message.
Trying to write too much data to a buffer causes an exception to be thrown.
Likewise, trying to recive a message into a buffer that is too small will
cause an exception to be thrown.
The primary buffer which is used to store message elements of
primitive type and the secondary buffer which is intended to hold the
data from object elements in the message are two main parts of a message.
The primary buffer has a fixed capacity. The size of the secondary buffer,
if it is used, is likely to be determined ``dynamically''--for example as
objects are written to the buffer.
Figure 17:
Overall layout of logical message.
3.3in1.5in./messlayout.eps
The primary buffer contains two main parts. A message start with short
primary header followed by primary buffer contests (sections).
A primary header is defining the encoding scheme and total number of
data bytes in the primary buffer.
Each section contains a fixed number of elements of homogeneous type.
The elements in a section will all have identical primitive Java type or
they will have Object type.
secondary header of the secondary buffer will only store
information about number of bytes of data in the secondary buffer.
The layout of secondary buffer will be defined by the Java Object Serialization
specification. Figure 17 illustrates overall layout of logical
message.
Next:Benchmarks Up:mpjdev Previous:General Features
Bryan Carpenter
2003-01-23