use of com.swiftmq.tools.requestreply.Reply in project swiftmq-client by iitsoftware.
the class QueueConnectionConsumerImpl method createConsumer.
void createConsumer(QueueImpl queue, String messageSelector) throws JMSException {
if (queue == null)
throw new NullPointerException("createConsumer, queue is null!");
queueName = queue.getQueueName();
Reply reply = null;
try {
reply = requestRegistry.request(new CreateConsumerRequest(dispatchId, (QueueImpl) queue, messageSelector));
} catch (Exception e) {
throw ExceptionConverter.convert(e);
}
if (!reply.isOk())
throw ExceptionConverter.convert(reply.getException());
fillCache();
}
use of com.swiftmq.tools.requestreply.Reply in project swiftmq-client by iitsoftware.
the class TopicConnectionConsumerImpl method createSubscriber.
void createSubscriber(TopicImpl topic, String messageSelector) throws JMSException {
Reply reply = null;
try {
reply = requestRegistry.request(new CreateSubscriberRequest(dispatchId, (TopicImpl) topic, messageSelector, false));
} catch (Exception e) {
throw ExceptionConverter.convert(e);
}
if (reply.isOk()) {
queueName = ((CreateSubscriberReply) reply).getTmpQueueName();
} else {
throw ExceptionConverter.convert(reply.getException());
}
fillCache();
}
use of com.swiftmq.tools.requestreply.Reply in project swiftmq-client by iitsoftware.
the class SMQPVisitorAdapter method visit.
public void visit(XAResRollbackRequest req) {
Reply reply = req.createReply();
reply.setOk(false);
reply.setException(new Exception("Please install the JMS XA/ASF Swiftlet to use this functionality!"));
reply.send();
}
use of com.swiftmq.tools.requestreply.Reply in project swiftmq-client by iitsoftware.
the class SMQPVisitorAdapter method visit.
public void visit(XAResSetTxTimeoutRequest req) {
Reply reply = req.createReply();
reply.setOk(false);
reply.setException(new Exception("Please install the JMS XA/ASF Swiftlet to use this functionality!"));
reply.send();
}
use of com.swiftmq.tools.requestreply.Reply in project swiftmq-client by iitsoftware.
the class SMQPVisitorAdapter method visit.
public void visit(CreateShadowConsumerRequest req) {
Reply reply = req.createReply();
reply.setOk(false);
reply.setException(new Exception("Please install the JMS XA/ASF Swiftlet to use this functionality!"));
reply.send();
}
Aggregations