Package org.jboss.errai.bus.client.framework

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


    if (proxyClosed) {
      return proxied.subscribe(subject, receiver);
    }
    else {
      heldSubscribe.put(subject, receiver);
      return new Subscription() {
        @Override
        public void remove() {
          throw new IllegalStateException("cannot unsubscribe from a proxied MessageBus");
        }
      };
View Full Code Here


    if (proxyClosed) {
      return proxied.subscribe(subject, receiver);
    }
    else {
      heldLocalSubscribe.put(subject, receiver);
      return new Subscription() {
        @Override
        public void remove() {
          throw new IllegalStateException("cannot unsubscribe from a proxied MessageBus");
        }
      };
View Full Code Here

    globalSubscriptions.add(subject);

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

    return new Subscription() {
      @Override
      public void remove() {
        if (removeFromDeliveryPlan(subject, receiver).getTotalReceivers() == 0) {
          globalSubscriptions.remove(subject);
          subscriptions.remove(subject);
View Full Code Here

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

    return new Subscription() {
      @Override
      public void remove() {
        removeFromDeliveryPlan(toSubscribe, receiver);
      }
    };
View Full Code Here

          .with(CDIProtocol.BeanType, eventType)
          .with(CDIProtocol.Qualifiers, callback.getQualifiers())
          .noErrorHandling().sendNowWith(ErraiBus.get());
    }

    return new Subscription() {
      @Override
      public void remove() {
        unsubscribe(eventType, callback);
      }
    };
View Full Code Here

    DeliveryPlan plan = createOrAddDeliveryPlan(subject, receiver);

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

    return new Subscription() {
      @Override
      public void remove() {
        removeFromDeliveryPlan(subject, receiver);
      }
    };
View Full Code Here

    DeliveryPlan plan = createOrAddDeliveryPlan(subject, receiver);

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

    return new Subscription() {
      @Override
      public void remove() {
        removeFromDeliveryPlan(subject, receiver);
      }
    };
View Full Code Here

    if (proxyClosed) {
      return proxied.subscribe(subject, receiver);
    }
    else {
      heldSubscribe.put(subject, receiver);
      return new Subscription() {
        @Override
        public void remove() {
          throw new IllegalStateException("cannot unsubscribe from a proxied MessageBus");
        }
      };
View Full Code Here

    if (proxyClosed) {
      return proxied.subscribe(subject, receiver);
    }
    else {
      heldLocalSubscribe.put(subject, receiver);
      return new Subscription() {
        @Override
        public void remove() {
          throw new IllegalStateException("cannot unsubscribe from a proxied MessageBus");
        }
      };
View Full Code Here

    globalSubscriptions.add(subject);

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

    return new Subscription() {
      @Override
      public void remove() {
        if (removeFromDeliveryPlan(subject, receiver).getTotalReceivers() == 0) {
          globalSubscriptions.remove(subject);
          subscriptions.remove(subject);
View Full Code Here

TOP

Related Classes of org.jboss.errai.bus.client.framework.Subscription

Copyright © 2018 www.massapicom. 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.