public interface FirebaseRestEventStream
FirebaseRestEventStream represents a specific location within a Firebase namespace and allows
for listening to change events like data being set or updated.Promise to allow for a more functional implementation of asynchronous requests.| Modifier and Type | Method and Description |
|---|---|
FirebaseRestEventStream |
child(java.lang.String path)
Returns the streaming reference for the given child location of this
FirebaseRestEventStream. |
FirebaseRestEventStream |
getParent()
Returns the streaming reference for the parent location of this
FirebaseRestEventStream. |
java.lang.String |
getReferenceUrl()
Returns the fully qualified URL for this FirebaseRestEventStream instance.
|
FirebaseRestEventStream |
getRoot()
Returns the streaming reference for the root of this Firebase namespace.
|
org.jdeferred.Promise<java.lang.Void,FirebaseRuntimeException,StreamingEvent> |
startListening()
Starts listening for the events on the current document location of this namespace.
|
void |
stopListening()
Closes the event stream, which will resolve the promise created for this location.
|
java.lang.String getReferenceUrl()
org.jdeferred.Promise<java.lang.Void,FirebaseRuntimeException,StreamingEvent> startListening()
Promise.progress(ProgressCallback) function passing in an StreamingEvent
object that contains the type, a relative path and the value of the changed location in Firebase.
stopListening() function is invoked.Promise for the active request.FirebaseInvalidStateException - The listener for the events has already been started.FirebaseAccessException - The client does not have permission to read from this location.FirebaseAuthenticationExpiredException - The session for the given access token has expired.void stopListening()
FirebaseInvalidStateException - There is no event listener currently running.FirebaseRestEventStream getRoot()
FirebaseRestEventStream representing the root of this Firebase namespace.FirebaseRestEventStream getParent()
FirebaseRestEventStream.FirebaseRestEventStream representing the parent location of this FirebaseRestEventStream.FirebaseRestEventStream child(java.lang.String path)
FirebaseRestEventStream.path - The child's name or path to the child relative to this reference.FirebaseRestEventStream representing the child location.