use of com.swiftmq.swiftlet.queue.MessageEntry in project swiftmq-client by iitsoftware.
the class SMQPUtil method read.
static MessageEntry[] read(MessageEntry[] m, DataInput in) throws IOException {
MessageEntry[] mi = new MessageEntry[in.readInt()];
for (int i = 0; i < mi.length; i++) {
MessageEntry entry = new MessageEntry();
entry.readContent(in);
mi[i] = entry;
}
return mi;
}
use of com.swiftmq.swiftlet.queue.MessageEntry in project swiftmq-client by iitsoftware.
the class SMQPUtil method read.
static MessageEntry[] read(MessageEntry[] m, DataInput in) throws IOException {
MessageEntry[] mi = new MessageEntry[in.readInt()];
for (int i = 0; i < mi.length; i++) {
MessageEntry entry = new MessageEntry();
entry.readContent(in);
mi[i] = entry;
}
return mi;
}
use of com.swiftmq.swiftlet.queue.MessageEntry in project swiftmq-client by iitsoftware.
the class SMQPUtil method read.
static MessageEntry[] read(MessageEntry[] m, DataInput in) throws IOException {
MessageEntry[] mi = new MessageEntry[in.readInt()];
for (int i = 0; i < mi.length; i++) {
MessageEntry entry = new MessageEntry();
entry.readContent(in);
mi[i] = entry;
}
return mi;
}
use of com.swiftmq.swiftlet.queue.MessageEntry in project swiftmq-ce by iitsoftware.
the class BrowserManager method fetchBrowserMessage.
public void fetchBrowserMessage(FetchBrowserMessageRequest request) {
FetchBrowserMessageReply reply = (FetchBrowserMessageReply) request.createReply();
int browserId = request.getQueueBrowserId();
try {
com.swiftmq.swiftlet.queue.QueueBrowser browser = (com.swiftmq.swiftlet.queue.QueueBrowser) queueBrowsers.get(browserId);
if (request.isResetRequired())
browser.resetBrowser();
browser.setLastMessageIndex(request.getLastMessageIndex());
MessageEntry me = (MessageEntry) browser.getNextMessage();
reply.setOk(true);
reply.setMessageEntry(me);
} catch (Exception e) {
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace("sys$jms", ctx.tracePrefix + "/" + toString() + ": get next message failed: " + e.getMessage());
reply.setOk(false);
reply.setException(e);
}
reply.send();
}
use of com.swiftmq.swiftlet.queue.MessageEntry in project swiftmq-ce by iitsoftware.
the class BrowserManager method fetchBrowserMessage.
public void fetchBrowserMessage(FetchBrowserMessageRequest request) {
FetchBrowserMessageReply reply = (FetchBrowserMessageReply) request.createReply();
int browserId = request.getQueueBrowserId();
try {
com.swiftmq.swiftlet.queue.QueueBrowser browser = (com.swiftmq.swiftlet.queue.QueueBrowser) queueBrowsers.get(browserId);
if (request.isResetRequired())
browser.resetBrowser();
MessageEntry me = (MessageEntry) browser.getNextMessage();
reply.setOk(true);
reply.setMessageEntry(me);
} catch (Exception e) {
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace("sys$jms", ctx.tracePrefix + "/" + toString() + ": get next message failed: " + e.getMessage());
reply.setOk(false);
reply.setException(e);
}
reply.send();
}
Aggregations