public class OutboundAdapter extends Object
Channel.| Modifier and Type | Field and Description |
|---|---|
private ByteArrayOutputStream |
bos
Container for service request payload.
|
private DataOutputStream |
dos
Wrapper class for crafting service request payload.
|
private int |
minimumVersion
Minimum version required for the invocation of the specified API.
|
private static int |
NO_MINIMUM_VERSION |
| Constructor and Description |
|---|
OutboundAdapter()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getMinimumVersion() |
OutboundAdapter |
minimumVersion(int minimumVersion) |
byte[] |
toBytes()
Assemble the request byte stream to be written to the service
Channel. |
OutboundAdapter |
write(byte[] value)
Write bytes to the service request payload.
|
OutboundAdapter |
write(Collection<byte[]> values)
Write bytes to the service request payload.
|
OutboundAdapter |
write(int value)
Write an integer to the service request payload.
|
OutboundAdapter |
write(long value)
Write a long to the service request payload.
|
OutboundAdapter |
write(String value)
Write a string to the service request payload.
|
<T> OutboundAdapter |
write(T value,
Serializer<T> serializer)
Write an arbitrary value to the service request payload, using the provided serializer.
|
private static final int NO_MINIMUM_VERSION
private int minimumVersion
private final ByteArrayOutputStream bos
private final DataOutputStream dos
public int getMinimumVersion()
public OutboundAdapter minimumVersion(int minimumVersion)
public OutboundAdapter write(int value) throws IOException
value - the value to be writtenIOException - on write failurepublic OutboundAdapter write(long value) throws IOException
value - the value to be writtenIOException - on write failurepublic OutboundAdapter write(String value) throws IOException
value - the value to be writtenIOException - on write failurepublic OutboundAdapter write(byte[] value) throws IOException
value - the bytes to be writtenIOException - on write failurepublic OutboundAdapter write(Collection<byte[]> values) throws IOException
values - the bytes to be writtenIOException - on write failurepublic <T> OutboundAdapter write(T value, Serializer<T> serializer) throws IOException
value - the value to be writtenserializer - the method by which the value is to be serializedIOException - on write failurepublic byte[] toBytes()
throws IOException
Channel.IOException - on write failureCopyright © 2022 Apache NiFi Project. All rights reserved.