blob: 4e827fa4a4372c61be92dab5ae0d1d5061dd3470 [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package io.v.baku.toolkit.bind;
import io.v.rx.syncbase.WatchEvent;
import rx.Observable;
import rx.Subscription;
/**
* {@code TwoWayBinding}s are nested from the Syncbase layer innermost to the UI layer outermost.
* The downlink is the data flow from Syncbase to the UI, and the uplink is the data flow from the
* UI to Syncbase.
*/
public interface TwoWayBinding<T> {
/**
* This method should be called at most once per instance, and the observable should have at
* most one subscriber.
*/
Observable<WatchEvent<T>> downlink();
/**
* This method should be called at most once per instance, and the observable should have at
* most one subscriber.
*/
Subscription uplink(Observable<T> rxData);
}