public interface DataSender extends Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
closeWhenFinished()
A blocking method that closes the sender when its work is done, i.e., all
messages have been consumed by receivers from the queue.
|
void |
sendData(byte[] data)
Send the given data to the queue.
|
void |
sendData(byte[] data,
String dataId)
Send the given data to the queue using the given Id as identifier.
|
void |
sendData(InputStream is)
Send the given data to the queue.
|
void |
sendData(InputStream is,
String dataId)
Send the given data to the queue using the given Id as identifier.
|
void sendData(byte[] data)
throws IOException
data - the data that should be sentIOException - if an exception occurs during the communication with the
queuevoid sendData(byte[] data,
String dataId)
throws IOException
data - the data that should be sentdataId - the Id that is used as identifierIOException - if an exception occurs during the communication with the
queuevoid sendData(InputStream is) throws IOException
is - an InputStream from which the data is readIOException - if an exception occurs during the communication with the
queuevoid sendData(InputStream is, String dataId) throws IOException
is - an InputStream from which the data is readdataId - the Id that is used as identifierIOException - if an exception occurs during the communication with the
queuevoid closeWhenFinished()
Copyright © 2017–2018. All rights reserved.