Class JettyJSONContext<T extends org.cometd.bayeux.Message.Mutable>

java.lang.Object
org.cometd.common.JettyJSONContext<T>
Direct Known Subclasses:
JettyJSONContextClient

public abstract class JettyJSONContext<T extends org.cometd.bayeux.Message.Mutable>
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Modifier Constructor Description
    protected JettyJSONContext()  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String generate​(java.util.List<T> messages)  
    java.lang.String generate​(T message)  
    JSONContext.Generator getGenerator()  
    org.eclipse.jetty.util.ajax.JSON getJSON()  
    JSONContext.Parser getParser()  
    protected abstract T newRoot()  
    protected abstract T[] newRootArray​(int size)  
    T[] parse​(java.io.InputStream stream)  
    T[] parse​(java.io.Reader reader)  
    T[] parse​(java.lang.String json)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getJSON

      public org.eclipse.jetty.util.ajax.JSON getJSON()
    • newRoot

      protected abstract T newRoot()
    • newRootArray

      protected abstract T[] newRootArray​(int size)
    • parse

      public T[] parse​(java.io.InputStream stream) throws java.text.ParseException
      Throws:
      java.text.ParseException
    • parse

      public T[] parse​(java.io.Reader reader) throws java.text.ParseException
      Throws:
      java.text.ParseException
    • parse

      public T[] parse​(java.lang.String json) throws java.text.ParseException
      Throws:
      java.text.ParseException
    • generate

      public java.lang.String generate​(T message)
    • generate

      public java.lang.String generate​(java.util.List<T> messages)
    • getParser

      public JSONContext.Parser getParser()
    • getGenerator

      public JSONContext.Generator getGenerator()