public class Consumers extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Consumers.Consumer<T>
To consume objects coming from a DelegatingFieldConsumer
|
static class |
Consumers.DelegatingFieldConsumer
Delegates reading the field to TypedConsumers.
|
| Constructor and Description |
|---|
Consumers() |
| Modifier and Type | Method and Description |
|---|---|
static Consumers.DelegatingFieldConsumer |
fieldConsumer()
call onField on the resulting DelegatingFieldConsumer to handle individual fields
|
static TypedConsumer.ListConsumer |
listElementsOf(TypedConsumer consumer)
To consume list elements one by one
|
static <T extends org.apache.thrift.TBase<T,? extends org.apache.thrift.TFieldIdEnum>> |
listOf(Class<T> c,
Consumers.Consumer<List<T>> consumer)
To consume a list of elements
|
static <T extends org.apache.thrift.TBase<T,? extends org.apache.thrift.TFieldIdEnum>> |
struct(Class<T> c,
Consumers.Consumer<T> consumer) |
public static Consumers.DelegatingFieldConsumer fieldConsumer()
public static <T extends org.apache.thrift.TBase<T,? extends org.apache.thrift.TFieldIdEnum>> TypedConsumer.ListConsumer listOf(Class<T> c, Consumers.Consumer<List<T>> consumer)
T - the type of the list contentc - the class of the list contentconsumer - the consumer that will receive the listpublic static TypedConsumer.ListConsumer listElementsOf(TypedConsumer consumer)
consumer - the consumer that will read the elementspublic static <T extends org.apache.thrift.TBase<T,? extends org.apache.thrift.TFieldIdEnum>> TypedConsumer.StructConsumer struct(Class<T> c, Consumers.Consumer<T> consumer)
Copyright © 2020 The Apache Software Foundation. All rights reserved.