trait SingleObservable[T] extends Observable[T] with com.mongodb.async.client.Observable[T]
A SingleObservable
represents an Observable that contains only a single item.
- T
the type of element signaled.
- Since
2.0
- Alphabetic
- By Inheritance
- SingleObservable
- Observable
- Observable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def subscribe(observer: Observer[_ >: T]): Unit
Request
SingleObservable
to start streaming data.Request
SingleObservable
to start streaming data.This is a "factory method" and can be called multiple times, each time starting a new Subscription. Each
Subscription
will work for only a single Observer.If the
Observable
rejects the subscription attempt or otherwise fails it will signal the error via Observer.onError.- observer
the
Observer
that will consume signals from thisObservable
- Definition Classes
- SingleObservable → Observable
Concrete Value Members
- def subscribe(observer: com.mongodb.async.client.Observer[_ >: T]): Unit
Handles the automatic boxing of a Java
Observable
so it conforms to the interface.Handles the automatic boxing of a Java
Observable
so it conforms to the interface.- observer
the
Observer
that will consume signals from thisObservable
- Definition Classes
- SingleObservable → Observable → Observable
- Note
Users should not have to implement this method but rather use the Scala
Observable
.
This is the documentation for the MongoDB Scala driver.
Driver structure
The mongodb scala driver.
To get started you need a MongoClient instance, either from a connection string or via a org.mongodb.scala.MongoClientSettings.
Notable packages include: