public class MessageSubscribe extends Message
Message.MessageType
Constructor and Description |
---|
MessageSubscribe(int id,
String channel,
String type,
int maxRate,
boolean readOnly)
Creates a new message based on the given parameters.
|
MessageSubscribe(javax.json.JsonObject obj)
Creates a new message based on the JSON representation.
|
Modifier and Type | Method and Description |
---|---|
String |
getChannel()
The channel name.
|
int |
getMaxRate()
The maximum notification rate.
|
String |
getType()
The requested type for values.
|
boolean |
isReadOnly()
Whether the channel should be read-only.
|
void |
toJson(Writer writer)
Serializes this message as JSON onto the given writer.
|
getId, getMessage, readValueFromJson, writeValueToJson
public MessageSubscribe(javax.json.JsonObject obj) throws MessageDecodeException
obj
- JSON objectMessageDecodeException
- if json format is incorrectpublic MessageSubscribe(int id, String channel, String type, int maxRate, boolean readOnly)
id
- the channel idchannel
- the channel nametype
- the type for the valuemaxRate
- the maximum notification ratereadOnly
- whether it's read onlypublic String getChannel()
public String getType()
public int getMaxRate()
public boolean isReadOnly()
Copyright © 2015. All rights reserved.