public class MessageSupplier<Message extends PMessage<Message,Field>,Field extends PField> extends Object implements ReloadableSupplier<Message>
FileMessageReader.
MessageSupplier supplier = new MessageSupplier(
MyConfig.kDescriptor,
new FileMessageReader(configFile, new PrettySerializer()));
| Constructor and Description |
|---|
MessageSupplier(PMessageDescriptor<Message,Field> descriptor,
MessageReader reader)
Create a config that wraps a providence message instance.
|
| Modifier and Type | Method and Description |
|---|---|
Message |
get()
Get the message enclosed in the config wrapper.
|
void |
reload()
Reload the message into the config.
|
public MessageSupplier(PMessageDescriptor<Message,Field> descriptor, MessageReader reader) throws IOException
descriptor - The message descriptor of the config root message.reader - The message reader containing the config.IOException - If message read failed.SerializerException - If message deserialization failed.public Message get()
Copyright © 2015–2017 morimekta.net. All rights reserved.