Examples of SubscriptionEvent


Examples of org.apache.hedwig.protocol.PubSubProtocol.SubscriptionEvent

            if (prevSubscriber != null) {
                // we already in the delivery thread, we don't need to equeue a stop request
                // just stop it now, since stop is not blocking operation.
                // and also it cleans the old state of the active subscriber immediately.
                SubscriptionEvent se;
                if (deliveryEndPoint.equals(prevSubscriber.deliveryEndPoint)) {
                    logger.debug("Subscriber {} replaced a duplicated subscriber {} at same delivery point {}.",
                                 va(this, prevSubscriber, deliveryEndPoint));
                    se = null;
                } else {
View Full Code Here

Examples of org.apache.hedwig.protocol.PubSubProtocol.SubscriptionEvent

            if (prevSubscriber != null) {
                // we already in the delivery thread, we don't need to equeue a stop request
                // just stop it now, since stop is not blocking operation.
                // and also it cleans the old state of the active subscriber immediately.
                SubscriptionEvent se;
                if (deliveryEndPoint.equals(prevSubscriber.deliveryEndPoint)) {
                    logger.debug("Subscriber {} replaced a duplicated subscriber {} at same delivery point {}.",
                                 va(this, prevSubscriber, deliveryEndPoint));
                    se = null;
                } else {
View Full Code Here

Examples of org.jboss.errai.bus.client.framework.SubscriptionEvent

    final DeliveryPlan plan = createOrAddDeliveryPlan(subject, receiver);

    globalSubscriptions.add(subject);

    fireSubscribeListeners(new SubscriptionEvent(false, null, plan.getTotalReceivers(), true, subject));

    return new SubscriptionHandle(subject, receiver, plan);
  }
View Full Code Here

Examples of org.jboss.errai.bus.client.framework.SubscriptionEvent

    final String toSubscribe = "local:".concat(subject);

    final DeliveryPlan plan = createOrAddDeliveryPlan(toSubscribe, receiver);

    fireSubscribeListeners(
        new SubscriptionEvent(false, false, true, true, plan.getTotalReceivers(), "InBus", toSubscribe)
    );

    return new LocalSubscriptionHandle(toSubscribe, receiver);
  }
View Full Code Here

Examples of org.jboss.errai.bus.client.framework.SubscriptionEvent

    final DeliveryPlan plan = subscriptions.get(subject);

    if (plan != null) {
      subscriptions.put(subject, plan.newDeliveryPlanWithOut(receiver));
      fireUnsubscribeListeners(
          new SubscriptionEvent(false, "InBus", plan.getTotalReceivers(), false, subject));
    }

    return plan;
  }
View Full Code Here

Examples of org.jboss.errai.bus.client.framework.SubscriptionEvent

        rmc.addQueue(queue);
      }
    }

    fireSubscribeListeners(
        new SubscriptionEvent(true, sessionContext.getSessionId(), rmc.getQueueCount(), isNew, subject)
    );
  }
View Full Code Here

Examples of org.jboss.errai.bus.client.framework.SubscriptionEvent

    final RemoteMessageCallback rmc = remoteSubscriptions.get(subject);
    rmc.removeQueue(queue);

    try {
      fireUnsubscribeListeners(new SubscriptionEvent(true, rmc.getQueueCount() == 0, false, false, rmc.getQueueCount(),
          sessionContext.getSessionId(), subject));
    }
    catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

Examples of org.jboss.errai.bus.client.framework.SubscriptionEvent

      throw new IllegalArgumentException("Attempt to modify lockdown service: " + subject);

    subscriptions.remove(subject);
    globalSubscriptions.remove(subject);

    fireUnsubscribeListeners(new SubscriptionEvent(false, null, 0, false, subject));
  }
View Full Code Here

Examples of org.jboss.errai.bus.client.framework.SubscriptionEvent

    for (final Map.Entry<QueueSession, MessageQueue> entry : messageQueues.entrySet()) {
      busMonitor.notifyQueueAttached(entry.getKey().getSessionId(), entry.getValue());
    }

    for (final String subject : subscriptions.keySet()) {
      busMonitor.notifyNewSubscriptionEvent(new SubscriptionEvent(false, "None", 1, false, subject));
    }
    for (final Map.Entry<String, RemoteMessageCallback> entry : remoteSubscriptions.entrySet()) {
      for (final MessageQueue queue : entry.getValue().getQueues()) {
        busMonitor.notifyNewSubscriptionEvent(
            new SubscriptionEvent(true, queue.getSession().getSessionId(), 1, false, entry.getKey())
        );
      }
    }

    monitor.attach(this);
View Full Code Here

Examples of org.jboss.errai.bus.client.framework.SubscriptionEvent

    final DeliveryPlan plan = createOrAddDeliveryPlan(subject, receiver);

    globalSubscriptions.add(subject);

    fireSubscribeListeners(new SubscriptionEvent(false, null, plan.getTotalReceivers(), true, subject));

    return new SubscriptionHandle(subject, receiver, plan);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.