public class MessageConnectionEvent extends Message
Message.MessageType
Constructor and Description |
---|
MessageConnectionEvent(int id,
boolean connected,
boolean writeConnected)
Creates a new message based on the given parameters.
|
MessageConnectionEvent(javax.json.JsonObject obj)
Creates a new message based on the JSON representation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isConnected()
Whether the channel is connected.
|
boolean |
isWriteConnected()
Whether the channel can be written to.
|
void |
toJson(Writer writer)
Serializes this message as JSON onto the given writer.
|
getId, getMessage, readValueFromJson, writeValueToJson
public MessageConnectionEvent(javax.json.JsonObject obj) throws MessageDecodeException
obj
- JSON objectMessageDecodeException
- if json format is incorrectpublic MessageConnectionEvent(int id, boolean connected, boolean writeConnected)
id
- the channel idconnected
- whether it's connectedwriteConnected
- whether the write is connectedCopyright © 2015. All rights reserved.