/**
* @see Thread#run()
*/
public void run() {
BlockingReceiverDestination blockRecvDest = null;
try {
blockRecvDest =
(BlockingReceiverDestination) DestinationFactory
.getReceiverDestination(URI.create(_uriStr));
if (blockRecvDest == null) // Not registered yet
{
InboundDestinationConfiguration config;
// Prepare the inbound destination for incoming messages
if (_configType == InboundDestinationConfiguration.CONFIG_TYPE_BES) {
config =
InboundDestinationConfigurationFactory
.createBESConfiguration(
_autoStartEnabled, true, false);
} else if (_configType == InboundDestinationConfiguration.CONFIG_TYPE_IPC) {
config =
InboundDestinationConfigurationFactory
.createIPCConfiguration(
_autoStartEnabled, true, false);
} else {
throw new IllegalArgumentException(
"Invalid InboundDestinationConfiguration type! Implemented support of IPC and BES only.");
}
blockRecvDest =
DestinationFactory
.createBlockingReceiverDestination(config,
URI.create(_uriStr));
}
String alertString = "";
_response = blockRecvDest.receive(_timeout * 1000);
if (_response != null) {
alertString =
"RECEIVED[id: " + _response.getMessageId() + "]:";
final String stringPayload =