public class ConfigComponent extends AbstractMessageComponent
Constructor and Description |
---|
ConfigComponent(java.lang.String name)
Construct a ConfigComponent with no content.
|
ConfigComponent(java.lang.String name,
Config data)
Construct a ConfigComponent with a specific config as content.
|
Modifier and Type | Method and Description |
---|---|
Config |
getConfig()
Get the content of this message component.
|
void |
read(java.io.InputStream in)
Read this component from a stream.
|
void |
setConfig(Config config)
Set the content of this message component.
|
java.lang.String |
toString() |
void |
write(java.io.OutputStream out)
Write this component to a stream.
|
getName
public ConfigComponent(java.lang.String name)
name
- The name of the component.public ConfigComponent(java.lang.String name, Config data)
name
- The name of the component.data
- The content.public Config getConfig()
public void setConfig(Config config)
config
- The new content.public void write(java.io.OutputStream out) throws java.io.IOException
MessageComponent
out
- The stream to write to.java.io.IOException
- If the write fails.public void read(java.io.InputStream in) throws java.io.IOException
MessageComponent
in
- The stream to read from.java.io.IOException
- If the read fails.public java.lang.String toString()
toString
in class java.lang.Object