CMessage
CMessage
is simply a container for the classes CEnvelope and CRecord.
Constructors
There are two constructors for the class. The first one takes over the given components:
public CMessage(@NotNull final CEnvelope aEnvelope, @NotNull final CRecord aRecord);
The second constructor takes a template and is actually a copy constructor:
public CMessage(@NotNull final CMessage aTemplate);
Stream
Furthermore, there is a static method for reading the message from a DataInput
stream:
public static CMessage fromStream(@NotNull final DataInput aStream) throws IOException;
Accordingly, there is also a method for writing to a DataOutput
stream:
public void toStream(@NotNull final DataOutput aStream) throws IOException;
Getter
The two getter methods are:
@NotNull public CEnvelope getEnvelope(); @NotNull public CRecord getRecord();
CMessage
supports equals()
and hashCode()
.