Package org.jboss.errai.bus.client.api

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


      shadowSubscriptions.put(subject, messageCallbacks = new ArrayList<MessageCallback>());
    }
    messageCallbacks.add(callback);

    final List<MessageCallback> _messageCallbacks = messageCallbacks;
    return new Subscription() {
      @Override
      public void remove() {
        _messageCallbacks.remove(callback);
      }
    };
View Full Code Here


      return null;

    final WrappedCallbackHolder wrappedCallbackHolder = new WrappedCallbackHolder(callback);
    fireAllSubscribeListeners(subject, local, directSubscribe(subject, callback, local, wrappedCallbackHolder));

    return new Subscription() {
      @Override
      public void remove() {
        final List<MessageCallback> cbs = local ? localSubscriptions.get(subject) : subscriptions.get(subject);
        if (cbs != null) {
          cbs.remove(wrappedCallbackHolder.getWrappedCallback());
View Full Code Here

   
    if (isLocal) {
      localObserverTypes.add(eventType);
    }

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

   
    if (isLocalOnly) {
      localOnlyObserverTypes.add(eventType);
    }

    return new Subscription() {
      @Override
      public void remove() {
        unsubscribe(eventType, callback);
      }
    };
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.subscribeLocal(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

TOP

Related Classes of org.jboss.errai.bus.client.api.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.