Tabnine Logo
AsyncSubject.create
Code IndexAdd Tabnine to your IDE (free)

How to use
create
method
in
rx.subjects.AsyncSubject

Best Java code snippets using rx.subjects.AsyncSubject.create (Showing top 20 results out of 315)

origin: com.couchbase.client/core-io

/**
 * Creates a new {@link AbstractKeyValueRequest}.
 *
 * @param key      the key of the document.
 * @param bucket   the bucket of the document.
 * @param username the user authorized for bucket access.
 * @param password the password for the user.
 */
protected AbstractKeyValueRequest(String key, String bucket, String username, String password) {
  this(key, bucket, username, password, AsyncSubject.<CouchbaseResponse>create());
}
origin: couchbase/couchbase-jvm-core

/**
 * Creates a new {@link AbstractSubdocRequest}.
 *
 * @param key           the key of the document.
 * @param path          the subdocument path to consider inside the document.
 * @param bucket        the bucket of the document.
 * @param restOfContent the optional remainder of the {@link #content()} of the final protocol message, or null if not applicable
 * @throws NullPointerException if the path is null (see {@link #EXCEPTION_NULL_PATH})
 */
public AbstractSubdocRequest(String key, String path, String bucket, ByteBuf... restOfContent) {
  this(key, path, bucket, AsyncSubject.<CouchbaseResponse>create(), restOfContent);
}
origin: com.netflix.rxjava/rxjava-core

  @Override
  public final Subject<T, T> call() {
    return AsyncSubject.create();
  }
}, selector);
origin: couchbase/couchbase-jvm-core

/**
 * Creates a new {@link AbstractKeyValueRequest}.
 *
 * @param key      the key of the document.
 * @param bucket   the bucket of the document.
 */
protected AbstractKeyValueRequest(String key, String bucket) {
  this(key, bucket, null, null, AsyncSubject.<CouchbaseResponse>create());
}
origin: couchbase/couchbase-jvm-core

/**
 * Creates a new {@link AbstractKeyValueRequest}.
 *
 * @param key      the key of the document.
 * @param bucket   the bucket of the document.
 * @param password the password for the bucket.
 */
protected AbstractKeyValueRequest(String key, String bucket, String password) {
  this(key, bucket, bucket, password, AsyncSubject.<CouchbaseResponse>create());
}
origin: couchbase/couchbase-jvm-core

/**
 * Creates a new {@link AbstractKeyValueRequest}.
 *
 * @param key      the key of the document.
 * @param bucket   the bucket of the document.
 * @param username the user authorized for bucket access.
 * @param password the password for the user.
 */
protected AbstractKeyValueRequest(String key, String bucket, String username, String password) {
  this(key, bucket, username, password, AsyncSubject.<CouchbaseResponse>create());
}
origin: com.couchbase.client/core-io

/**
 * Creates a new {@link AbstractSubdocRequest}.
 *
 * @param key           the key of the document.
 * @param path          the subdocument path to consider inside the document.
 * @param bucket        the bucket of the document.
 * @param restOfContent the optional remainder of the {@link #content()} of the final protocol message, or null if not applicable
 * @throws NullPointerException if the path is null (see {@link #EXCEPTION_NULL_PATH})
 */
public AbstractSubdocRequest(String key, String path, String bucket, ByteBuf... restOfContent) {
  this(key, path, bucket, AsyncSubject.<CouchbaseResponse>create(), restOfContent);
}
origin: com.couchbase.client/core-io

/**
 * Creates a new {@link AbstractKeyValueRequest}.
 *
 * @param key      the key of the document.
 * @param bucket   the bucket of the document.
 */
protected AbstractKeyValueRequest(String key, String bucket) {
  this(key, bucket, null, null, AsyncSubject.<CouchbaseResponse>create());
}
origin: com.couchbase.client/core-io

/**
 * Creates a new {@link AbstractKeyValueRequest}.
 *
 * @param key      the key of the document.
 * @param bucket   the bucket of the document.
 * @param password the password for the bucket.
 */
protected AbstractKeyValueRequest(String key, String bucket, String password) {
  this(key, bucket, bucket, password, AsyncSubject.<CouchbaseResponse>create());
}
origin: com.netflix.rxjava/rxjava-core

@Override
public Subject<? super T, ? extends T> call() {
  return AsyncSubject.<T> create();
}

origin: com.couchbase.client/core-io

/**
 * Creates a new {@link AbstractSubdocMutationRequest}.
 *
 * @param key      the key of the document.
 * @param path     the subdocument path to consider inside the document.
 * @param fragment   the fragment of valid JSON to mutate into at the site denoted by the path.
 * @param bucket   the bucket of the document.
 * @param expiration the TTL of the whole enclosing document.
 * @param cas the cas value for the operation
 * @throws NullPointerException     if the path is null (see {@link #EXCEPTION_NULL_PATH})
 */
protected AbstractSubdocMutationRequest(String key, String path, ByteBuf fragment, String bucket,
                   int expiration, long cas) {
  this(key, path, fragment, bucket, expiration, cas, AsyncSubject.<CouchbaseResponse>create());
}
origin: couchbase/couchbase-jvm-core

/**
 * Creates a new {@link AbstractSubdocMutationRequest}.
 *
 * @param key      the key of the document.
 * @param path     the subdocument path to consider inside the document.
 * @param fragment   the fragment of valid JSON to mutate into at the site denoted by the path.
 * @param bucket   the bucket of the document.
 * @param expiration the TTL of the whole enclosing document.
 * @param cas the cas value for the operation
 * @throws NullPointerException     if the path is null (see {@link #EXCEPTION_NULL_PATH})
 */
protected AbstractSubdocMutationRequest(String key, String path, ByteBuf fragment, String bucket,
                   int expiration, long cas) {
  this(key, path, fragment, bucket, expiration, cas, AsyncSubject.<CouchbaseResponse>create());
}
origin: com.couchbase.client/core-io

/**
 * Create a new {@link AbstractCouchbaseRequest}.
 *
 * Depending on the type of operation, bucket and password may be null, this needs to
 * be enforced properly by the child implementations.
 *
 * This constructor will create a AsyncSubject, which implies that the response for this
 * request only emits one message. If you need to expose a streaming response, use the
 * other constructor and feed it a ReplaySubject or something similar.
 *
 * @param bucket the name of the bucket.
 * @param password user password.
 */
protected AbstractCouchbaseRequest(String bucket, String password) {
  this(bucket, bucket, password, AsyncSubject.<CouchbaseResponse>create());
}
origin: couchbase/couchbase-jvm-core

/**
 * Create a new {@link AbstractCouchbaseRequest}.
 *
 * Depending on the type of operation, bucket and password may be null, this needs to
 * be enforced properly by the child implementations.
 *
 * This constructor will create a AsyncSubject, which implies that the response for this
 * request only emits one message. If you need to expose a streaming response, use the
 * other constructor and feed it a ReplaySubject or something similar.
 *
 * @param bucket the name of the bucket.
 * @param username user authorized to access the bucket.
 * @param password user password.
 */
protected AbstractCouchbaseRequest(String bucket, String username, String password) {
  this(bucket, username, password, AsyncSubject.<CouchbaseResponse>create());
}
origin: couchbase/couchbase-jvm-core

/**
 * Create a new {@link AbstractCouchbaseRequest}.
 *
 * Depending on the type of operation, bucket and password may be null, this needs to
 * be enforced properly by the child implementations.
 *
 * This constructor will create a AsyncSubject, which implies that the response for this
 * request only emits one message. If you need to expose a streaming response, use the
 * other constructor and feed it a ReplaySubject or something similar.
 *
 * @param bucket the name of the bucket.
 * @param password user password.
 */
protected AbstractCouchbaseRequest(String bucket, String password) {
  this(bucket, bucket, password, AsyncSubject.<CouchbaseResponse>create());
}
origin: com.netflix.eureka/eureka2-core

  static PendingAck create(long expiryTime) {
    final Subject<Void, Void> ackSubject = AsyncSubject.create();
    OnSubscribe<Void> onSubscribe = new OnSubscribe<Void>() {
      @Override
      public void call(Subscriber<? super Void> subscriber) {
        ackSubject.subscribe(subscriber);
      }
    };
    return new PendingAck(onSubscribe, ackSubject, expiryTime);
  }
}
origin: com.couchbase.client/core-io

/**
 * An internal alternative to {@link #connect()} where signalling that this is
 * post-bootstrapping can be done.
 *
 * @param bootstrapping is this connect attempt made during bootstrap or after (in
 *                     which case more error cases are eligible for retries).
 */
protected Observable<LifecycleState> connect(boolean bootstrapping) {
  if (state() != LifecycleState.DISCONNECTED) {
    return Observable.just(state());
  }
  final AsyncSubject<LifecycleState> observable = AsyncSubject.create();
  transitionState(LifecycleState.CONNECTING);
  hasWritten = false;
  doConnect(observable, bootstrapping);
  return observable;
}
origin: leeowenowen/rxjava-examples

 @Override
 public void run() {
  AsyncSubject<Integer> s = AsyncSubject.create();
  s.subscribe(new Action1<Integer>() {
   @Override
   public void call(Integer integer) {
    log("" + integer);
   }
  });
  s.onNext(0);
  s.onNext(1);
  s.onNext(2);
  s.onCompleted();
 }
});
origin: CasterIO/RxExamples

@OnClick(R.id.async_subject_test_error)
public void onAsyncSubjectTestWithErrorClick() {
  unsubscribe();
  createSubscription();
  AsyncSubject<Stock> stockAsyncSubject = AsyncSubject.create();
  stockAsyncSubject.onNext(new Stock(GOOG, 722));
  // Will get the last value (GOOG, 723) and all future items and terminal events
  Subscription subscription = stockAsyncSubject.subscribe(getDefaultSubscriber());
  compositeSubscription.add(subscription);
  stockAsyncSubject.onNext(new Stock(GOOG, 723));
  stockAsyncSubject.onNext(new Stock(GOOG, 100));
  stockAsyncSubject.onNext(new Stock(GOOG, 699));
  stockAsyncSubject.onError(new Exception("Boom!")); // current and future subscribers will only receive this, with NO items emitted.
  Subscription tardySubscription = stockAsyncSubject.subscribe(getTardySubscriber());
  compositeSubscription.add(tardySubscription);
}
origin: CasterIO/RxExamples

@OnClick(R.id.async_subject_test)
public void onAsyncSubjectTestClick() {
  unsubscribe();
  createSubscription();
  AsyncSubject<Stock> stockAsyncSubject = AsyncSubject.create();
  stockAsyncSubject.onNext(new Stock(GOOG, 722));
  // Will get the last value (GOOG, 723) and all future items and terminal events
  Subscription subscription = stockAsyncSubject.subscribe(getDefaultSubscriber());
  compositeSubscription.add(subscription);
  stockAsyncSubject.onNext(new Stock(GOOG, 723));
  stockAsyncSubject.onNext(new Stock(GOOG, 100));
  stockAsyncSubject.onNext(new Stock(GOOG, 699));
  stockAsyncSubject.onCompleted();
  Subscription tardySubscription = stockAsyncSubject.subscribe(getTardySubscriber());
  compositeSubscription.add(tardySubscription);
}
rx.subjectsAsyncSubjectcreate

Javadoc

Creates and returns a new AsyncSubject.

Popular methods of AsyncSubject

  • onCompleted
  • onNext
  • onError
  • observeOn
  • subscribe
  • <init>
  • asObservable
  • doOnUnsubscribe
  • onBackpressureBuffer

Popular in Java

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setRequestProperty (URLConnection)
  • runOnUiThread (Activity)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now