Search in sources :

Example 11 with MessageEntry

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();
    mi.readContent(in);
    return mi;
}
Also used : MessageEntry(com.swiftmq.swiftlet.queue.MessageEntry)

Example 12 with MessageEntry

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();
    mi.readContent((LengthCaptureDataInput) in);
    return mi;
}
Also used : MessageEntry(com.swiftmq.swiftlet.queue.MessageEntry)

Example 13 with MessageEntry

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;
}
Also used : MessageEntry(com.swiftmq.swiftlet.queue.MessageEntry)

Example 14 with MessageEntry

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;
}
Also used : MessageEntry(com.swiftmq.swiftlet.queue.MessageEntry)

Example 15 with MessageEntry

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(new javax.jms.JMSException(e.toString()));
    }
    reply.send();
}
Also used : MessageEntry(com.swiftmq.swiftlet.queue.MessageEntry) JMSException(javax.jms.JMSException) InvalidSelectorException(javax.jms.InvalidSelectorException) InvalidDestinationException(javax.jms.InvalidDestinationException) JMSException(javax.jms.JMSException)

Aggregations

MessageEntry (com.swiftmq.swiftlet.queue.MessageEntry)44 MessageImpl (com.swiftmq.jms.MessageImpl)15 JMSException (javax.jms.JMSException)11 MessageIndex (com.swiftmq.swiftlet.queue.MessageIndex)7 InvalidDestinationException (javax.jms.InvalidDestinationException)7 InvalidSelectorException (javax.jms.InvalidSelectorException)7 StoreEntry (com.swiftmq.swiftlet.store.StoreEntry)2 AsyncMessageDeliveryRequest (com.swiftmq.jms.smqp.v600.AsyncMessageDeliveryRequest)1 AsyncMessageDeliveryRequest (com.swiftmq.jms.smqp.v610.AsyncMessageDeliveryRequest)1 AsyncMessageDeliveryRequest (com.swiftmq.jms.smqp.v630.AsyncMessageDeliveryRequest)1 AsyncMessageDeliveryRequest (com.swiftmq.jms.smqp.v750.AsyncMessageDeliveryRequest)1 MessageSelector (com.swiftmq.ms.MessageSelector)1 QueuePullTransaction (com.swiftmq.swiftlet.queue.QueuePullTransaction)1 QueueReceiver (com.swiftmq.swiftlet.queue.QueueReceiver)1 XStream (com.thoughtworks.xstream.XStream)1 Dom4JDriver (com.thoughtworks.xstream.io.xml.Dom4JDriver)1 File (java.io.File)1