Class QueueOperations
java.lang.Object
org.mule.munit.tools.util.queue.internal.QueueOperations
Operations to store values on a temporary queue
- Since:
- 2.2.0
- Author:
- Mulesoft Inc.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.mule.runtime.extension.api.runtime.operation.Result<Serializable,Void> Pops the given data from a temporary queue.voidqueue(org.mule.runtime.api.metadata.TypedValue<Serializable> value, String queueName) Pushes the given value to a temporary queue so this can be consumed later on demand
-
Field Details
-
temporaryQueueRule
-
-
Constructor Details
-
QueueOperations
public QueueOperations()
-
-
Method Details
-
queue
@Throws(QueueErrorTypeProvider.class) public void queue(@Content org.mule.runtime.api.metadata.TypedValue<Serializable> value, @Optional String queueName) Pushes the given value to a temporary queue so this can be consumed later on demand- Parameters:
value- Value to queuequeueName- The name of the queue where dequeue a value
-
dequeue
@Throws(QueueErrorTypeProvider.class) public org.mule.runtime.extension.api.runtime.operation.Result<Serializable,Void> dequeue(@Optional String queueName, @Optional(defaultValue="10000") Long timeout, @Optional(defaultValue="MILLISECONDS") TimeUnit timeoutUnit) Pops the given data from a temporary queue.- Parameters:
queueName- The name of the queue where dequeue a valuetimeout- Time to wait for a value until the connector throws a QUEUE_TIMEOUT errortimeoutUnit- Time Unit to use to wait for a value to arrive- Returns:
- The next queued value
-