public class RESTDistribution extends Object implements DistributionHandler
Modifier and Type | Field and Description |
---|---|
static String |
BytesMessage |
private Client |
client |
private String |
clientId |
private int |
connectTimeout |
private String |
destName |
private String |
hostName |
private String |
idleTimeout |
private static Logger |
logger |
static String |
MapMessage |
private String |
password |
private int |
port |
private String |
prodName |
private int |
readTimeout |
static String |
TextMessage |
private URI |
uriCloseProducer |
private URI |
uriSendNextMsg |
private boolean |
useOldAPI |
private String |
userName |
Constructor and Description |
---|
RESTDistribution() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this handler and releases any system resources associated to it.
|
private void |
closeProducer()
Close the producer.
|
private void |
createProducer(String userName,
String password) |
void |
distribute(Message message)
Distributes the given message outside of the JORAM server.
|
private Map |
getMapMessageToJsonBodyMap(Message message) |
void |
init(Properties properties,
boolean firstTime)
Configures the handler with the given properties.
|
private void |
sendNextMessage(Message message) |
private static final Logger logger
private String hostName
private int port
private boolean useOldAPI
private int connectTimeout
private int readTimeout
private String userName
private String password
private String destName
private String idleTimeout
private String prodName
private String clientId
private Client client
private URI uriSendNextMsg
private URI uriCloseProducer
public static final String BytesMessage
public static final String MapMessage
public static final String TextMessage
public void init(Properties properties, boolean firstTime)
DistributionHandler
init
in interface DistributionHandler
properties
- The initial set of properties.private void createProducer(String userName, String password) throws Exception
Exception
public void distribute(Message message) throws Exception
DistributionHandler
distribute
in interface DistributionHandler
message
- the message to distributeException
- if the message could not be distributed. The message will
be forwarded to a DMQ, if any.public void close()
DistributionHandler
close
in interface DistributionHandler
private Map getMapMessageToJsonBodyMap(Message message) throws JMSException
JMSException
private void closeProducer()
Copyright © 2023 ScalAgent D.T.. All rights reserved.