Package org.jetlang.core

Examples of org.jetlang.core.Disposable


          }
        };
        // Create a subscription based on the filter also.
        BatchSubscriber<Event> batchEventSubscriber = new BatchSubscriber<Event>(
            fiber, eventCallback, eventFilter, 0, TimeUnit.MILLISECONDS);
        Disposable disposable = eventQueue.subscribe(batchEventSubscriber);
        disposableHandlerMap.put(eventHandler, disposable);
      }
    }
  }
View Full Code Here


    }
    anyHandler.add(eventHandler);
    Callback<List<Event>> eventCallback = createEventCallbackForHandler(eventHandler);
    BatchSubscriber<Event> batchEventSubscriber = new BatchSubscriber<Event>(
        fiber, eventCallback, 0, TimeUnit.MILLISECONDS);
    Disposable disposable = eventQueue.subscribe(batchEventSubscriber);
    disposableHandlerMap.put(eventHandler, disposable);
  }
View Full Code Here

    removeDisposableForHandler(eventHandler);
  }

  private synchronized void removeDisposableForHandler(EventHandler eventHandler)
  {
    Disposable disposable = disposableHandlerMap.get(eventHandler);
    if (null != disposable)
    {
      disposable.dispose();
      disposableHandlerMap.remove(eventHandler);
    }
  }
View Full Code Here

TOP

Related Classes of org.jetlang.core.Disposable

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.