Search in sources :

Example 1 with FetchBrowserMessageReply

use of com.swiftmq.jms.smqp.v500.FetchBrowserMessageReply in project swiftmq-client by iitsoftware.

the class QueueBrowserImpl method hasMoreElements.

/**
 * Method declaration
 *
 * @return
 * @see
 */
public boolean hasMoreElements() {
    if (closed) {
        return false;
    }
    if (lastMessage == null) {
        FetchBrowserMessageReply reply = null;
        try {
            reply = (FetchBrowserMessageReply) requestRegistry.request(new FetchBrowserMessageRequest(dispatchId, browserDispatchId, resetRequired));
            resetRequired = false;
        } catch (Exception e) {
        }
        if (reply.isOk() && reply.getMessageEntry() != null) {
            lastMessage = reply.getMessageEntry().getMessage();
        }
    }
    return (lastMessage != null);
}
Also used : FetchBrowserMessageReply(com.swiftmq.jms.smqp.v400.FetchBrowserMessageReply) FetchBrowserMessageRequest(com.swiftmq.jms.smqp.v400.FetchBrowserMessageRequest) NoSuchElementException(java.util.NoSuchElementException) JMSException(javax.jms.JMSException)

Example 2 with FetchBrowserMessageReply

use of com.swiftmq.jms.smqp.v500.FetchBrowserMessageReply in project swiftmq-client by iitsoftware.

the class QueueBrowserImpl method hasMoreElements.

/**
 * Method declaration
 *
 * @return
 * @see
 */
public boolean hasMoreElements() {
    if (closed) {
        return false;
    }
    if (lastMessage == null) {
        FetchBrowserMessageReply reply = null;
        try {
            reply = (FetchBrowserMessageReply) requestRegistry.request(new FetchBrowserMessageRequest(dispatchId, browserDispatchId, resetRequired));
            resetRequired = false;
        } catch (Exception e) {
        }
        if (reply.isOk() && reply.getMessageEntry() != null) {
            lastMessage = reply.getMessageEntry().getMessage();
        }
    }
    return (lastMessage != null);
}
Also used : FetchBrowserMessageReply(com.swiftmq.jms.smqp.v500.FetchBrowserMessageReply) FetchBrowserMessageRequest(com.swiftmq.jms.smqp.v500.FetchBrowserMessageRequest) NoSuchElementException(java.util.NoSuchElementException) JMSException(javax.jms.JMSException)

Example 3 with FetchBrowserMessageReply

use of com.swiftmq.jms.smqp.v500.FetchBrowserMessageReply in project swiftmq-client by iitsoftware.

the class QueueBrowserImpl method hasMoreElements.

/**
 * Method declaration
 *
 * @return
 * @see
 */
public boolean hasMoreElements() {
    if (closed) {
        return false;
    }
    if (lastMessage == null) {
        FetchBrowserMessageReply reply = null;
        try {
            reply = (FetchBrowserMessageReply) requestRegistry.request(new FetchBrowserMessageRequest(dispatchId, browserDispatchId, resetRequired));
            resetRequired = false;
        } catch (Exception e) {
        }
        if (reply.isOk() && reply.getMessageEntry() != null) {
            lastMessage = reply.getMessageEntry().getMessage();
        }
    }
    return (lastMessage != null);
}
Also used : FetchBrowserMessageReply(com.swiftmq.jms.smqp.v510.FetchBrowserMessageReply) FetchBrowserMessageRequest(com.swiftmq.jms.smqp.v510.FetchBrowserMessageRequest) NoSuchElementException(java.util.NoSuchElementException) JMSException(javax.jms.JMSException)

Aggregations

NoSuchElementException (java.util.NoSuchElementException)3 JMSException (javax.jms.JMSException)3 FetchBrowserMessageReply (com.swiftmq.jms.smqp.v400.FetchBrowserMessageReply)1 FetchBrowserMessageRequest (com.swiftmq.jms.smqp.v400.FetchBrowserMessageRequest)1 FetchBrowserMessageReply (com.swiftmq.jms.smqp.v500.FetchBrowserMessageReply)1 FetchBrowserMessageRequest (com.swiftmq.jms.smqp.v500.FetchBrowserMessageRequest)1 FetchBrowserMessageReply (com.swiftmq.jms.smqp.v510.FetchBrowserMessageReply)1 FetchBrowserMessageRequest (com.swiftmq.jms.smqp.v510.FetchBrowserMessageRequest)1