public abstract class AbstractMessage extends java.lang.Object implements Message
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMessage(java.lang.Enum<?> urn)
Construct a message with a urn defined as an enum.
|
protected |
AbstractMessage(java.lang.String urn)
Construct a message with a given urn.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addMessageComponent(MessageComponent component)
Add a message component.
|
java.util.List<MessageComponent> |
getComponents()
Get all the components of this message.
|
java.lang.String |
getURN()
Get the urn of this message type.
|
void |
read(java.io.InputStream in)
Read the content of this message from a stream.
|
java.lang.String |
toString() |
void |
write(java.io.OutputStream out)
Write the content of this message to a stream.
|
protected AbstractMessage(java.lang.String urn)
urn - The urn of the message.protected AbstractMessage(java.lang.Enum<?> urn)
urn - The urn of the message.public final java.lang.String getURN()
Messagepublic final java.util.List<MessageComponent> getComponents()
protected void addMessageComponent(MessageComponent component)
component - The component to add.public java.lang.String toString()
toString in class java.lang.Objectpublic void write(java.io.OutputStream out)
throws java.io.IOException
Messagepublic void read(java.io.InputStream in)
throws java.io.IOException
Message