public class ServerInterface extends Object implements JSONifiable
| Modifier and Type | Field and Description |
|---|---|
HashSet<Integer> |
allowed_keys
Keys to send to the server (inclusive whitelist: if sendRawKey is false,
these keys are still sent; if it is true, then all keys are sent.
Use standard LWJGL Keyboard.KEY_? values. |
boolean |
sendButton
Whether the client should send button events (a click over a button)
|
boolean |
sendRawClick
Whether the client should send raw clickevents (any click, anywhere)
|
boolean |
sendRawDrag
Whether the client should send drag events (a mouse movement with a
button down)
|
boolean |
sendRawKey
Whether the client should send raw key events (all keys are sent)
|
boolean |
sendRawMove
Whether the client should send raw mouse move events (the mouse moving
anywhere)
|
boolean |
sendRawUp
Whether the client shoudl send raw mouse button release events (a mouse
button is released, anywhere)
|
| Constructor and Description |
|---|
ServerInterface() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
build(JSONObject json) |
boolean |
build(String s)
Build itself such that for Object o that implements JSONifiable, the following
conditions will be true:
o.build(o.serialize(false))==o o.build(o.serialize(true))==o |
JSONObject |
serialize(boolean compress) |
public boolean sendRawClick
public boolean sendRawKey
public boolean sendButton
public boolean sendRawMove
public boolean sendRawDrag
public boolean sendRawUp
public boolean build(JSONObject json)
build in interface JSONifiablepublic boolean build(String s)
JSONifiablebuild in interface JSONifiables - (JSON string from serialize())public JSONObject serialize(boolean compress)
serialize in interface JSONifiable