K - the expected type of the service response keysV - the expected type of the service response valuespublic class MapInboundAdapter<K,V> extends Object implements InboundAdapter
InboundAdapter where the service response payload is expected to be
a map of keys of type K to values of type V.| Modifier and Type | Field and Description |
|---|---|
private io.netty.buffer.ByteBuf |
byteBuf
Container for bytes queued from the service response
Channel. |
private Deserializer<K> |
deserializerK
The deserializer to be used to construct the keys in the service response map.
|
private Deserializer<V> |
deserializerV
The deserializer to be used to construct the values from the service response object.
|
private InboundToken<K> |
inboundTokenK
The state of receipt of an individual service response token.
|
private InboundToken<V> |
inboundTokenV
The state of receipt of an individual service response token.
|
private Map<K,V> |
result
The entries received in the service response.
|
private Integer |
size
The count of map entries expected in the service response.
|
| Constructor and Description |
|---|
MapInboundAdapter(Deserializer<K> deserializerK,
Deserializer<V> deserializerV,
Map<K,V> result)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dequeue()
Parse the received content into a form suitable for supplying to the remote method caller.
|
Map<K,V> |
getResult() |
boolean |
isComplete()
Check for receipt of all response content expected from server.
|
void |
queue(byte[] bytes)
Add
Channel content to a queue for later processing |
private final Deserializer<K> deserializerK
private final Deserializer<V> deserializerV
private final io.netty.buffer.ByteBuf byteBuf
Channel.private final InboundToken<K> inboundTokenK
private final InboundToken<V> inboundTokenV
private Integer size
public MapInboundAdapter(Deserializer<K> deserializerK, Deserializer<V> deserializerV, Map<K,V> result)
deserializerK - the deserializer to be used to construct the service response map keysdeserializerV - the deserializer to be used to construct the service response map valuesresult - container for the map entries received in the service responsepublic boolean isComplete()
InboundAdapterisComplete in interface InboundAdapterpublic void queue(byte[] bytes)
InboundAdapterChannel content to a queue for later processingqueue in interface InboundAdapterbytes - the remote content to queuepublic void dequeue()
throws IOException
InboundAdapterdequeue in interface InboundAdapterIOException - on failure parsing the contentCopyright © 2022 Apache NiFi Project. All rights reserved.