-
- All Implemented Interfaces:
-
java.io.Closeable,java.lang.AutoCloseable
public interface Transport implements CloseableTransport provides message sending and receiving capabilities using a message queuing technology.
Messages are asynchronously sent to a queue using the SendChannel returned by sendTo, and messages are asynchronously received from a queue using the ReceiveChannel returned by receiveFrom.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classTransport.BaseTransport.Base is an internal abstract base class for Transport implementations.
The class implements receiveFrom and sendTo which initialize and cache each distributed channel for the source/destination queue.
A default Metrics tracking is also provided through the atomic counter properties messagesReceived, messagesSent, receiveErrors, and sendErrors.
public interfaceTransport.BuilderA Transport.Builderbuilds a Transport using the builder pattern.
-
Method Summary
Modifier and Type Method Description abstract ReceiveChannel<ByteArray>receiveFrom(String queue)Initialize a ReceiveChannel to ReceiveChannel.receive messages from the queue. abstract SendChannel<ByteArray>sendTo(String queue)Initialize a SendChannel to SendChannel.send messages to the queue. abstract Metricsmetrics()Get the Metrics for the Transport. -
-
Method Detail
-
receiveFrom
abstract ReceiveChannel<ByteArray> receiveFrom(String queue)
Initialize a ReceiveChannel to ReceiveChannel.receive messages from the queue.
- Parameters:
queue- the queue to receive messages from
-
sendTo
abstract SendChannel<ByteArray> sendTo(String queue)
Initialize a SendChannel to SendChannel.send messages to the queue.
- Parameters:
queue- the queue to send messages to
-
-
-
-