Search in sources :

Example 16 with Subscription

use of com.sun.messaging.jmq.jmsserver.core.Subscription in project openmq by eclipse-ee4j.

the class SubscriptionIterator method next.

/**
 * Caller must catch RuntimeException and getCause
 */
@Override
public Object next() throws RuntimeException {
    try {
        String dname = dis.readUTF();
        String clientID = dis.readUTF();
        if (clientID.length() == 0) {
            clientID = null;
        }
        Subscription sub = Subscription.findDurableSubscription(clientID, dname);
        count_read++;
        return sub;
    } catch (IOException e) {
        count_read = -1;
        throw new RuntimeException(e);
    }
}
Also used : Subscription(com.sun.messaging.jmq.jmsserver.core.Subscription)

Aggregations

Subscription (com.sun.messaging.jmq.jmsserver.core.Subscription)16 Consumer (com.sun.messaging.jmq.jmsserver.core.Consumer)11 ConsumerUID (com.sun.messaging.jmq.jmsserver.core.ConsumerUID)8 BrokerException (com.sun.messaging.jmq.jmsserver.util.BrokerException)7 DestinationUID (com.sun.messaging.jmq.jmsserver.core.DestinationUID)5 Destination (com.sun.messaging.jmq.jmsserver.core.Destination)4 ConsumerAlreadyAddedException (com.sun.messaging.jmq.jmsserver.util.ConsumerAlreadyAddedException)4 SelectorFormatException (com.sun.messaging.jmq.util.selector.SelectorFormatException)4 Iterator (java.util.Iterator)3 SysMessageID (com.sun.messaging.jmq.io.SysMessageID)2 TransactionUID (com.sun.messaging.jmq.jmsserver.data.TransactionUID)2 PartitionedStore (com.sun.messaging.jmq.jmsserver.persist.api.PartitionedStore)2 OutOfLimitsException (com.sun.messaging.jmq.util.lists.OutOfLimitsException)2 IOException (java.io.IOException)2 HashMap (java.util.HashMap)2 LinkedHashMap (java.util.LinkedHashMap)2 LinkedHashSet (java.util.LinkedHashSet)2 Map (java.util.Map)2 Set (java.util.Set)2 Vector (java.util.Vector)2