Codota Logo
Channel.subscribe
Code IndexAdd Codota to your IDE (free)

How to use
subscribe
method
in
org.jetlang.channels.Channel

Best Java code snippets using org.jetlang.channels.Channel.subscribe (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: menacher/java-game-server

public void start()
{
  // subscribe to incoming channel
  inChannel.subscribe(fiber, callback);
}
 
origin: menacher/java-game-server

public Agent()
{
  this.channel = new MemoryChannel<Runnable>();
  this.fiber = Fibers.pooledFiber();
  channel.subscribe(fiber, callback);
}
origin: magefree/mage

public Downloader() {
  PoolFiberFactory f = new PoolFiberFactory(pool);
  //subscribe multiple fibers for parallel execution
  for (int i = 0, numThreads = 10; i < numThreads; i++) {
    Fiber fiber = f.create();
    fiber.start();
    fibers.add(fiber);
    channel.subscribe(fiber, new DownloadCallback());
  }
}
origin: org.jetlang/jetlang

public Disposable subscribe(DisposingExecutor executor, Callback<T> receive) {
  final Disposable[] all = new Disposable[channels.length];
  Disposable d = new Disposable() {
    public void dispose() {
      for (Disposable disposable : all) {
        disposable.dispose();
      }
    }
  };
  for (int i = 0; i < channels.length; i++) {
    all[i] = channels[i].subscribe(executor, receive);
  }
  return d;
}
origin: org.jetlang/jetlang

public Disposable subscribe(Subscribable<T> sub) {
  final Disposable[] all = new Disposable[channels.length];
  Disposable d = new Disposable() {
    public void dispose() {
      for (Disposable disposable : all) {
        disposable.dispose();
      }
    }
  };
  for (int i = 0; i < channels.length; i++) {
    all[i] = channels[i].subscribe(sub);
  }
  return d;
}
origin: jetlang/core

public Disposable subscribe(DisposingExecutor executor, Callback<T> receive) {
  final Disposable[] all = new Disposable[channels.length];
  Disposable d = new Disposable() {
    public void dispose() {
      for (Disposable disposable : all) {
        disposable.dispose();
      }
    }
  };
  for (int i = 0; i < channels.length; i++) {
    all[i] = channels[i].subscribe(executor, receive);
  }
  return d;
}
origin: jetlang/core

public Disposable subscribe(Subscribable<T> sub) {
  final Disposable[] all = new Disposable[channels.length];
  Disposable d = new Disposable() {
    public void dispose() {
      for (Disposable disposable : all) {
        disposable.dispose();
      }
    }
  };
  for (int i = 0; i < channels.length; i++) {
    all[i] = channels[i].subscribe(sub);
  }
  return d;
}
org.jetlang.channelsChannelsubscribe

Popular methods of Channel

  • publish

Popular in Java

  • Creating JSON documents from java classes using gson
  • onCreateOptionsMenu (Activity)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • getApplicationContext (Context)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now