public class

JsonWebSocketHandler

extends JsonHandler
java.lang.Object
   ↳ edu.stanford.junction.provider.jx.json.JsonHandler
     ↳ edu.stanford.junction.provider.jx.json.JsonWebSocketHandler

Class Overview

Helps read and write json messages over a WebSocket.

Summary

[Expand]
Inherited Fields
From class edu.stanford.junction.provider.jx.json.JsonHandler
Public Constructors
JsonWebSocketHandler(InputStream in, OutputStream out)
Public Methods
JSONObject jsonFromStream()
Reads a JSON object from the handler's inputStream.
void sendJson(JSONObject message)
[Expand]
Inherited Methods
From class edu.stanford.junction.provider.jx.json.JsonHandler
From class java.lang.Object

Public Constructors

public JsonWebSocketHandler (InputStream in, OutputStream out)

Public Methods

public JSONObject jsonFromStream ()

Reads a JSON object from the handler's inputStream. This method is not thread safe.

Throws
IOException

public void sendJson (JSONObject message)

Throws
IOException