Class QueueBuilder
java.lang.Object
com.almis.awe.config.ServiceConfig
com.almis.awe.service.data.builder.AbstractQueryBuilder
com.almis.awe.service.data.builder.QueueBuilder
- All Implemented Interfaces:
QueryBuilder
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
Generate service datalist
-
Field Summary
Fields inherited from class com.almis.awe.service.data.builder.AbstractQueryBuilder
componentSortList, parameters, queryUtil, variableIndex, variables
-
Constructor Summary
ConstructorDescriptionQueueBuilder
(AweJmsDestination jmsDestination, jakarta.jms.ConnectionFactory connectionFactory, org.springframework.transaction.PlatformTransactionManager transactionManager, QueryUtil queryUtil, BaseConfigProperties baseConfigProperties) Autowired constructor -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Call the service and returns the ServiceDatareceiveMessage
(String correlationId) Receive message from a queuesendMessage
(Map<String, Object> parameterList) Send a message to a queuesendMessage
(org.springframework.jms.core.JmsTemplate template, RequestMessage request, Map<String, Object> parameterList) Send JMS MessagesetAddress
(ComponentAddress address) setParameters
(com.fasterxml.jackson.databind.node.ObjectNode parameters) Set querySet the queuesetVariables
(Map<String, QueryParameter> parameterMap) Set variablesSubscribe to a topic queueMethods inherited from class com.almis.awe.service.data.builder.AbstractQueryBuilder
addComponentSort, extractValuesFromParameters, getVariableAsString, getVariables, transformFromJsonNode
Methods inherited from class com.almis.awe.config.ServiceConfig
containsBean, getApplicationContext, getBean, getBean, getElements, getLocale, getLocale, getProperty, getProperty, getRequest, getSession, setApplicationContext
-
Constructor Details
-
QueueBuilder
public QueueBuilder(AweJmsDestination jmsDestination, jakarta.jms.ConnectionFactory connectionFactory, org.springframework.transaction.PlatformTransactionManager transactionManager, QueryUtil queryUtil, BaseConfigProperties baseConfigProperties) Autowired constructor- Parameters:
jmsDestination
- JMS DestinationconnectionFactory
- Connection factorytransactionManager
- Transaction managerqueryUtil
- Query utilitiesbaseConfigProperties
- Base configuration properties
-
-
Method Details
-
setQuery
Description copied from interface:QueryBuilder
Set query- Parameters:
query
- Query- Returns:
- query builder
-
setQueue
Set the queue- Parameters:
queue
- Queue- Returns:
- this
-
setAddress
-
setVariables
Description copied from class:AbstractQueryBuilder
Set variables- Specified by:
setVariables
in interfaceQueryBuilder
- Overrides:
setVariables
in classAbstractQueryBuilder
- Parameters:
parameterMap
- Parameter map- Returns:
- this
-
setParameters
-
build
Call the service and returns the ServiceData- Returns:
- serviceData
- Throws:
AWException
- Error calling service
-
subscribe
Subscribe to a topic queue- Returns:
- Service data
- Throws:
AWException
- Error in subscription
-
sendMessage
Send a message to a queue- Parameters:
parameterList
- parameters- Returns:
- Correlation ID
- Throws:
AWException
- Error sending message
-
receiveMessage
Receive message from a queue- Parameters:
correlationId
- Correlation ID- Returns:
- Service data
- Throws:
AWException
- Error receiving message
-
sendMessage
public String sendMessage(org.springframework.jms.core.JmsTemplate template, RequestMessage request, Map<String, Object> parameterList) throws AWExceptionSend JMS Message- Parameters:
template
- JMS Templaterequest
- RequestparameterList
- Parameter list- Returns:
- Correlation ID
- Throws:
AWException
- Error sending message
-