Thrift generation for Java

Summary: Java works, benchmark roundtrip at around 3ms, so right in between C++ and PHP


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664775 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/java/src/protocol/TProtocol.java b/lib/java/src/protocol/TProtocol.java
index a60becb..69fe885 100644
--- a/lib/java/src/protocol/TProtocol.java
+++ b/lib/java/src/protocol/TProtocol.java
@@ -14,6 +14,11 @@
    * Writing methods.
    */
 
+  public void writeMessageBegin(TTransport out,
+                                TMessage   message) throws TException;
+
+  public void writeMessageEnd  (TTransport out)     throws TException;
+  
   public void writeStructBegin (TTransport out,
                                 TStruct    struct)  throws TException;
 
@@ -41,18 +46,18 @@
 
   public void writeSetEnd      (TTransport out)     throws TException;
 
+  public void writeBool        (TTransport out,
+                                boolean    b)       throws TException;
+
   public void writeByte        (TTransport out,
                                 byte       b)       throws TException;
 
-  public void writeU32         (TTransport out,
-                                int        u32)     throws TException;
+  public void writeI16         (TTransport out,
+                                short      i16)     throws TException;
 
   public void writeI32         (TTransport out,
                                 int        i32)     throws TException;
 
-  public void writeU64         (TTransport out,
-                                long       u64)     throws TException;
-
   public void writeI64         (TTransport out,
                                 long       i64)     throws TException;
 
@@ -63,36 +68,40 @@
    * Reading methods.
    */
 
-  public TStruct readStructBegin  (TTransport in)  throws TException;
+  public TMessage readMessageBegin (TTransport in)  throws TException;
 
-  public void    readStructEnd    (TTransport in)  throws TException;
+  public void     readMessageEnd   (TTransport in)  throws TException;
 
-  public TField  readFieldBegin   (TTransport in)  throws TException;
+  public TStruct  readStructBegin  (TTransport in)  throws TException;
+
+  public void     readStructEnd    (TTransport in)  throws TException;
+
+  public TField   readFieldBegin   (TTransport in)  throws TException;
   
-  public void    readFieldEnd     (TTransport in)  throws TException;
+  public void     readFieldEnd     (TTransport in)  throws TException;
  
-  public TMap    readMapBegin     (TTransport in)  throws TException;
+  public TMap     readMapBegin     (TTransport in)  throws TException;
 
-  public void    readMapEnd       (TTransport in)  throws TException;
+  public void     readMapEnd       (TTransport in)  throws TException;
 
-  public TList   readListBegin    (TTransport in)  throws TException;
+  public TList    readListBegin    (TTransport in)  throws TException;
 
-  public void    readListEnd      (TTransport in)  throws TException;
+  public void     readListEnd      (TTransport in)  throws TException;
 
-  public TSet    readSetBegin     (TTransport in)  throws TException;
+  public TSet     readSetBegin     (TTransport in)  throws TException;
 
-  public void    readSetEnd       (TTransport in)  throws TException;
+  public void     readSetEnd       (TTransport in)  throws TException;
 
-  public byte    readByte         (TTransport in)  throws TException;
+  public boolean  readBool         (TTransport in)  throws TException;
 
-  public int     readU32          (TTransport in)  throws TException;
+  public byte     readByte         (TTransport in)  throws TException;
 
-  public int     readI32          (TTransport in)  throws TException;
+  public short    readI16          (TTransport in)  throws TException;
 
-  public long    readU64          (TTransport in)  throws TException;
-  
-  public long    readI64          (TTransport in)  throws TException;
+  public int      readI32          (TTransport in)  throws TException;
+ 
+  public long     readI64          (TTransport in)  throws TException;
 
-  public String  readString       (TTransport in)  throws TException;
+  public String   readString       (TTransport in)  throws TException;
 
 }