com.caucho.jsmp
Class JsmpWriter

java.lang.Object
  extended by com.caucho.jsmp.JsmpWriter

public class JsmpWriter
extends java.lang.Object

JmtpWriteStream writes JMTP packets to an OutputStream.


Constructor Summary
JsmpWriter()
           
 
Method Summary
 void flush()
           
 void message(java.io.PrintWriter os, java.lang.String to, java.lang.String from, java.io.Serializable value)
          JMTP unidirectional message
 void messageError(java.io.PrintWriter os, java.lang.String to, java.lang.String from, java.io.Serializable value, BamError error)
          JMTP unidirectional message
 void query(java.io.PrintWriter os, long id, java.lang.String to, java.lang.String from, java.io.Serializable value)
          Low-level query
 void queryError(java.io.PrintWriter os, long id, java.lang.String to, java.lang.String from, java.io.Serializable payload, BamError error)
          Low-level query
 void queryResult(java.io.PrintWriter os, long id, java.lang.String to, java.lang.String from, java.io.Serializable value)
          Low-level query
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JsmpWriter

public JsmpWriter()
Method Detail

message

public void message(java.io.PrintWriter os,
                    java.lang.String to,
                    java.lang.String from,
                    java.io.Serializable value)
JMTP unidirectional message
 ["message",
  "to@to-host.com",
  "from@from-host.com",
  "message-class",
  "json-payload"]
 


messageError

public void messageError(java.io.PrintWriter os,
                         java.lang.String to,
                         java.lang.String from,
                         java.io.Serializable value,
                         BamError error)
JMTP unidirectional message
 ["message_error",
  "to@to-host.com",
  "from@from-host.com",
  "com.example.MessageType",
  json-payload,
  json-error]
 


query

public void query(java.io.PrintWriter os,
                  long id,
                  java.lang.String to,
                  java.lang.String from,
                  java.io.Serializable value)
Low-level query


queryResult

public void queryResult(java.io.PrintWriter os,
                        long id,
                        java.lang.String to,
                        java.lang.String from,
                        java.io.Serializable value)
Low-level query


queryError

public void queryError(java.io.PrintWriter os,
                       long id,
                       java.lang.String to,
                       java.lang.String from,
                       java.io.Serializable payload,
                       BamError error)
Low-level query


flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object