public final class EventBasedThriftReader extends Object
| Constructor and Description |
|---|
EventBasedThriftReader(org.apache.thrift.protocol.TProtocol protocol) |
| Modifier and Type | Method and Description |
|---|---|
void |
readListContent(TypedConsumer.ListConsumer eventConsumer,
org.apache.thrift.protocol.TList tList)
reads the list content (elements) from the underlying protocol and passes the events to the list event consumer
|
void |
readMapContent(TypedConsumer.MapConsumer eventConsumer,
org.apache.thrift.protocol.TMap tMap)
reads the map content (key values) from the underlying protocol and passes the events to the map event consumer
|
void |
readMapEntry(byte keyType,
TypedConsumer keyConsumer,
byte valueType,
TypedConsumer valueConsumer)
reads a key-value pair
|
void |
readSetContent(TypedConsumer.SetConsumer eventConsumer,
org.apache.thrift.protocol.TSet tSet)
reads the set content (elements) from the underlying protocol and passes the events to the set event consumer
|
void |
readStruct(FieldConsumer c)
reads a Struct from the underlying protocol and passes the field events to the FieldConsumer
|
void |
readStructContent(FieldConsumer c)
reads the content of a struct (fields) from the underlying protocol and passes the events to c
|
public EventBasedThriftReader(org.apache.thrift.protocol.TProtocol protocol)
protocol - the protocol to read frompublic void readStruct(FieldConsumer c) throws org.apache.thrift.TException
c - the field consumerorg.apache.thrift.TException - if any thrift related error occurs during the readingpublic void readStructContent(FieldConsumer c) throws org.apache.thrift.TException
c - the field consumerorg.apache.thrift.TException - if any thrift related error occurs during the readingpublic void readSetContent(TypedConsumer.SetConsumer eventConsumer, org.apache.thrift.protocol.TSet tSet) throws org.apache.thrift.TException
eventConsumer - the consumertSet - the set descriptororg.apache.thrift.TException - if any thrift related error occurs during the readingpublic void readMapContent(TypedConsumer.MapConsumer eventConsumer, org.apache.thrift.protocol.TMap tMap) throws org.apache.thrift.TException
eventConsumer - the consumertMap - the map descriptororg.apache.thrift.TException - if any thrift related error occurs during the readingpublic void readMapEntry(byte keyType,
TypedConsumer keyConsumer,
byte valueType,
TypedConsumer valueConsumer)
throws org.apache.thrift.TException
keyType - the type of the keykeyConsumer - the consumer for the keyvalueType - the type of the valuevalueConsumer - the consumer for the valueorg.apache.thrift.TException - if any thrift related error occurs during the readingpublic void readListContent(TypedConsumer.ListConsumer eventConsumer, org.apache.thrift.protocol.TList tList) throws org.apache.thrift.TException
eventConsumer - the consumertList - the list descriptororg.apache.thrift.TException - if any thrift related error occurs during the readingCopyright © 2020 The Apache Software Foundation. All rights reserved.