package uworkers.core.endpoint;

import javax.jms.JMSException;
import javax.jms.MessageProducer;
import javax.jms.TextMessage;

import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
public class ParametrizedRequest {

	final TextMessage message;
	final MessageProducer producer;
	
	public ParametrizedRequest setCorrelationId( String id ) throws JMSException {
		message.setJMSCorrelationID(id);
		return this;
	}
	
	public ParametrizedRequest setMessageId( String id ) throws JMSException {
		message.setJMSMessageID(id);
		return this;
	}
	
	public void send() throws JMSException {
		producer.send(message);
	}
}

@@ -140,33 +140,116 @@
 bok.
-RequiredArgsConstructor;%0A
+Getter;%0Aimport lombok.NonNull;%0Aimport lombok.RequiredArgsConstructor;%0Aimport lombok.Setter;%0A%0A@Getter%0A@Setter
 %0A@Re
@@ -307,20 +307,23 @@
 est %7B%0A%0A%09
-fina
+@NonNul
 l TextMe
@@ -624,33 +624,32 @@
 return this;%0A%09%7D%0A
-%09
 %0A%09public void se
@@ -645,12 +645,19 @@
 lic 
-void
+TextMessage
  sen
@@ -708,13 +708,31 @@
 ssage);%0A
+%09%09return message;%0A
 %09%7D%0A%7D%0A

Allow developers to inspect sent JMS message