All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.elasticmq.rest.sqs.ChangeMessageVisibilityBatchHandlerModule.scala Maven / Gradle / Ivy

The newest version!
package org.elasticmq.rest.sqs

import org.elasticmq.rest.RequestHandlerBuilder._
import org.jboss.netty.handler.codec.http.HttpMethod._

import Constants._
import ActionUtil._

trait ChangeMessageVisibilityBatchHandlerModule { this: ClientModule with RequestHandlerLogicModule
  with ChangeMessageVisibilityHandlerModule with BatchRequestsModule =>

  val changeMessageVisibilityBatchLogic = logicWithQueue((queue, request, parameters) => {
    val results = batchRequest("ChangeMessageVisibilityBatchRequestEntry", parameters) { (messageData, id) =>
      changeMessageVisibility(queue, messageData)

      
        {id}
      
    }

    
      
        {results}
      
      
        {EmptyRequestId}
      
    
  })

  private val ChangeMessageVisibilityBatchAction = createAction("ChangeMessageVisibilityBatch")

  val changeMessageVisibilityBatchGetHandler = (createHandler
            forMethod GET
            forPath (QueuePath)
            requiringParameterValues Map(ChangeMessageVisibilityBatchAction)
            running changeMessageVisibilityBatchLogic)

  val changeMessageVisibilityBatchPostHandler = (createHandler
            forMethod POST
            forPath (QueuePath)
            includingParametersFromBody ()
            requiringParameterValues Map(ChangeMessageVisibilityBatchAction)
            running changeMessageVisibilityBatchLogic)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy