private void fireChange(String webPath) { watchers = watchers.stream().filter( cb -> ! cb.isTerminated() ).collect(Collectors.toList()); watchers.forEach( w -> w.pipe(webPath)); }
public static void main(String[] args) { String arr[] = {"a","b","c","d","e"}; KFlow<String> ks = new KFlow() .filter( x -> x.equals("b") ) .each(x -> System.out.println(x)); for (int i = 0; i < arr.length; i++) { String s = arr[i]; ks.cb().pipe(s); } } }
public static void main(String[] args) { String arr[] = {"a","b","c","d","e"}; KFlow<String> ks = new KFlow() .filter( x -> x.equals("b") ) .each(x -> System.out.println(x)); for (int i = 0; i < arr.length; i++) { String s = arr[i]; ks.cb().pipe(s); } } }
public void _subscribe(RLPredicate pred, Callback cb, int id) { checkThread(); Subscriber localSubs = new Subscriber(pred, change -> { cb.pipe(change); }).serverSideCB(cb); String sid = addChannelIdIfPresent(cb, ""+id);