public class TReadableJSONProtocol
extends org.apache.thrift.protocol.TProtocol
implements com.foursquare.common.thrift.base.SerializeDatesAsSeconds
| Modifier and Type | Class and Description |
|---|---|
static class |
TReadableJSONProtocol.Factory
Factory class for creating TReadableJSONProtocol objects.
|
| Constructor and Description |
|---|
TReadableJSONProtocol(org.apache.thrift.transport.TTransport trans,
org.codehaus.jackson.PrettyPrinter pp) |
TReadableJSONProtocol(org.apache.thrift.transport.TTransport trans,
org.codehaus.jackson.PrettyPrinter pp,
org.codehaus.jackson.JsonParser jp) |
TReadableJSONProtocol(org.apache.thrift.transport.TTransport trans,
org.codehaus.jackson.PrettyPrinter pp,
org.codehaus.jackson.JsonParser jp,
boolean coerceMapKeys) |
TReadableJSONProtocol(org.apache.thrift.transport.TTransport trans,
org.codehaus.jackson.PrettyPrinter pp,
org.codehaus.jackson.JsonParser jp,
boolean coerceMapKeys,
boolean bareObjectIds) |
| Modifier and Type | Method and Description |
|---|---|
static byte |
getElemTypeFromToken(org.codehaus.jackson.JsonToken token) |
java.nio.ByteBuffer |
readBinary() |
boolean |
readBool() |
byte |
readByte() |
double |
readDouble() |
org.apache.thrift.protocol.TField |
readFieldBegin() |
void |
readFieldEnd() |
short |
readI16() |
int |
readI32() |
long |
readI64() |
org.apache.thrift.protocol.TList |
readListBegin() |
byte[] |
readListBeginEnhanced()
Similar to readListBegin but returns an array with the type of each element in the list, instead of
returning a TList.
|
void |
readListEnd() |
org.apache.thrift.protocol.TMap |
readMapBegin()
IMPORTANT: Only string keyed maps are supported.
|
void |
readMapEnd() |
org.apache.thrift.protocol.TMessage |
readMessageBegin()
Reading methods.
|
void |
readMessageEnd() |
org.apache.thrift.protocol.TSet |
readSetBegin() |
void |
readSetEnd() |
java.lang.String |
readString() |
org.apache.thrift.protocol.TStruct |
readStructBegin() |
void |
readStructEnd() |
void |
reset()
Reset any internal state back to a blank slate.
|
void |
writeBinary(java.nio.ByteBuffer bb) |
void |
writeBool(boolean b) |
void |
writeByte(byte b) |
void |
writeDouble(double v) |
void |
writeFieldBegin(org.apache.thrift.protocol.TField tField) |
void |
writeFieldEnd() |
void |
writeFieldStop() |
void |
writeI16(short i) |
void |
writeI32(int i) |
void |
writeI64(long l) |
void |
writeListBegin(org.apache.thrift.protocol.TList tList) |
void |
writeListEnd() |
void |
writeMapBegin(org.apache.thrift.protocol.TMap tMap) |
void |
writeMapEnd() |
void |
writeMessageBegin(org.apache.thrift.protocol.TMessage tMessage)
Writing methods.
|
void |
writeMessageEnd() |
void |
writeSetBegin(org.apache.thrift.protocol.TSet tSet) |
void |
writeSetEnd() |
void |
writeString(java.lang.String s) |
void |
writeStructBegin(org.apache.thrift.protocol.TStruct tStruct) |
void |
writeStructEnd() |
public TReadableJSONProtocol(org.apache.thrift.transport.TTransport trans,
org.codehaus.jackson.PrettyPrinter pp)
public TReadableJSONProtocol(org.apache.thrift.transport.TTransport trans,
org.codehaus.jackson.PrettyPrinter pp,
org.codehaus.jackson.JsonParser jp)
public TReadableJSONProtocol(org.apache.thrift.transport.TTransport trans,
org.codehaus.jackson.PrettyPrinter pp,
org.codehaus.jackson.JsonParser jp,
boolean coerceMapKeys)
public TReadableJSONProtocol(org.apache.thrift.transport.TTransport trans,
org.codehaus.jackson.PrettyPrinter pp,
org.codehaus.jackson.JsonParser jp,
boolean coerceMapKeys,
boolean bareObjectIds)
public static byte getElemTypeFromToken(org.codehaus.jackson.JsonToken token)
throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic void reset()
org.apache.thrift.protocol.TProtocolreset in class org.apache.thrift.protocol.TProtocolpublic void writeMessageBegin(org.apache.thrift.protocol.TMessage tMessage)
throws org.apache.thrift.TException
org.apache.thrift.protocol.TProtocolwriteMessageBegin in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeMessageEnd()
throws org.apache.thrift.TException
writeMessageEnd in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeStructBegin(org.apache.thrift.protocol.TStruct tStruct)
throws org.apache.thrift.TException
writeStructBegin in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeStructEnd()
throws org.apache.thrift.TException
writeStructEnd in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeFieldBegin(org.apache.thrift.protocol.TField tField)
throws org.apache.thrift.TException
writeFieldBegin in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeFieldEnd()
throws org.apache.thrift.TException
writeFieldEnd in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeFieldStop()
throws org.apache.thrift.TException
writeFieldStop in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeMapBegin(org.apache.thrift.protocol.TMap tMap)
throws org.apache.thrift.TException
writeMapBegin in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeMapEnd()
throws org.apache.thrift.TException
writeMapEnd in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeListBegin(org.apache.thrift.protocol.TList tList)
throws org.apache.thrift.TException
writeListBegin in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeListEnd()
throws org.apache.thrift.TException
writeListEnd in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeSetBegin(org.apache.thrift.protocol.TSet tSet)
throws org.apache.thrift.TException
writeSetBegin in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeSetEnd()
throws org.apache.thrift.TException
writeSetEnd in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeBool(boolean b)
throws org.apache.thrift.TException
writeBool in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeByte(byte b)
throws org.apache.thrift.TException
writeByte in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeI16(short i)
throws org.apache.thrift.TException
writeI16 in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeI32(int i)
throws org.apache.thrift.TException
writeI32 in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeI64(long l)
throws org.apache.thrift.TException
writeI64 in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeDouble(double v)
throws org.apache.thrift.TException
writeDouble in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeString(java.lang.String s)
throws org.apache.thrift.TException
writeString in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void writeBinary(java.nio.ByteBuffer bb)
throws org.apache.thrift.TException
writeBinary in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic org.apache.thrift.protocol.TMessage readMessageBegin()
throws org.apache.thrift.TException
org.apache.thrift.protocol.TProtocolreadMessageBegin in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void readMessageEnd()
throws org.apache.thrift.TException
readMessageEnd in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic org.apache.thrift.protocol.TStruct readStructBegin()
throws org.apache.thrift.TException
readStructBegin in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void readStructEnd()
throws org.apache.thrift.TException
readStructEnd in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic org.apache.thrift.protocol.TField readFieldBegin()
throws org.apache.thrift.TException
readFieldBegin in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void readFieldEnd()
throws org.apache.thrift.TException
readFieldEnd in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic org.apache.thrift.protocol.TMap readMapBegin()
throws org.apache.thrift.TException
readMapBegin in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void readMapEnd()
throws org.apache.thrift.TException
readMapEnd in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic org.apache.thrift.protocol.TList readListBegin()
throws org.apache.thrift.TException
readListBegin in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic byte[] readListBeginEnhanced()
throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic void readListEnd()
throws org.apache.thrift.TException
readListEnd in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic org.apache.thrift.protocol.TSet readSetBegin()
throws org.apache.thrift.TException
readSetBegin in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic void readSetEnd()
throws org.apache.thrift.TException
readSetEnd in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic boolean readBool()
throws org.apache.thrift.TException
readBool in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic byte readByte()
throws org.apache.thrift.TException
readByte in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic short readI16()
throws org.apache.thrift.TException
readI16 in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic int readI32()
throws org.apache.thrift.TException
readI32 in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic long readI64()
throws org.apache.thrift.TException
readI64 in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic double readDouble()
throws org.apache.thrift.TException
readDouble in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic java.lang.String readString()
throws org.apache.thrift.TException
readString in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TExceptionpublic java.nio.ByteBuffer readBinary()
throws org.apache.thrift.TException
readBinary in class org.apache.thrift.protocol.TProtocolorg.apache.thrift.TException